DTS/FAQ/General FAQ

From TDN

Introduction

This article will explain some of the frequently asked questions about DTS objects below.

Contents

Modeling

Can my model be segmented or does it need to be a single object?
Either will work in the Torque Engine.

Can I use a NURBs object to create my model?
Although you can create your object with a NURBs surface, you will need to collapse the NURBs object into a mesh or polygon object prior to exporting. It is also likely you will need to drastically reduce the polygon count of the object.

What is the recommended polygon count for various objects within Torque?
Torque does not limit the polygon count of an object. This means you can have as high a polygon count as you want, as long as the target system can handle it.

The recommended maximum polygon counts for the highest level of detail are as follows:

  • Characters - 2250 polygons
  • Vehicles - 1500 polygons
  • Weapons - 500 polygons

For any other object in your scene (crates, barrels, rocks, etc.) you should not exceed 400. It is recommended that you aim as low as possible, since there is no reason that doo-dads should be polygon intensive.

Can I leave "holes" (open edges) in my meshes?
It is recommended that you do not leave any open edges in your mesh. If you do leave an open edge, the exporter could potentially hang when it looks at the location of vertices in your scene. If two vertices are too close to one another, the exporter may think they are one vertex instead of two. This is because of the digit accuracy the exporter reads from the scene. If the exporter does run into a loop when you have an open edge on your mesh, you will have to close the hole and try exporting again.

Having two vertices in the same location can also cause problems with the Skin and Multires modifiers. Your model may look as if it has exploded in the showtool (or in game) or even cause half of the normals to flip.

How many polygons should collision geometry be?
Collision geometry should be anywhere between 10 to 30 polygons. The more polygons that you use in your collision geometry the more you will affect the performance of the engine (the engine has to check for collisions on every face at every frame). The best advice here is to remember that collision geometry is a best fit, not a perfect fit.

I have mounted an object onto my player, but the object orient direction is wrong, how can I control that?
Mounting orientation is handled by the artist via the orientation of the nodes themselves. They are not actually points, but "points with orientation", in that they contain both a 3D location and a 3D orientation. When you mount an object to a node, the code aligns the orientation of the two nodes (the mount node on the mounted object, and the mounting node on the mounting object).

Texturing

What file formats are supported as texture files?
Torque supports GIF, JPG, and PNG image files.

What is the maximum size for a texture?
The maximum size is 512 x 512, but you should only use this size in extreme circumstances. Use 256 x 256 (or smaller power of 2 sizes) instead to help conserve video memory.

How can I avoid duplicate textures?
Simply place shared textures one level above each of your models. Torque will look up the directory structure all the way to execution root to find the files it needs.

What texture size should I use?

Non power-of-2 textures - textures that do not have dimensions that are a power of 2 (2x2, 4x4, 8x4, 32x32, 128x256, etc) will not work properly with a lot of the most common shader hardware available today. Change your texture sizes to fix this; use the following: ..., 64x64, 128x128, 256x256, 512x512, .... . You can use different setups such as 128x512 as long as they remain of the power of 2.


Animation

Why won't my object's animation play?
Make sure that your sequence is long enough to cover the length of time that an animation requires. Also make sure that you have named your sequence correctly so that it matches the correct sequence action within the engine.

How can I add a “bobbing” effect to my animations when I view them in the game?
The easiest way to fake this is to animate the eye and cam nodes that your model uses during a sequence and export this data out with your normal animation.

Why are my blend animations being overridden by other sequences?
Blend sequences should not be overwritten by other sequences, but some sequences on the player shape (such as run and walk) will override any sequence that is currently playing once it has been activated.

What are the names of the sequences that have been hard coded into the engine?
A full list of the sequence names can be found in the DTS Exporter documentation in the section called "Sequence types used by the the default game character". Some of the more commonly used names that people have trouble with include Root (standing still), Forward, Backward, and Side (stepping). The sequence names can also be found in the .cs file for the player.

In Game Problems

