Torque Game Engine DocumentationVersion 1.3.x |
This document will provide introductory tutorials for using the Maya2DTS exporter with Maya 5. The information presented here also applies to Maya 4.5, but there may be some differences. Maya Personal Learning Edition (PLE) is not supported.
Detailed information regarding the Maya2DTS exporter is provided in the Maya2DTS Reference Guide located at the following URL:
Presently, the Maya2DTS exporter is only available for Maya 4.5 and 5 on Windows. OS X and Linux versions are currently in development. However, with the exception of the actual exporting of shapes and animations, everything presented in this document can be applied in Maya for any platform, e.g. modeling, texturing, animation, and scene setup.
A File Pack containing all example files referenced in this documentation is available for download at the following URL:
File Pack Contents:
maya2dts\maya45\maya2dtsExporter.mll: the exporter plugin for Maya 4.5 (Windows only)
maya2dts\maya50\maya2dtsExporter.mll: the exporter plugin for Maya 5 (Windows only)
maya2dts\maya60\maya.mll: the exporter plugin for Maya 6 (Windows only)
dtsUtility.mel: utility for simplifying scene setup (cross-platform)
IMFPng for Maya 5\ IMFPng.dll, libpng12.dll, zlib1.dll: PNG support files (Maya 5.0 for Windows only)
sample_player.cfg: sample configuration file
dtsGlobal.cfg: list of all configuration options and example usage
simpleShape: tutorial files
simpleBox: tutorial files
This document assumes a basic level of familiarity with Maya. The majority of the information provided here is designed to help users become familiar with Torque-specific tools and techniques. Where appropriate certain basic information about how to work within Maya has been included. Information on general usage of Maya can be found in Maya's help files (pressing F1 on the keyboard will open them in the user's default web browser).
The exporter is for the most part stable. Like all Maya 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 the dump file, and if it stops on a particular mesh, do a test by deleting it in the Maya scene file, then try to export again.
Meshes without texture coordinates will not work correctly in the game. Make sure you have UV coordinates on the meshes you are trying to export.
Also, all meshes must be triangulated in order export. Non-triangulated shapes can cause the exporter to crash.
After a model is successfully exported, 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 Non Linear Animation (NLA) system. It is hard at first to grasp, but with patience, one can understand and utilize the tools controllably.
This document will take you through the steps of setting up some simple shapes that will familiarize you with the exporter and how it works, and then will move on to more complex topics.