So you want to make new Models for Myth?

 

This guide is intended for anyone who's totally new to making Myth models.  It assumes you have a Mac running OS 9 or earlier or OSX with Classic installed, as unfortunately none of the necessary software is available for Windows, and most won't run natively in OSX.  Why did I write this?  Because when I started making models I was fortunate in having an expert (Mauglir) to lean on for knowledge and advice. When he took a break from Myth I quickly realized how little information was available on modeling for Myth, and how few people there are who know how its done.  Therefore I thought I'd put together what I'd learned along the way so at least the little I know doesn’t stay locked inside my own head.

 

You will need the following tools:-

 

·      Meshwork, available from http://www.codenautics.com

·      GeomView

·      Amber v2.0 Beta 6

·      Vegas

·      Apathy

·      HexEdit, from http://hexedit.sourceforge.net

 

So what is a model?  It is a house, bridge, statue.  It is not a sprite, but is truly 3D.  It is not a unit, and it isn't scenery.

 

Why would I want to make new models?  Well ... generally as a mapmaker you'll know when the need is there.  You'll want to make a map with a ruined castle or monastery and can't find one of Bungie's models that fits the bill.  Or you'll be making a total conversion (like me) that needs a whole city full of new buildings, without which the look and feel of the plugin just isn't there.  Perhaps you’ve tried to fill the gap with sprites, but it just doesn’t look right.

 

Making 3D models for Myth may seem like a mystical and arcane art, far beyond the capabilities of ordinary mortals.  It isn't - in fact its easier in many ways than making a new unit.  You just have to know what process to follow along with some handy tips & tricks.

 

 

Step 1: Meshwork

 

Where to start?

 

So lets assume you do have a need, and you're ready to go.  Where to begin?

 

The first thing is to put your ambition on hold for a few days and master the basics of Meshwork first.  Install the program, and do the mushroom tutorial.  Get used to building a trimesh model using it, including such techniques as hiding vertices and texture pinning.  When you've done that, you're ready to proceed further.

 

If you're not confident enough to build a new model from scratch and there's a bungie model that could perhaps be used as a starting point, the first step is to extract it to Meshwork format.  To do this, extract the geometry tag for the model, then open it in GeomView.  You'll see a button there that says "Export to Meshwork".  Do that, then close GeomView.

 

 

Model Scale in Meshwork

 

This is a very important thing to get used to from the outset - how big to build the model, and most importantly how to relate the model size in Meshwork to what you'll see in Myth.  Meshwork's grid button comes in very handy here.  I follow Mauglir's advice and use a grid size of 32.  Each 32 x 32 square (at ground level, looked at from above) will correspond to a mesh cell in Myth.  Ensure your model starts at the 0, 0, 0 coordinate and ends precisely at a multiple of 32 on the X and Z coordinates.  That way you'll be sure it fits neatly in Myth.   Important: don't let your model exceed 128 cells in size, as that's Myth's limit.

 

If you've imported a model from Myth using GeomView's export, you'll find its way too large.  In fact its 16 times the size.  To get it to the 32 point scale, select all the vertices then choose Transform->Scale and enter 12.5% for all three axes, keeping it relative to <0, 0, 0>.

 

 

Keep it Simple

 

I know that seems like cliched advice, but with models its essential.  If you find yourself doing intricate modelling around the doorways and windows of your new Willow Creek tavern, stop and think.  Here's another limit - Myth only allows 512 triangles per model.  It actually starts crashing when you get close to that, so lets say its 500.  500 triangles is surprisingly easy to reach.  To see how many your model has, go File->Get Info in Meshwork.  Also, lots of small triangles will greatly increase the rendering load in-game, making for slow framerates and gamers who curse your plugin.  Besides that, there's little point doing all that work when perhaps a cleverly painted texture on a flat, 2 triangle wall would look the same in Myth.

 

Another thing to check is that there's no triangles facing downwards or towards anywhere that you'll never see them in Myth.  If you can find and remove them (use the Disconnect tool) then its definitely worthwhile.

 

 

Get Familiar with Pinning Textures

 

Did I mention that you need an actual bitmap texture with each material you use?  I didn't?  Well, you do.  Furthermore these textures need to have dimensions in powers of two - eg 32x32 pixels, or 32x64, 64x128, 128x128 etc etc.  Trying to use a texture that's 56 by 83 pixels in size will lead to trouble.  If you don't happen to have textures handy, sketch them quickly using Graphic Converter & cut and paste them into the appropriate materials in Meshwork.  You can put the final ones into Amber later.

 