Why is my character a giant?
A Max object is sized in the engine at a 1 max unit to 1 game meter ratio. Use the box trick (mentioned in this FAQ and in the Max exporter tutorial) to scale your object down so that it is the appropriate size and try again.

Why isn't my texturing showing?
Make sure that the texture file that you are using is located in the same directory as the DTS file for the object.

Why are some of my models appearring incorrectly in Torque?
There are a couple of problems that could be the cause of this.

First, check the names of your objects in your Max scene. The names must have a number at the end that matches the detail marker in the scene. For example if you have a detail marker called detail50 then your characters head (or any other object) at this detail level should be named something like head50. If you are getting a few objects showing up, chances are that you either forgot to name the other objects correctly, or else Max's default naming for objects happened to match one of your detail markers.

Check to ensure that you have linked everything together correctly. Bad linking can result in object data not being exported.

Check your dump file to make sure that your objects are being exported correctly and are not being ignored by the exporter.

Why won't the "forward" sequence play?
The default player object and scripts expect the forward motion animation to be called "run". Change your forward motion sequence name to "run".

Why doesn't my character's movement animation play when travelling on a sloped surface?
The engine uses the motion of the animation to determine which animation to play when moving. The movement of your character might be too subtle (or minute) for the engine to pick-up and display. Try increasing how far your character moves and export again.

Why are my objects with multiple alpha channel textured meshes not rendering correctly?
The engine does not sort alpha meshes by default, which can cause visual artifacts depending on how your art is organized. Add the prefix "SORT::" to the name of all alpha textured objects you want to sort relative to each other.

Misc. Questions and Problems

How does scale compare between DTS and DIF objects
1 3DSMax Unit/1 Maya Meter is equivalent to 32 QuArK Units.

Note: that the Maya exporter (unlike the Max and Blender exporters) pays attention to the geometry scale you have set for your units. If you accidentally export with your scale set to centimeters, your model will be tiny - almost invisible!

The Milkshape exporter uses a scale multiplier that can be set at export time.

What are some typical movement distances for a character?
Typically a person will move the following amount during one second of time:

  • Casual Stroll - 65 to 90cm
  • Average Walk - 107 to 150cm
  • Brisk Walk - 180 to 240cm
  • Average Jog - 270 to 360cm
  • Average Run - 360 to 450cm
  • Sprint - 540 to 720cm.


Can I import dts objects into max/maya/blender/etc?
No. An importer was never written because the Tribes 2 team never needed one (they had access to the Max files that created the Tribes 2 content).

Why can't I pick up a weapon when I walk over it in the game?
Your weapon needs to have collision geometry. Without it the engine will not know that you have interacted with the weapon.

Why do my shots go through mounted weapons?
The engine by default does not use a weapon's collision geometry to detect whether or not a projectile has hit it. This is a function of the ShapeBaseImage class. You will have to move your collision geometry (and possibly your weapon geometry) to the base model if you want to trigger a hit when you shoot at the weapon.

Why are the polygon counts shown in the Torque Showtool Pro higher than the ones shown in my 3D application?
This is caused by the tri-stripping routine in the exporter. The exporter stitches all the strips together into one long strip by adding empty faces (that according to Clark Fagot should be ignored by the video card), so there's no need to worry. The higher polygon count shown in showtool is NOT the real polygon count. You can see in the dump file how many empty polygons are added by finding the line that says something like "178 strips with average length 14.01 (range 3 to 80) and 461 reversals". 461 is the number of empty faces. The one-long-strip method should be faster to render (on modern hardware) than using several shorter strips anyway so all is good.

Dump File Errors

Removing Nodes Error
If you are getting results such as this in your Dump file:

Removing node "cam"
Removing node "eye"
Removing node "mass"
...

You either have "collapse transforms" checked in the export control parameters or your .cfg file does not have the cam and eye nodes in the 'always export' list. If the nodes are not present, the default behavior in the game is for the eye to come in at the bounds pivot point (this is also where guns will attach)