Torque Game Engine DocumentationVersion 1.3.x |
This documentation explains how to use the max2dtsExporter with 3D-Studio MAX4. MAX3 users please note that most of the material contained herein also applies to MAX3 but there may be some differences.
A file pack containing all example files referenced in this documentation is available for download: torque_max_filepack.zip (1.8 MB)
File Pack Contents:
dtsGlobal.cfg
/player folder: Contains files for player export tutorial:
player.cfg: Default configuration file for player export.
player.cs: TorqueScript file to load the example character in the Torque Demo
player.png: Example player texture.
player.max: Example player model. ("Green Guy")
/simpleshape folder: Contains files for simpleshape tutorials:
SimpleShape.max (versions 1 thru 6): Tutorial starting points.
SimpleTexture.png, SimpleTexture4.png: Textures for tutorial shapes.
/max3 folder: Contains files specific to 3D Studio Max 3 Setup:
/comSkin folder: Contains ComSkin update files.
max2dtsExporter.dle: 3D Studio Max 3 compatible export plugin.
unMessDTS.exe: Utility to fix T2AutoDetail problems.
/max4 folder: Contains files specific to 3D Studio Max 4 and 5 Setup:
max2dtsExporter.dle: 3D Studio Max 4 and 5 compatible export plugin. (Thanks to Joe Maruschak)
/max6 folder: Contains files specific to 3D Studio Max 6 Setup:
max2dtsExporter.dle: 3D Studio Max 6 compatible export plugin. (Thanks to Samme Ng)
adjustLODs.mcr: A macro script that provides a GUI for setting LOD using multires.
All the .max files are tested with 3D Studio Max 4 only. Mileage may vary with other versions.
Place the version of 'max2dtsExporter.dle' that matches your version of Max in the 3DSMAX 'Plugins' directory. Please make sure that you download and install the plugin for the version of MAX that you are running.
There was apparently a bit of code change with the Multires.dle plugin for Max from release 4 to release 5 and 6. This change unfortunately causes the DTS Exporter to generate a fatal error and crash the program. There is currently no updated R5 version of the exporter so you are forced to use one of the following two options:
Get a copy of the Multires.dle file from Max R4 and copy it into your STDPlugs directory in R5 (overwriting the current file). Take special note that anyone who tries to open an R5 file that uses the R4 multires code (and does not have the R4 multires.dle installed) will end up with fatal errors when they try to load the scene or if they try to import your multires mesh.
Manually generate your detail meshes as explained in the DTS Exporter documentation.
Be advised: The max 6 exporter provided in the filepack is not an official GarageGames exporter. It was generously created by Samme Ng, and has not been as vigorously tested as the other versions of the exporter. While many users have had success with it, its functionality is not guaranteed.
This document assumes a certain level of familiarity with 3DStudioMAX versions 3 or 4. The majority of the information here is presented to allow users to become familiar with "Torque" specific tools and techniques. Where appropriate, certain basic information about how to work within 3DSMAX has been included.
The DTS exporter is a utility and can be found in the 3DSMAX utility panel.
To access the utility, click on the Utility panel and press the more button. This will bring up a new window. Within the new window, there will be a list. Scroll down the list and select the "DTS Exporter Utility".
You may wish to add "DTS Exporter Utility" to your default set of buttons in your utility panel. For information how to add a new button to your Utility set, please consult your 3D Studio Max documentation or help file.
The exporter uses 3D Studio Max's units to determine the size of the object. One 3D Studio Max unit is equal to one meter in the game. It does not matter if you have your unit scale set to centimeters, inches, or miles. One of 'whatever' is equal to one meter in the engine.
It is important that things be scaled correctly, from the beginning, and not with an added modifier later. Changing the scale of your model once you have rigged it for animation is not possible, and will require you to reconstruct you models bones and reattach the skin.
Prior to animating, it is possible to resize your model and adjust its facing using the "Box Trick" the section called “Resetting Transforms: "The Box Trick"”.
Consult your 3DSMAX documentation to set up scale properly.
The exporter is for the most part stable. Like all 3DSMAX plugins, it can crash. If it is constantly crashing on export with ALL shapes, the error likely lies not in the exporter, but in your system configuration.
The exporter generates a dump file named dump.dmp in the directory you are exporting to. If your export fails, check the dump file first to see where it is crashing in the export process. Most of the time it is something simple, like spelling the word "bounds" wrong.
If a particular model is continually crashing on export, corrupted meshes, bad texture vertices, or double faces in the model might be the cause. Check your dump file, and if it stops on a particular mesh, do a test by deleting it in your scene, then try to export again.
After you have successfully exported a model, check your shapes in the showtool (-show switch) first before bringing them into your game. If it works in the showtool but not in the game, the file exported properly and the problem probably exists elsewhere.
The requirements of a game may be different than the requirements to get a shape exported. What is required for it to work 'in the game' is not the same as what is required for a shape to export. If your game requires certain nodes be present, a certain naming convention, or certain parameters set a certain way, then get that information and set up the shape accordingly. If your shape works in -show but not in the game then it is most likely not the exporter that is at fault.
Some of the tools and techniques outlined in this document (especially the animation setup and usage) require a paradigm shift about how one thinks of setting up shapes. The engine supports a very flexible and powerful Non Linear Animation (NLA) system. It is hard at first to grasp, but with patience one can come to understand it and utilize it to its full potential.