Ok, so you're using a few materials and each has its own bitmap texture.  If you're doing something simple and box shaped then you're in luck - Planar will do the job.  For the wall facing X you choose its vertices, double click the appropriate material, click Planar and X, then Set.  It'll show those pixels neatly fitting the bitmap image.  The back facing wall will look the same. Repeat for the sides facing Z and Y (the roof) and you're set.  Use the 3D Preview feature (Command-E) frequently to ensure its looking as you'd like.

 

The fun starts when you might have multiple of an object that you might want to use the same texture for.  Btw keep use of materials to an absolute minimum, as the fewer (and smaller) textures you use with a model directly relates to how quickly and easily Myth can render it.

 

Lets take for example a simple model I'm making for Syndicate of two 40-gallon drums.  In the US I believe you call them 55 gallon drums, but that's because your gallons are kinda whacky.  Anyway, I've modelled one and used Cylindrical mapping to texture its sides.  All well and good.  I select its vertices, duplicate it and move the copied barrel to a new location in my model.  I then look at the 3D Preview, expecting to see two identical barrels ... and I get a nasty shock.  The original is fine, but the copy looks really flat and boring.  Why?  Because in this case plain mapping of textures isn't enough, I need to pin the texture to each vertice.

 

Sounds scary but it isn’t really.  Ok, you’ve setup an object with the texture the way you want it.

Now double-click the material and change it to Pinned, then hit Ok.

 

Looking at the Meshwork window, you’ll see beside the row of buttons on the top left that there’s three numerical fields.  These record the location of each vertice in X/Y/Z space.  Beside those are two more fields.  These state where on the texture the vertice is placed.  All I needed to do was copy, for each vertice, those two values from Barrel #1 to Barrel #2.  It’s a little tedious I grant you, but that’s why we keep our models simple.  With a little practice its not hard to do it pretty quickly.

 

Once this is done, I can open the 3D Preview and voila!  Two perfectly textured barrels!

 

Note that you can also use Pinning to make fine adjustments to how a texture applies to an image by using the Texture Map in Meshwork.  I won't go into that as the Meshwork documentation covers it.  The question remains though – if I have a texture pinned correctly to a set of vertices, then I duplicate those vertices – why doesn’t the duplicate carry over the original’s texture values?  If only.

 

 

Step 2: Apathy

 

Ok, so you've made your model and are happy with it.  Export it to 3DMF format, then fire up Apathy.  The first thing Apathy will do is open a dialog asking for a 3DMF file.  Choose the file you just saved and click ok.  All going well you'll see it in a window, with a row of buttons and value fields beneath.

 

Lets say all didn't go well and Apathy crashed.  There are two reasons I've found for Apathy doing this ... you either forgot to cut & paste a bitmap into one of the materials your model uses, or you have more than 500 (or so) vertices.  Go back to Meshwork and check both of these, amend it then try again.

 

Firstly in Apathy, use the zoom and rotate buttons to double check that your textures are applied correctly.  Sometimes it shows flaws that Meshwork's 3D Preview does not reveal.

 

Next, choose a scale.  If your model is, say, 96 points wide by 128 long in Meshwork, then in Apathy you'd choose a length of 3 and a width of 4 (for some reason it rotates the model.  Just entering one of the values will set the others accordingly.

 

Enter a tag id for your model, then hit the Export button.  Apathy will create four files - a Collection Reference tag, a Collection tag, a Model tag and a Geometry tag.  Move these to your local folder.   Note - make sure any previous Apathy-created files are removed from the current directory else Apathy will crash when you try to export.  For some reason it can't overwrite files.

 

I know Apathy has a lot of functionality, as you can find in reading its documentation.  No offence to the fine folk at Vista who created it, but I prefer to use Apathy purely to convert a 3DMF to Myth tags and nothing more.  There’s two reasons for my aversion to Apathy – one is that you can’t rely on it to display textures the same as you’ll see them in Myth (see the Vegas section below) and the other is that once you’ve saved the model as a Myth tag, Apathy can't edit it again.  If you need to amend how an existing Myth model is setup, you need to either enter all the details all over again from Apathy, or use Vegas.  Personally I find it easier just to use Vegas from the outset.  If I could get Vegas's "Convert Geometry" feature to work & import 3DMF files using it I wouldn't bother with Apathy at all.

 

 

Step 3: Vegas

 

Vegas, like Fear and Loathing, needs to be installed in your Myth II folder.  It has access to all models in your foundation tags as well as those in the local folder.

 

Note:  One thing I’m not sure of is whether Vegas requires Macsbug to be present.  I have it installed already in my Classic setup.  If it won’t start, grab Macsbug from http://apple.com and install it, then Vegas should fire up without a problem.  Having Macsbug present is handy anyway, as often it’ll tell you why Vegas or Apathy crash, whereas otherwise you’d be clueless.

 

