Torque Game EngineTorque Game Engine Documentation
Version 1.3.x

Getting Started

Installation

Make sure Maya is not running.

  1. Install the Maya2DTS exporter plugin

    Place the file maya2dtsExporter.mll in the user plugins directory:

    • Windows: My Documents\maya\5.0\plug-ins

  2. Install the dtsUtility MEL script

    Place the file dtsUtility.mel in the user scripts directory:

    • Windows: My Documents\maya\5.0\scripts

    • OS X: Home folder, Library/Preferences/AliasWavefront/maya/5.0/scripts

  3. Install PNG support files (for Maya 5 for Windows only)

    Place the file IMFPng.dll in the Maya image plugins directory:

    • C:\Program Files\AliasWavefront\Maya5.0\bin\plug-ins\image

    Place the files libpng12.dll and zlib1.dll in the Maya bin directory:

    • C:\Program Files\AliasWavefront\Maya5.0\bin

Note

At this time, PNG support in Maya is read-only, i.e. Maya will not output PNG files via the renderer.

Note

IMFPng is written by W.J. van der Laan. Complete source code is available here. See the included readme file in the File Pack for more information.

All of the necessary files are now installed.

Setting up Maya for Torque

Because the Torque Game Engine has very specific requirements for its data, it is necessary to set up Maya to work with those settings. This section will walk you through loading the exporter, setting up dtsUtility, and configuring Maya to correctly work with Torque projects.

Loading the Maya2DTS Exporter

Ensure that the Maya2DTS exporter is installed and loaded:

  1. Launch Maya if it is not already open.
  2. Open the Plug-in Manager (Window > Settings/Preferences > Plug-in Manager).
  3. Make sure that both loaded and auto load are enabled for maya2dtsExporter.mll.

								Plugin Manager

The Maya2DTS exporter is now loaded and will auto-load each time Maya is launched.

Setting up dtsUtility

The dtsUtility window can be opened at any time by running the following command from the Command Line or the Script Editor:

dtsUtility;


								Command Line


								Script Editor

This is what the dtsUtility window looks like:


								DTS Utility

Typing the command is fairly easy, but it can be quicker by using a custom shelf button.

To create a shelf button for quick access to dtsUtility.mel:

dtsUtility;

  1. Open the Script Editor (Window > General Editors > Script Editor).
  2. In the input area (bottom half of the window), type in the following command:
  3. Select the text with the left mouse button.
  4. Using the middle mouse button, drag the text to the shelf to create a shelf button.

    
										Shelf
  5. Open the Shelf Editor.

    
										Shelf Editor
  6. Add an Icon Name to shelf button to make it easier to identify.

    
										Shelf Editor

The dtsUtility shelf button is now created. Clicking the button will bring up the dtsUtility window.

Working Units

Next, set up Maya's general application preferences for Torque scenes. These are set in the Settings section of the Preferences Panel (Window > Settings/Preferences > Preferences).


								Settings

The Torque Game Engine uses the unit scale of 1 unit = 1 meter. Maya's default working units is 1 unit = 1 centimeter. This is not a problem as long as the user builds shapes accordingly. For example, a 2 meter tall character in Torque should be 200 units tall in Maya. However, to simplify general setup, it is recommended that users set Maya's linear working units to meter.


								Linear Units

Also, Torque generally uses 30 frames per second (fps) for animations, but Maya's default is 24 fps. The user should set Maya to use 30 fps as the working time unit.


								Time Units

Once the preferences are set, click the Save button in the Preferences window to save the settings.

You can also configure working units from the DTS > Setup submenu in the dtsUtility window.

Setting Up Project Workspaces

Maya organizes various files associated with scene files into projects. A project is a collection of folders for different types of files. For example, a project workspace may contain separate directories for scene files, textures, rendered images, and exported data.

Maya's default project directory is located in the user's home directory:

  • Windows: My Documents\maya\projects\default\

  • OS X: Home folder, Documents/maya/projects/default/

While it is not mandatory to set up custom project workspaces, generally, it is advised that users set up unique project directories for different tasks. For example, there would be one project workspace for a character model, another one for full body animations, and yet another one for blend animations. This will allow the user to load unique configuration files for each shape or animation. Also, users will be able to specify default directories for exporting DTS and DSQ files (Torque shape and animation files).

To create a new project workspace:

  1. Open the New Project window (File > Projects > New).
  2. Specify a Name and Location for the project workspace directory.
  3. Optional: Specify directories for exportDTS and exportDSQ. If no directories are specified, then the directory containing the Maya scene file will be used.
  4. Optional: Specify directories for scene files, textures, etc.
  5. Click the Accept button.

								Project

The project workspace is now created.

To load a project, go to File > Projects > Set. Then choose the project directory.

To edit a project, go to File > Projects > Edit Current.

Using project workspaces might be odd for many artists new to Maya, but once one becomes accustomed to working with them, project workspaces can be invaluable tools in the art production workflow.

Maya is now properly configured to work with Torque projects.

Custom exportDTS and exportDSQ locations can be set in the Export Settings dialog box.