Okay, so you now have all the programs set up. Today we’re going to make an extremely simple model, just to get some practice at using all the different programs. So start by opening up Gmax. Yesterday we installed the Tempest pack to go with Gmax, but don’t run that – it adds a horrible interface to Gmax and a load of tools for mapping with. Just launch the vanilla Gmax executable, it will still have the ability to export to MD3.
The interface can be quite overwhelming at first, there’s a huge array of buttons presented. Don’t worry, we won’t need many of them today. We want to make a sphere, so look at the panel on the right. Make sure that 1: The create panel is selected, 2: Geometry object is selected, 3: Standard primitive is selected in the dropdown. Then click on the button indicated by 4, sphere.
Then look down to the parameters, expanding it if necessary. The only parameter we need to adjust is the number of segments – 32 will generate a large amount of polygons, which isn’t good for quake models. Set it to 12 as in the screenshot, then click and drag in a viewport to create it.
Now we will quickly skin it. Follow the arrows in this screenshot:
1: Select the modifier panel tab(the second one along), 2: Click the modifier list dropdown, 3: select UVW mapping from about half way down.
We’re gonna have to go a little hands-on here, because the spherical mapping puts vertices on the skinmap that touch the very bottom of the skin. This will cause QMe to crash later on, so apply the “Unwrap UVW” modifier, in the same way as you applied the UVW mapping.
In the parameters box, click the edit button and the following box will appear. Drag to select the vertices shown in the picture. The use the move tool to drag the up a small amount, so they are no longer on the edge of the square. Close this box once you’ve done that.
Now the sphere is skinmapped, but we can’t tell as we haven’t got a skin. So download
and extract it into your qmodels directory you set up yesterday. Go back into gmax and find the material editor button.
The button looks like this, and is on the top toolbar on the far right.
Once that’s done, you’ll return to the material editor, which has been updated with the checked map.
1: Click on “Apply” to apply the material to the sphere, which should still be selected in the editor.
2: Click the checked blue and white cube indicated. This turns the rendering of the map on. You should now see the red and white check pattern applied to the sphere in the 3d perspective viewport. If this viewport is just drawing a wireframe, right-click on the word “Perspective” in this viewport and select “Smooth + Highlights” from the menu.
Now, the model is complete, this is all we will do with it for today. You might want to get used to using an important set of the gmax tools before we finish. Being able to move the camera round is recommended. Middle-click and drag to move the camera around, the scroll wheel zooms in and out. Holding alt while dragging allows you to rotate.
If you get lost, press this button to restore the view to the objects in the scene. The button is in the panel of view buttons in the bottom right of the screen.
When using Quark for converting the md3 to mdl, the insistence on saving to the same folder as the skin we used in gmax was a necessary part of the conversion process. If you use md3tomdl instead, you can save elsewhere.
OK, now time for the export process. Go to File -> Export…
Find the qmodel directory, so that the md3 is saved in the same folder as its skin. Save it as sphere.md3.
The export dialog box pops up. You’ll want to tell it to export just frame 0 as indicated by the arrow. Ensure that all the other options displayed agree with this screenshot. Then click “Export Now”. Once you’ve exported it, you can exit gmax. If you like, you can also save the file in gmax format. Although this model is not really valuable as a gmax file, most of the time you will want to save things as gmax format files until they are basically finished, and export at the end.
Again, the advice now is to use md3tomdl instead of Quark.
The next step of the conversion process should be nice and smooth. Open Quark, go to file->open and load the newly exported md3. Then just go to File -> “Save as file…”. Select Classic Quake .mdl File (*.mdl) from the Save as type dropdown. Then save and close.
Margin note 4
The next part of the tutorial advocates using QME to move and scale your model correctly. For a lengthy text on when I don’t recommend this, try the modelling pipeline article. The main point is that moving and scaling your model can be done just as well from GMAX, and doing it once in GMAX saves you doing it each time you want to change something about your model that can’t be done without recreating the md3. You have to just trust that 1 unit in GMAX will turn into one unit in Quake, and place the model according to the GMAX origin.
Now open up this model in QME. The model is already suitable for use in quake, but we are going to use QME to scale and translate the mode. It’s usually more convenient to do this once the model is in mdl format, since you can test the model out in-game and tweak it without having to go through the whole conversion process. In lots of cases you won;t lose accuracy in the model by doing this, I’ll detail when and why in a later article on the way .mdl are stored.
Go to View->Model Properties or the equivalent button on the top toolbar. This dialog appears. 1: Select the eye position tab, 2: set all the values to 0. This helps centre the model, but has no effect in-game to my knowledge.
Look at the toolbar on the right of the screen, and 1: press the object button, then select the sphere in the viewport with it.
2: Either set all of it’s “Move” value to 0 here, or drag it in the viewport until it is roughly centred.
3: Scale it so it roughly takes up half of the grid. For my sphere I found a value of 0.4 achieved this. The scale you need to use will depend on how bit you made the sphere in gmax. This isn’t all that important today, it’s just to familiarise you with how to do it in future, for a monster perhaps.
Then save the model again, being sure to save it in mdl format, not mdo. So we’ve got our model ready to test out, let’s put it in a mod. For this quick test we’re just going to replace an existing model in the game, so make a new folder called “mtest” in your quake folder, and a “progs” folder inside that. Copy sphere.mdl into “progs” and rename it to g_rock.mdl. Start your favourite flavour of Quake with -game mtest, and load up e1m3. Assuming everything has worked right, you should find the following just around the corner:
It’s quite possible I’ve failed to document some critical step over the past two days, so if you get stuck at some point along the way, please e-mail me.
Well, unless you’re planning to make a quake mod remake of marble madness, being able to make mdl spheres may not seem that useful. Never fear, for tomorrow we will be looking at skinning a weapon model!