Once you get it running the most tricky thing in Vegas is knowing how the camera works.  You use the left/right arrow keys to rotate the model on its Y axis, and the up/down arrows to rotate it on its X axis.  Bear in mind you're changing the model's viewpoint in relation to your camera - you're not moving the camera as such.  Hence if your camera is looking along the X axis and you hit the up arrow, the model will rotate off to the side rather than up & back.  It just takes some getting used to.

 

You can also hold the option button and drag-click to zoom in and out.

 

Note: Using Bungie’s tools including Fear and Vegas under OS X, you can very find that they refuse to start, giving you some error relating to .DS_Store.  It’s a problem caused by that file being added to the Myth II Plugins folder, which OS X often does when you view the folder in the Finder.

 

There’s various utilities you can get to display those hidden files in the Finder (and therefore remove them).  I find it more convenient to use a shell script containing the line:-

 

      rm –f “~/Desktop/Myth II/plugins/.DS_Store”

 

I run that from a Terminal window whenever Vegas complains about the problem.

 

Checking Textures

 

Myth is really unforgiving when it comes to textures not being set right.  Unfortunately, many mistakes only become evident when you see them in Vegas, as both Apathy and the 3D Preview gloss over them. 

 

The most common of these is getting the "normal" of a triangle set wrongly. This simply means that its facing the wrong way.  In 3D Preview and Apathy it’ll look right, but Vegas will show it as a transparent triangle.  The first thing you do is rotate the model and ensure there's no problems of this sort, and that other textures are displayed correctly.  If its shown wrongly in Vegas then there will be an error in how you did the model back in Meshwork.   Trust me, its not Vegas that's making the mistake :)

 

For the incorrect normals, you can either go back to Meshwork and fix it (by selecting the vertices for those triangles, choosing the appropriate viewpoint they should be facing towards then hitting "Face Front") or in Vegas you can choose View->Surfaces->Two Sided then select those triangles, making them render on both sides – assuming your model’s design lets you see the back of the model and click on the offending vertices in Vegas.

 

Its important you take a moment to check your textures first before doing anything else in Vegas.  Nothing is more annoying than setting a whole stack of values and then noticing a texture is skewed badly & having to fix in Meshwork and start all over again.

 

Mesh Cells

 

Most models will kill some mesh cells underneath them.  By kill I mean that those cells are not rendered in Myth at all.  To set these for your model, go into View->Cells->Replace Mesh.  You can quickly see if your model is correctly sized for Myth cells at this point.  If not, bail out and fix it!   If all is ok, click on the cells under the model that the mesh shouldn't be rendered for.

 

Next look at View->Cells->Flying Impassable.  Usually you'd set the same cells as you did for Replace Mesh.

 

At this point you should be able to open Loathing and place your model on a map, to see what it looks like.  Ensure the cells being replaced are the right ones, and that you've got the scale of the model correct.  You can have Loathing open at the same time as Vegas.

 

Snapping to the Mesh

 

Another feature of many models is that they make the mesh snap to the bottom of the model (or sometimes to the top in the case of bridges).  To do this, click View->Show Wireframe then View->Vertices->Deform mesh.  Click on the vertices you want the mesh to snap to.  Note that this will only work if your vertices are exactly aligned to the mesh, using the coordinate system I discussed earlier.

 

Under the Mesh

 

This is used a lot in bridges, in fact in any model that raises the mesh.  Basically any triangle thats below where the mesh is raised to, you click it as being under the mesh. That way it won't try to render through the mesh, producing an odd flickering effect.

 

Reflective

 

Use this one to mark any triangles that should reflect surfaces (eg the water parts of bridge models).

 

While I'm on the topic of bridges, have you ever noticed that every bridge in Myth either has a one-cell-wide row of "water" beside it as part of the model or has a one-cell-wide edge to the bridge?  This is done to cover the raising of the mesh from water height to bridge height.  It pays to be aware of the issue when making your model - the mesh can't just jump from zero to 3 in height without a one-cell transition.

 

 

Step 4: Amber

 

Now that you've set your model up, its time to get the proper textures done and imported to your collection.  I've found the best way of doing this is, once the textures have been perfected in Photoshop or wherever, use GraphicConverter's "Convert" function to make a Superpalette of all the images, then convert them all to that palette.  Open the model's collection in Amber and replace its images with the new ones.

 

Texture Minimisation

 

