Torque Game Engine Tutorials

 GarageGames.com Doc Version 1.0.x 
 

Basic Modellers Guide to the Torque Game Engine

The following guide is to assist developers in creating shapes for use in the Torque Game Engine.


Getting Started

First off this guide assumes some basic knowledge of 3D modelling, and specifically using 3D Studio Max.

Secondly all the information provided in this guide is based on experimentation with the Torque Game Engine, and looking at the Tribes2 SDK models, so there may be better ways of doing things, or even elements you believe have been mis-interpreted. If this has occurred, please ensure you provide corrective information to GarageGames staff, so this can be corrected in later releases.

Other than the first two caveat, I hope you gain some useful information from the following guide... and go forth and model!


What can I hope to get from this guide

Hopefully enough information to begin building new models for use in the Torque Game Engine, and your game creation. The purpose of this guide is to provide a step by step walk-through of building a crate, a pistol and later a character model. The character model will be able to make use of the pre-existing animated sequences available in the Torque Game Engine.

All of these models are not fancy (in fact they are butt ugly, as they are nothing more than a bunch of cubes), however the goal here is to instruct you in the creation of these object from the ground up. This will give you a better appreciation of how thing can be built for use in the Torque Game Engine.

What will I need

  • At a bare minimum
    • 3D Studio Max version 3.1 (Other versions are not currently supported by the MAX2DTSExporter plugin)
    • MAX2DTSExporter.dle (copied into the \3DMAX\PLUGINS directory). Check the accompanying Torque Game Engine documentation for further information on the compiling and the use of the MAX2DTSExporter plugin.
  • Building Player Shapes, and LOD
    • Character Studio, supported by 3D Max version 3.1
    • MultiRes plugin available from Digimation


What are Shapes

Shapes in the Torque Game Engine are the denoted by the file extension ".DTS", and represent the various objects you will create for use in game. Trees, Rocks, Weapons and Player Model are all examples of Shapes in the Torque Game Engine.

General information

Some useful information which may help when modelling Shapes in the Torque Game Engine.

  • Scale to use

    The sizes in the Torque Game Engine are all meter units. The default player is about 2m tall. When working in Max, "Generic Units" (GU) is the typical way models have been built. In 3DS Max, by default 1 GU = 1 inch.

    To get a real world conversion rate I took the medium player model from tribes 2, assumed a real height of 78 inches (approx 2 metres). In Max the model is 2.461 GU and divided by 78. This gave me a conversion rate of 0.0315, so 1" or 2.5cm in the real world==0.0315 GU.

    Thus the TREE1.DTS is about 46 feet high, Tribes 2 "AIR SCOUT" is about 29 feet long.

  • Setting up MAX grid size to reflect the scale

    Model sizes used in MAX is tiny, as far as the scale department goes!. To make the grid useful, you need to set the Grid spacing to 0.01, instead of the default 10. From MAX's "Customize -> Grid and Snap Settings..." menu option select the "Home Grid" tab to change the grid spacing

How to view your Shapes in the Torque Game Engine

Once you have created your model, and exported it using the "DTS Exporter", a quick way to view how the model will look in the Torque Game Engine is using the Torque Game Engine model viewer script. Firstly copy your new Shape to the tge/example/data/shapes directory. From the tge/example directory, run the Torque Game Engine Test Application using the -show option.

	tgeTest -show 

The Torque Game Engine Test application will load, and the following menu of options should appear on a black background.

DTS Model Viewer
  • Load Shape - Displays a "Load File..." dialog containing a list all shapes available under the tge/example/data directory, and it's subdirectories. Select the ".DTS" shape to display. The shape can be moved, rotated, zoomed. The default key bindings for controlling a loaded model can be found in the file tge/example/show/show/show.bind.cs
  • Load Sequence - ?
  • Thread control - Allow viewing of the animated sequences attached to a shape.
  • Detail Control - Controls the LOD viewing of the shape.
  • Lighting - Allows shapes to be shown under various light conditions and colors.
  • Misc - ?
  • Quit - Exit the DTS viewer mode, and exits Torque Game Engine.

Exporter Errors

The following are common errors that can occur when attempting to export.

Exporter Error Explanation of error
No bounding box found.
  • A box does not exist which encompasses the objects to be exported. The box must be named "bounds", and should have the Scene root as it's parent.
  • In 3DS Max when viewing an existing file the bounds box may be hidden. Select "Tools -> Display Floater...", and select the unhide all button, to set all objects to being visible (even the bounds box).
No data to export.
  • A detail# dummy object does not exist, or the meshes attached in the model are not named with the highest level of detail set by a detail# object.
Sequence defined off the "root" node.
  • Sequence dummy objects must be attached to the Scene root.
 
 << Previous Table of Contents  Next >>