MD2 export from 3d Studio Max
→
Return to content tutorials
Prerequisites
- 3d Studio Max starting from version 9.0
- QTip MD2 exporter for 3D Studio Max (license can be purchased at www.qtipplugin.com)
3d Studio Max model creation
Create and animate a model in 3d Studio Max. The animation shouldn’t be bigger than 100 frames. The polygon count of each model should be as low as possible. Each model should have its height at around 200 millimetres. (If the unit size in your 3ds max setup isn’t millimetres, you can adjust it through the menu “Customize” => ”Unit Setup”).
- Apply colours, textures and materials to the model as you like. Now your Model should look something like this:

Figure 1: Example model
- Add lights to the scene. Place them so that the model is lit all around.
Preparation for export
- Select the whole model (only the geometry of the model) and click on “Modifiers” => “UV Coordinates” => “Unwrap UVW”

Figure 2: Preparation for export I – Unwrap UVW
- Now click on “Edit” in the ”Modify” label (Figure 3 left)

Figure 3: Preparation for export II – Edit UVWs
- The “Edit UVWs” window will pop up. Click on the button as shown in Figure 3 (right). Select all polygons in the “Edit UVWs” window e.g. by clicking and dragging with the mouse to open a selection frame.
- In the “Edit UVWs” window click on “Mapping” => “Flatten Mapping”. A new window will popup which can be closed by pressing “OK”. The “Edit UVWs” window should now display a similar view as shown in Figure 4.

Figure 4: Preparation for export III – Flattened Mapping
- Close the “Edit UVWs” window.
- Select the whole model again in case it is not selected and click on “Rendering” => “Render to Texture”. A new window will pop up (see Figure 5).
- Under “General Setting” tab adjust “Path” where you want to save the final texture for your model.
- Under “Objects to Bake” tab check “Use Existing Channel”.
- Under “Output” tab click on “Add”.
- Select “CompleteMap” and Click “OK”
- Click on “256x256” (see Figure 5 right).

Figure 5: Preparation for export IV – Render to texture
- Finally, click on “Render” and afterwards press “OK”.
- Now several texture layers have been created and saved in your output folder. They should look similar to the ones shown in Figure 6.

Figure 6: Preparation for export V – texture layers
- Next combine your textures by just overlaying them with your favourite Image-Processing tool.
- The result should look similar to Figure 7.

Figure 7: Preparation for export VI – combined texture
Adding Texture to the model
- Open the “Material Editor” of 3d Studio Max and select a new standard material.
- Add a “Bitmap” layer to the diffuse channel of the material. In the dialog for image selection, choose the combined texture created before (see Figure 7).
- Apply the material to the whole model.
Create a frame list file
- Open a text editor (preferably one that provides line numbering).
- Create line entries for each frame of your animation, labelling frames which belong to one animation with the same label. The exporter will label the frames according to the tags specified in the frame list file. Later on SDK commands can refer to these labels for animation triggering (SDK Function call startAnimation(sceneID, animationName))

Figure 8: Example frame list file
Figure 8 shows an example frame list file for an animation of 20 frames in sum where
- Frame list:
- Frame 1-5 are idle frames
- Frame 6-10 hold a move animation
- Frame 11-15 hold a rotation animation
- Frame 16-20 are idle frames again
- Save the file as a text file.
Export Model to MD2
- Select the whole model (only the geometry of the model).

Figure 9: Export to MD2 – configuration dialogs
- Adjust settings as shown in Figure 9 (left).
- Select “Utilities” => “More”
- Click on “QTip” and press “OK”
- Click on “Import new frame list” and select the frame list file which was created in the previous step.
- Setup the Export Dialog like shown in Figure 9 (right).
- Click on “Export all frames”.
- A MD2-Model and its texture named “tris.bmp” should be exported now.
- As a last step, rescale this bitmap texture to 256x256 and save it again as .bmp.
OBJ export from 3d Studio Max
3d Studio Max has a built-in OBJ exporter, which can directly be used.
→
Return to content tutorials
--
SupportMetaio - 2011-12-02