Getting the new textures in was the easy part.  The next most important thing is to reduce instances where textures are duplicated.  For instance you may have used the same bitmap for more than one material - planar for both X and Z axes for instance.  You don't want two copies of that texture uploaded to the graphics card & thus slowing things down, so you need to reduce it to just one.  You do that by opening the appropriate sequences in Amber.  From the bitmap list remove one of the bitmaps and it'll vanish from one of the sequences.  Then drag the remaining bitmap to the sequence that lost its image.  Once that's done you'll have two sequences both using the same bitmap.

 

Collection Sharing

 

What if instead of one model though you're making a series of them, all similar in appearance.  For example, I made 3 barrel models - one with two barrels, another with 4, and another with 8.  They all had the same textures, yet creating the models using the above process results in three separate collections, each with its own copy of the images.  To explain why this is bad, let me quote Iggy from the Apathy documentation, talking about the Chimera castle...

 

"... it tended to slow people's machines to a crawl.  This wasn't because the myth engine was incapable of handling such extensive use of scenery models, but rather that they (Badlands) designed it (the castle) way too bloated for its own good.

 

If you open up and study the collection files attached to that castle, you'll find about 5 meg worth, most of it redundant data with less than 500k actually unique.  That means 4.5 meg of it was bloat and could be cut out with some collection sharing.  This work takes less than an hour to do and can be done with a hex editor.

 

If you think about it, the incredible lag associated with looking at this castle for the first time in the myth engine is the performance equivalent of asking myth to reload the entire level texture map again, except its while the game is running and you are playing.  Myth does not precache these textures, which is a good reason why they need to be pretty small.

 

By sharing the collections you can reduce the collection files to 1/10th their size, and it will look exactly the same as the 5 meg version, only it will play a lot faster.  You could even add detail, go back and add in another 500k of unique textures and make the castle look way more pretty and detailed than the original while keeping the framerate high."

 

Basically they had a lot of duplicate images in a whole bunch of collections, one for each model that makes up the castle.  These resulted in a performance hit in Myth.

 

No-one wants their models to cause lag, hence the need for collection sharing.  But how exactly do you go about making this happen?  Fortunately its pretty easy...

 

Hex Edit your Geometry Tags

 

Fire up Fear and open one of the collection reference tags for your models.  Note its 4 letter ID.  Close Fear.

 

Now start Hexedit and open one of your geometry tags.  Go to offset (hex) 00000044.  Its the 5th line from the top, four spaces in from the left.  You'll see a 4 letter ID.  Change it to that of the collection reference you noted above (if its not already the same).  Do this for all the geometry tags you've created that are to share this collection.

 

Now open your test mesh (you know, the one you've dropped your models onto to see that they work) in Loathing and see if it loads.  If it complains about textures not being in sequences, then you need to open that collection in Amber and make some extra sequences.  Pretty straightforward.

 

More tricky is whether the right textures are still being used in each model.  If not, you need to add extra views to the sequences.  Here's how to go about it...

 

Adding Views

 

I've found the easiest way is to take a shotgun approach.  Make all textures available in all sequences.  For me I opened my barrel collection and saw how many textures there were - in this case there were 4, and I had 4 sequences.  The problem was that my models used them in a different order, resulting in some of them looking wrong once I'd done the Collection Sharing.

 

So instead of trying to work out which extra textures needed to be in which sequence, I decided to add them all to each sequence.  I firstly made each sequence have 4 views.  Then I dragged each bitmap into each of the sequences, resulting in every sequence having all four bitmaps in it.

 

Then in Vegas I load each model in turn.  I clicked on whatever surface had the wrong texture, and then hit Command-minus to cycle through the textures until the right one was shown.  Once that was done, save and exit then verify it looks right in Loathing.  Pretty simple really.

 

 

Step 5:  Experience & Feedback

 

There are more things I've learned but I still have a long way to go towards mastering this process.  For instance I have no idea how to create an animated model yet.  What I wanted to do was show the process to follow and the traps to avoid.  Knowing these things can save you hours of frustration and perhaps even prevent you from giving up in despair.  Maybe you’ll even be inspired to give model making a shot, when previously you were too unsure of how to go about it.  Granted its a far from easy process in its entirety, but each step isn't really that complex.

 

You'll note there are other menu items in Vegas that I haven't touched on.  Mostly this is because I haven't had opportunity or cause to mess with them yet.  This is where experience comes in.  Once you start making models you could well push the boundaries in different directions to what I have, and perhaps even discover things that you'd like others to know about.  You may also be an expert reading this, scoffing at my laborious ways of doing things & wondering why I didn't include sections on various facts you know to be important.

 

Well, this document is for the Myth community, and I really welcome any contributions anyone would like to make.  If you have any corrections or additions then I'd love to hear from you!  Please feel free to email me - iron(at)projectmagma.net - and I'll see that this is updated.

 

Cheers ... and HF :)