Section II: Exporting Characters


General Information and Tricks of the Trade:

Building a character. There are good references out there. I suggest "Modeling a Character in 3DSMAX" by Paul Steed.


(go to Amazon.com)

Here is an example file of a completed character model. Both the model (player.max) and the skin (player.png) are located in the documentation file pack.

Make sure that your unit scale is correct (see General Information in the beginning of the Documentation) and that the character is facing forward (looking down the positive Y axis). If you go to Front view in 3DSMAX, you should be looking at the characters backside.

Create your bounding box. As above make sure it is aligned correctly (create it in either the top, perspective, or user view).

Check the mesh for holes and double faces. I do this by using the STL check modifier, the use of which is covered in your 3DSMAX documentation. This will allow you to see if the mesh has any holes or double faces. If it does, fix them before hooking up the mesh to the bone system.

Make sure your mesh transforms are clean. If you have scaled the shape or used mirroring any portion of the mesh during construction, reset the transform.

There is a foolproof way to reset the transform of a mesh in 3DSMAX. Most of the built in methods for resetting the transform are not as clean doing 'The box trick".


Resetting Transforms:

Make a box, put it at the origin of the bounding box (use the align tool) and then collapse the box so that it becomes an editable mesh. Go into the modifier panel and click on the "attach" button, then click on your character mesh to attach it to the box that you just created. The character should now be a part of Box01. Choose >Select by Element> select the box shape and delete it.

Your character mesh has a brand new transform. Now you just need to rename your character mesh so that it conforms to the export parameters.

It is preferable to do this then to use reset x-form. Reset x-form does it's work by sticking a modifier in the 3DSMAX modifier stack. This adds additional data that must be interpreted by 3DSMAX in order to output the correct data, and it is not always correct or accurate. It works, but it has proved problematic in the past on certain shapes.


Skeleton Creation:

Create a skeleton for the character and add any necessary nodes that are required for the game. There is nothing in the DTS exporter that demands anything to exist in the scene (except a bounding box). In this example, a Character Studio Biped is used for the skeleton, but you can use 3DSMAX bones, boxes, dummies, or whatever.

Biped is not required to work with the Torque engine.

The game (take for example the demo) may require your character to have certain nodes contained in the shape in order to function properly. These usually consist of camera and eye nodes, mount points for weapons, etc…

If you are just starting out with characters for the Torque Engine, it is advisable that you use the default player skeleton. The naming convention and structure of the skeleton is visible in the following image.


click for larger version

The bones that are not included in the schematic (they were omitted to fit the image on one screen) follow the default Biped naming convention.


Exporting the DTS Shape:

Export it as a DTS. (Choose Export>Whole Shape in the Exporter Utility). Name it appropriately. If you are going the be putting this shape in as a player, it will simplify things if you name the shape player.DTS. Make sure you rename the default player shape to player.DTS.old so you don't overwrite it.


UnMessDTS:

The T2Autodetail scheme introduced at the end of Tribes 2 does not work with deformable meshes. In order to get them to function properly in the game, you must turn off the new detailing scheme. Unfortunately, the last code drop GarageGames received from the Tribes 2 team happened before the switches introduced into the exporter to accomplish this got into the source.

There is a little utility called UnMessDTS that reverts the shapes back to the 'old' way of doing things, and they then work fine in the game engine.

The unMessDTS.exe utility is included in the documentation file pack.

Here is the usage.

From the command line:

You should now have a fully functioning and optimized shape and should be ready to move onto animation.