3D Model Conversion for Trackmania United
Disclaimer: This tutorial is meant as a guide and not as the only way of achieving the goal. My experience with modeling is completely self taught from other tutorials on the web. I learned this stuff so that I could convert and create car models for Trackmania Sunrise. I only use 3D Studio Max, version 7. Some of the terms used here are from Max, please use the help for explanations.
Please direct any comments or suggestions to trick@ugghost.com
This tutorial is still a work in progress as of 03/09/2008. Please check back often.
Requirements:
Editable meshes with the names...
These objects are required
sBody - the parts of the model that can be repainted in the in-game painter,
this is usually the body of the car).
dBody - the interior, the window rubber, the lights, the front grill, all
other except glass and wheels).
gBody - all parts that will be shown transparent in the game, windows,
sunroof, headlight and taillight covers).
dFLWheel - the front, left wheel part that cannot be painted in the in-game
painter, this is usually the tire).
sFLWheel - the front, left wheel part that can be painted in the in-game
painter, this is usually the rim).
dFRWheel - the front, right wheel part that cannot be painted in the in-game
painter, this is usually the tire).
sFRWheel - the front, right wheel part that can be painted in the in-game
painter, this is usually the rim).
dRLWheel - the rear, left wheel part that cannot be painted in the in-game
painter, this is usually the tire).
sRLWheel - the rear, left wheel part that can be painted in the in-game
painter, this is usually the rim).
dRRWheel - the rear, right wheel part that cannot be painted in the in-game
painter, this is usually the tire).
sRRWheel - the rear, right wheel part that can be painted in the in-game
painter, this is usually the rim).
Wheel suspension parts (optional)
dxxHub - xx can be FL,FR,RL,RR (the 'kingpin').
Must be used to make the other suspension parts to work.
dxxArmTop - xx can be FL,FR,RL,RR (an upper control
arm)
dxxArmBot - xx can be FL,FR,RL,RR (a lower control
arm)
dxxArmDir - xx can be FL,FR,RL,RR (the steering rod)
dxxSusp - xx can be FL,FR,RL,RR (the spring/shock absorber)
sxxGuard - can also be dxxGuard (xx can only be FL or FR)
dxxCardan - rear wheel driveshafts (xx can only be RL or RR)
Other
pPilHead - the head of the
driver, which will 'bauble'.
ProjShad - a cone shaped, unseen
mesh that will be used to project a shadow on the road below the car, uses the Projshad.dds file.
LightFProj - a cone shaped object,
which will not be visible in game, that is used to project a light on the road
in front of the car, uses the default CarLights.dds file.
8 Helpers/Dummys with the names...
LightFL1 and LightFR1 (front lights, left and right, big flare)
LightFL2 and LightFR2 (front lights, left and right, small flare1)
LightFL3 and LightFR3 (front lights, left and right, small flare2)
LightRL and LightRR (rear lights, left and right)
The scale of size of the model should be 0.1% from actual size. This means that a car with a 2800mm wheel base and a track width of 1500mm will scale down to a 2.8mm wheel base and 1.5mm track. A wheel with a 660mm diameter will have a scaled diameter of .660mm and be placed with its center .330mm above the x,y-axis plane. Be sure that the 'center' of the model is placed as close to the center of the scene as possible. This will keep most scaled models within the limitations of the 'max box'. The maximum size of any object in the model cannot exceed 6mm long (y axis), 3mm wide (x axis), and 2.5mm high (z axis).
The game supports a 'low poly' model for decreased bandwidth connections and better performance on slower systems. The 'high poly' model is displayed when a player chooses to show all models high. The overall number of vertices cannot exceed (~100,000) for the 'high poly' (MainBodyHigh.Solid.gbx) and 3,600 for the 'low poly' (MainBody.Solid.gbx).
Place the pivot of each of the required objects at the object's center. All other objects must have their pivots placed accordingly. Note: Versions of Trackmania prior to Nations/United had fixed wheel positions. That is the pivot of each wheel object was always placed in the same place (no matter which car you chose). The different environments had different wheel positions. The trick here is to place the wheel object pivots of your model at these 'fixed' locations.
For the users of 3D Studio Max, whenever you move the pivot of an object, you must reset the Xform modifier of that object before you export to .3ds file.
UWV
Mapping
The dBody, gBody, and dXXWheel objects will use the Details.dds as their texture file. The sBody and sXXWheel objects will use the Diffuse.dds as their texture file. The gBody object should be mapped in an area that corresponds to an empty area of the mapped details. The same goes for the dXXWheel objects, but they can be all mapped in the same area. Mapped parts of the dBody object can overlap in the details mapping. The sXXWheel objects should be mapped to an area that corresponds to an empty area in the diffuse mapping. Mapped parts of the sBody object should not overlap in the skin mapping.
Exporting
Select all of the objects. From the file pull-down menu choose Export Selected. You must export to a .3ds file.
Importing the model for use in the game
From the game launcher, select Help, then Custom data, then under Data importer, choose Car geometry. An 'Import car geometry' dialog will appear which allows you to browse to a folder and choose the .3ds file you want to import. Click open to import the file. A new file is created in the folder where the .3ds file resides. It will be given the extension of .Solid.Gbx. This importer does not return any errors that might be in the .3ds file that you choose. You won't know if there is a problem until you try to see it in the game.
The Car.Zip file
The car zip file contains the files needed to
make the car appear in the game. The required files (mainbodyhigh or mainbody
may be used) are:
Icon.dds (icon displayed when
choosing a vehicle)
Diffuse.dds (the skin and rim
texture map)
Details.dds (the details, tire
and glass texture map)
MainBodyHigh.Solid.gbx (the
model for high performance and bandwidth)
MainBody.Solid.gbx ( the model
for low performance and bandwidth).
The optional files needed to support other
features of the game are:
Horn.wav or Horn.ogg (a
sound file that will be heard when the player presses the 'horn button')
EngineIdle.ogg (engine idle
sound file).
EngineLow.ogg (engine low rpm
sound file).
EngineMid.ogg (engine mid rpm
sound file).
EngineFast.ogg (engine fast
rpm sound file).
ProjShad.dds (a texture file,
that gets projected on the road, under the model).
Illum.dds (a texture file,
that will brighten up chosen details in the darker environments).
DetailsDirty.dds (a texture
file, that will gradually show, over the details, as you progress through the
dirtier environments).
DiffuseDirty.dds (a texture
file, that will gradually show, over the diffuse, as you progress through the
dirtier environments).
Credits.txt (a text file
explaining the origins of the model and texture files).
Trouble Shooting
If you experience a problem, things to check are: spelling of object names, vertices count, scale, pivot and xform. Check the spelling of the file names contained within the zip folder. The vertices count might increase after you've exported to 3ds. The best way to check the vertices count after you export is to import the 3ds file into an empty scene and look at the file /summary info dialog.
Tips and Tricks
The best tip I can give is to collapse the modifier stack after every successful modification (resetting xform, unwrapping the uvw's, symmetry, mesh smooth). Before exporting to .3DS you should only have an editable mesh showing in the modify tab.
The trick with working with any 3D program is the ability to move your view around at will. You should be able to zoom in and out and move your scene around to achieve proper positioning for the modifications you want to do. Practice this and perfect it and you won't be so frustrated with making models.