Torque Game EngineTorque Game Engine Documentation
Version 1.3.x

Troubleshooting Common Problems

Frequently Asked Questions

Modelling FAQ

1. Can I have my model as a segmented object or does my character need to be one object?
2. How many polygons are recommended for various objects within Torque?
3. Can I group objects?
4. Can I use NURBs objects to create my model?
5. Can I use some of the sub-division modifiers found in Max?
6. I have heard that it sometimes helps to collapse my modifier stack when exporting, is this true?
7. I have seen a lot of on-line references that show examples of using spline shapes to generate your object. Can I use this method to create objects for Torque?
8. I have imported a file that I created in another program into Max, but when I look at my object, faces seem to be rendering in the wrong order and everything seems inside out.
9. What is this "box trick" that I always see reference to when people talk about resetting the transforms on objects that you scale?
10. Some people have linked a node called "unlinked" to the root of their scene, is this needed and why is it used?
11. What are the names of the sequences that have been encoded into the Torque engine?
12. What type of objects should my mount, collision, Eye, Cam, Ground, and Mass nodes be?
13. Can I leave "holes" (open edges) in my meshes?
14. I can't get the Multires LOD macroscript (adjustlod.mcr) to work properly!
15. Do I have to create more than one LOD for my model that I wish to export?
16. How many polygons should collision geometry be?
17. How many collision geometry nodes can I have?
18. I scaled my scene and now all of my nodes seem to be placed in the wrong location when I load it in the engine!
1.

Can I have my model as a segmented object or does my character need to be one object?

Either will work in the Torque engine.

2.

How many polygons are recommended for various objects within Torque?

Although there are no maximums or limits for polygonal models in Torque (meaning you can go as high as you possible want as long as the system can handle it). Here are the recommended maximum polygon counts (for your highest level of detail):

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

For any other object that you would add to your scene (ie. 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).

Note

These values are what is recommended for optimal speed on average video hardware. In no way is this a hard limit. When targeting high end video cards, the polygon count can be much higher.

3.

Can I group objects?

A "group" can be deceiving; it may appear as though the object is properly named, but in reality, the objects within it are not (they retain the names that they had when they were grouped). Think of a grouping as a visual simplification that you can go into, modify, and then close and return to your scene. Due to the way that groups actually work, they can cause problems when you export, so it is best that you do not leave any objects grouped when you try to export the scene.

4.

Can I use NURBs objects to create my model?

Although you can create your object with a NURBs surface, you will need to collapse the NURBs object to a Mesh or Polygon object in order to use it in the game. You will also likely need to do massive amounts of polygonal reduction to the object as well.

5.

Can I use some of the sub-division modifiers found in Max?

It is recommended that you don't for two reasons. The first being that it is counter productive since you are aiming for low poly models (not high poly), the second being that the Exporter doesn't really like the sub-divisional modifiers (such as Tessellate, MeshSmooth, and HSDS) when it tries to export your model. If you must use a sub-divisional modifier to create your object, it is recommended that you collapse the object to a Mesh or Polygon before applying your skinning or texturing.

6.

I have heard that it sometimes helps to collapse my modifier stack when exporting, is this true?

Yes this can sometimes help your model when you are trying to export as it collapses the entire object (at its current state) into a single, solid mesh. This can be beneficial when you have an object that is generating errors when exporting, and is sometimes a valid solution to get around this problem. Just remember to keep backups of your uncollapsed meshes though just in case you need to go back a few steps later on.

Some artists recommend working in an "Editable Mesh" object throughout because "everything useful in the model can be obtained from an editable mesh". Just remember to make incremental saves so that you can go back to previous versions if you need to change something.

7.

I have seen a lot of on-line references that show examples of using spline shapes to generate your object. Can I use this method to create objects for Torque?

You certainly can, but you will likely want to either collapse the modifier stack or add an Editable Mesh modifier onto the object after you have built your shape from an Extrude, Loft, or the Surface modifier.

8.

I have imported a file that I created in another program into Max, but when I look at my object, faces seem to be rendering in the wrong order and everything seems inside out.

Some file formats (such as 3DS) do not contain information on vertex normals, so if you brought a model in from another program Max must generate the normals and sometimes it has been known to get them wrong. To solve this problem, add a "Normal" modifier to each object and choose "flip normals". If only some of the normals are incorrect you will need to manually go in and fix them yourself using the "Edit Mesh" or "Edit Poly" modifier.

9.

What is this "box trick" that I always see reference to when people talk about resetting the transforms on objects that you scale?

the section called “Resetting Transforms: "The Box Trick"”

10.

Some people have linked a node called "unlinked" to the root of their scene, is this needed and why is it used?

Rick Overman might know?

11.

What are the names of the sequences that have been encoded into the Torque engine?

A full list of the Sequence names can be found in the DTS Exporter documentation in a section called "Sequences 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). You could also check the .cs file for the player character. The names of the sequences can be found there. Note: sequences are called by number, not name.

12.

What type of objects should my mount, collision, Eye, Cam, Ground, and Mass nodes be?

These nodes should all be dummy objects. If the exporter is ignoring these nodes when it exports you should edit your .CFG file so that it does not ignore these objects when it tries to export.

13.

Can I leave "holes" (open edges) in my meshes?

It is recommended that you do not leave any open edges on your meshes. If you did leave an open edge on your mesh you could potentially cause the exporter to go hang a bit when it looks at the location of vertices in your scene. If two vertices are too close to one another the exporter might think that they are one vertex (instead of two) 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 this hole and try exporting again. If you had two vertices on the same location you can also cause problems with the Skin and Multires modifiers that can cause your model to look as if it has exploded in the showtool (or in game) or even cause half of the normals to flip!

14.

I can't get the Multires LOD macroscript (adjustlod.mcr) to work properly!

To get the script working you need to do the following...

  1. Open up your maxscript listener window

  2. Open the adjustlod.mcr file

  3. Remove these two lines from the top of the script

    	macroScript adjustLODs category:"Torque_Tools" tooltip:"Adjust LODs"
    	(
    						
  4. 4) Remove this line from the bottom of the script

    	)
    						
  5. Select all of the remaining lines in the script (ctrl+a) and perform a drag and drop onto the tab panel located at the top of your screen. Note:I recommend that you create your own tab panel for your own custom scripts so that you don't mess things up. This will create a small button on the tab panel. If you click on the button the floater window with the AdjustLOD script will generate and load.

15.

Do I have to create more than one LOD for my model that I wish to export?

No, you do not have to create more than one LOD for your model to export into the Torque Game Engine though it really is recommended that you have multiple LODs to help keep things running smoothly in the game.

16.

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 calculate for collision on every face at every frame). The best suggestion here is to remember that collision geometry is a best fit, not a perfect fit.

17.

How many collision geometry nodes can I have?

You can have up to nine (9) collision geometry nodes in your scene.

18.

I scaled my scene and now all of my nodes seem to be placed in the wrong location when I load it in the engine!

If you scaled your scene down, geometry and helpers, the scale transform information is not correctly applied to the dummy helper node that you are using. When the exporter looks at your scene and reads the helper, it finds that the helpers base position is in one location, but the scale is visually telling you that it is in another. Since scales are applies onto your 3D data (they do not actually change it) the exporter reads the original location and dumps that into the DTS shape.

If this has happened to you, you will have to replace all of these helpers or find some way to undo your scale. A better solution, if it's available, would be to import the nodes from a previous version of the file (before you scaled) and have them replace your existing ones.

Note

As a general rule you should never scale your dummy nodes.

Textures & Texturing FAQ

1. I have loaded a PNG file that uses 'transparency' instead of an Alpha channel (Adobe Photoshop 6 method of making transparent PNGs), why does the transparency not show in Max?
2. What type of materials can I use?
3. How can I make my material reflective?
4. How can I make my material be transparent (opaque)?
5. What type of file formats are supported as texture files?
6. How do I setup bump maps on my object?
7. Can I use a self-illumination material to make certain areas glow?
8. What is an IFL file and why is it used?
9. Whats is the maximum size for textures?
10. Can I use multiple UVW Map channels to texture my model?
11. Can I use Material Ids to help me texture my model?
12. I have a material with some transparency applied to my object, but when I view the object things seem to be rendering or displaying in reverse order when I look at them in the viewport (or in the Torque engine)?
13. Do all of my player character textures need to be named player.png (as based on the example from the source code)?
14. How do I make my entire object be transparent, or animate its transparency?
15. Can I place "decals" on my objects that I export and how do I do this?
16. Can I use more than one texture map on a single mesh?
17. Can I use mapchannels greater than 1 to help setup my texture mapping?
18. I have setup a material so that it is transparent based on the alpha channel of a PNG. Everything looks fine in Max but when I view the exported model in the game I get these weird white lines at the edges of where my transparent texture, what is causing this?
19. Are there any issues that I should be aware of if I use a multi/Sub-object material on my model?
1.

I have loaded a PNG file that uses 'transparency' instead of an Alpha channel (Adobe Photoshop 6 method of making transparent PNGs), why does the transparency not show in Max?

Max does not know how to read the 'transparency' value of a PNG file (it does know how to read the alpha channel from a PNG).

2.

What type of materials can I use?

Standard and Multi/Sub-object are the only material types that should be used on the models that you are exporting to Torque. Any of the other material types such as Raytrace Blend, Composite, Matte/Shade, Hardware Shader, Shellac, Top/Bottom, and any new material type that is added from a Max Plugin can in theory be used but the exporter will likely ignore the information contained in these material types.

3.

How can I make my material reflective?

If the environment mapping is turned on in the engine (does not work in the show tool), you need to check the "Reflection" channel in the material editor (you do not need to put a texture in the slot). If you adjust the spinner that is next to the Reflection channel you can control the amount of reflectivity the object has. For additional information please see "Environment Mapping" in the DTS Exporter Tutorial by Joe Maruschak.

4.

How can I make my material be transparent (opaque)?

To make an object translucent, the texture on the object must have an alpha channel. The amount of translucency is controlled by the alpha channel. Put the texture in the diffuse mapping slot and check the 'Opacity' checkbox in the material editor. You don't need to put a texture in the Opacity slot, it will get the opacity information from the alpha channel.

5.

What type of file formats are supported as texture files?

Torque supports the following formats: BMP, Gif, JPG, PNG, TGA, AVI, TIF

6.

How do I setup bump maps on my object?

In theory you should just need to assign a bitmap into the bump channel of your objects material, but according to Joe Maruschak "These were stubbed in back in the day but I am fairly sure that they were never fully implemented in the engine".

7.

Can I use a self-illumination material to make certain areas glow?

-- please ignore this topic until I can test out self-illumination channels and be certain that they work --

8.

What is an IFL file and why is it used?

An IFL is an Image File List or an Image File Library, which is essentially a text document with a list of filenames. When you play an IFL the program reads this list and during each frame it displays the filename as the texture (proceeding in order usually from the top of the list to the bottom). Using an IFL file is a viable alternative to use animated Gifs or AVI files to have a looping texture. Note that the engine is currently set to prepend a "skins/" directory to ifl resource names (your programmer will need to change this or else you will need to work around this).

9.

Whats is the maximum size for textures?

Although you can use 512x512 maps, you should do so only in extreme circumstances. Use 256x256 (or smaller power of 2 bitmap sizes) instead. This will help conserve video memory.

10.

Can I use multiple UVW Map channels to texture my model?

No, only one UVW channel is supported by the exporter.

11.

Can I use Material Ids to help me texture my model?

Yes

12.

I have a material with some transparency applied to my object, but when I view the object things seem to be rendering or displaying in reverse order when I look at them in the viewport (or in the Torque engine)?

In order for translucent shapes to draw correctly they must be forced to sort in the correct order. Prepend the name of the object with "SORT::" to tell the exporter that this object may have trouble sorting, the exporter will take extra steps to ensure it sorts correctly in the engine. You will have to ignore this problem if it is happening within Max.

13.

Do all of my player character textures need to be named player.png (as based on the example from the source code)?

No, you can call them whatever you like (unless you like to overwrite existing files).

14.

How do I make my entire object be transparent, or animate its transparency?

Add a "visibility" channel to your object in the "track view" and set the value of the visibility from within there. (For information on how to assign a visibility track to your object and how to use keyframes to control the visibility, consult your 3DS Max documentation).

15.

Can I place "decals" on my objects that I export and how do I do this?

Unknown... I don't think it can be done without some C++ modifications.

16.

Can I use more than one texture map on a single mesh?

Yes you can, use a Multi/Sub-Object material and assign the correct face IDs to your mesh for a specific material to appear on specific faces.

17.

Can I use mapchannels greater than 1 to help setup my texture mapping?

No! Mapchannels that are greater than 1 will not be exported out to the DTS format, they will be ignored and your texture mapping information on those mapchannels will be ignored upon export. Note: This is fairly common for RT3D engines and is not a problem specific with the Torque game engine.

18.

I have setup a material so that it is transparent based on the alpha channel of a PNG. Everything looks fine in Max but when I view the exported model in the game I get these weird white lines at the edges of where my transparent texture, what is causing this?

Torque is attempting to tile your material, inside of Max you need to turn off the tiling options for the diffuse bitmap.

19.

Are there any issues that I should be aware of if I use a multi/Sub-object material on my model?

In fact, there is. Using Multi/Sub-Object materials on your models can affect the performance of the engine. When you have multiple textures on your model the engine must draw (and keep in memory) and instance of node on the model for each texture that is applied to it. So if you have 2 textures applied to a node and that node is 500 polygons, the engine will actually have to draw 1000 polygons and also keep that data in memory. As such although you can do it, you should be aware of the consequences involved in texturing this way and know that it is highly recommended to use only 1 texture per model.

Skinning FAQ

1. I have applied the "skin" modifier to my object and I have created the "bones" that I will use to affect the object, but when I move my bones in the viewport the object does not move (deform)?
2. Can I use the "Physique" modifier from Character Studio to skin my character?
3. Can I use a Biped object from Character Studio on my character?
4. What's ComSkin and where can I find it?
5. Should I use Bones or Biped?
6. My object is too big! How can I scale it down without wrecking the Biped (or Bones) object, or the skin setup that I have in place?
7. Do my skeletons (ie. Bones or Biped) need to look like people?
8. Is there any way that I can translate the information contained in the Physique modifier into to the Skin modifier so that I can use my work in Torque (without redoing things)?
9. Is there any way that I can take the pose that I have done on one side of my Biped or bones skeleton and apply it to the other side?
10. My model is too big and I need to scale it and my bones down to get it exported at the right height, but when I do this my model distorts. How do I export my player character without having it distort.
1.

I have applied the "skin" modifier to my object and I have created the "bones" that I will use to affect the object, but when I move my bones in the viewport the object does not move (deform)?

Go into your skin modifier on the object in question. Select a bone and look at the envelope that the bone is casting. A bone will only affect vertices that its envelopes are overlapping (these vertices will be shown as red in the viewport display). Adjust the envelope by moving it to ensure that it has influence over the correct vertices in your object. You need to do this for each bone.

Using the skin "paint" tool, paint the influence that the bone has on the mesh. Once again any vertice that the bone has influence over what will be displayed as red in the viewport.

2.

Can I use the "Physique" modifier from Character Studio to skin my character?

You can, but when the character exports it will export as a "morph" animation (This is a really bad idea for a wide variety of reasons).

3.

Can I use a Biped object from Character Studio on my character?

Yes you can, but you will need to use the Skin modifier (instead of the Physique modifier) to apply it to your model.

4.

What's ComSkin and where can I find it?

ComSkin is an updated Skin modifier for Max version 3 only that was presented at a GDC conference a few years ago. It has several advanced features that are not found in the R3 version of Skin (and are found in the R4 version). It can be downloaded for free from Discreet's website.

5.

Should I use Bones or Biped?

It doesn't matter if it is bones or biped, all that matters is that the bone's or biped parts or whatever node is in the shape has the same NAME as the ones in the animations.

6.

My object is too big! How can I scale it down without wrecking the Biped (or Bones) object, or the skin setup that I have in place?

(Biped) If the character already has Skin (or Physique) on it you should be able to just pick the root node of Biped and scale it. All the other bones (of the Biped) are children of the root Biped node, so they should follow along and scale appropriately. It is recommended that you turn off the Skin (or Physique) and scale the model by it's self and then reset the scale. After that is done, reset the Skin (or Physique) and turn it back on. If there are errors with how the bones move or how the Skin modifier is setup, you may need to reapply your Skin modifier.

(Bones) Scaling your bones and then linking them (or when they are linked) up to objects in your scene is is something that should be avoided. To change a bones length go into the bone's properties and turn off Freeze Length. Turn off the Skin modifier. Then move the child bone to change its parent's length (and/or change the size and shape of the bone in R4). After you have done your changes to the bones, select all of the bones and go back into their properties and press "reset length" and then refreeze the length of the bones. Finally turn the Skin modifier back on and test. If there are any problems with how the bones are affecting your object you may need to reapply your Skin modifier.

7.

Do my skeletons (ie. Bones or Biped) need to look like people?

No. You can make your skeleton look and operate any way that you feel. To quote Joe Maruschak "if you can build it, it can be used".

8.

Is there any way that I can translate the information contained in the Physique modifier into to the Skin modifier so that I can use my work in Torque (without redoing things)?

Yes you can, on the Discreet development website (Sparks site) there is a small utility that Discreet has created that will turn Physique into Skin and vice versa. The utility can be found at Discreet's Website

9.

Is there any way that I can take the pose that I have done on one side of my Biped or bones skeleton and apply it to the other side?

Yes... Biped: In figure mode on your biped object, you can select the objects that you wish to copy, press the "copy transform" button, and then click on your destination area of the biped and press "paste opposite transform". Bones: There are numerous ways to do this with bones, the easiest though would be to go into your track view and copy the rotation track from one bone and then paste it onto another bone. Another way would be for you to copy and paste the specific rotation or position information from one bone to another via the type-in window for the Move and Rotate tools.

You could also try to use one of the many maxscripts that are located on the web that can help automate this task for you, scripts such as these are located at sites like maxplugins.de.

10.

My model is too big and I need to scale it and my bones down to get it exported at the right height, but when I do this my model distorts. How do I export my player character without having it distort.

Unfortunately there is no easy answer to this question, the problem lies in the fact that you are scaling the bones that a modifier on your mesh is referencing to perform the deformations based on the bone transforms. In order to re-adjust your scale you will need to do the following:

  1. Save your weighting for your deformation modifier out to a file.

  2. Remove your deformation modifier from your model.

  3. Scale the model and re-adjust the size of your biped to the correct size. Note if you are using bones, they typically do not scale well so if you have any problems you will need to rebuild them.

  4. Reset the transform information on your geometry that you scaled (not biped or bones).

  5. Add your deformation modifier back onto your geometry. Add all of the biped or bones data that you need with it into the modifier.

  6. Load your weight table that you saved in the first step back into your modifier.

Animation FAQ

1. Can I use a dummy object to help control the motion of my bones?
2. Do I Need a Sequence Object?
3. Can I use Footsteps from Character Studio to help move my model around?
4. Can I import the character actions from Tribes 2 into Max to help me animate my models?
5. What are some typical movement distances for a Character?
6. How can I export animations that I have done with a modifier in Max?
7. I have been doing a rotation animation on my model and it looks fine inside of Max but when it is within Torque it appears to jump or skip when it loops back to the beginning of a sequence.
8. How can I add a "bobbing" effect to my animations when I view them in the game?
9. How can I get an animation to play on a static DTS shape that I have created in the engine?
1.

Can I use a dummy object to help control the motion of my bones?

Sure. Just make certain that the dummy object(s) that you are using does not have a number at the end of its name or it could/can cause problems with the exporter if the number happened to match a detail marker in your scene.

2.

Do I Need a Sequence Object?

Only if you want your animation that you have setup for your object to export and play correctly. (For information on how to use a sequence object, please consult the DTS Exporter Tutorial)

3.

Can I use Footsteps from Character Studio to help move my model around?

You can if you like, the exporter should have no problems with Biped Footsteps.

4.

Can I import the character actions from Tribes 2 into Max to help me animate my models?

No. There are no import tools available to do this. But if you setup your skeletal system the same way (with the same names) as the Tribes 2 team did, you should be able to apply these animations to your character in your Torque game. The only problem with this though is that you are technically stealing from Tribes 2 and because of this certain parties could take legal action against you. This is not recommended (obviously) unless you want to have temporary animations for your characters.

5.

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
6.

How can I export animations that I have done with a modifier in Max?

Any animation done with any modifier found in Max can be exported out to a DTS file. To export this animation information you must flag the "morph animation" option in the DTS Sequence object that you add to your scene otherwise this information will not be exported.

7.

I have been doing a rotation animation on my model and it looks fine inside of Max but when it is within Torque it appears to jump or skip when it loops back to the beginning of a sequence.

Whenever you are working with animations that you are telling TGE to loop you need to ensure that your end position is at the same exact location as the start. If you fail to do this, TGE will reset the objects position to what it sees at the start of the sequence, which causes the jump or stutter effect that you see because the positions that its moving to between two frames is completely different. So your options to solve this problem is to set the end key frame of your object(s) animation to go 360 degrees back to the start (so that it loops correctly). If you like the timing, increase the end time of the animation, move your keys, and adjust them as previously mentioned. Don't forget to move your sequence start/end keys too.

8.

How can I add a "bobbing" effect to my animations when I view them in the game?

You will have to animate the "eye" and "cam" nodes that your model uses and export this data out as a part of a particular sequence.

9.

How can I get an animation to play on a static DTS shape that I have created in the engine?

You will need to add a sequence helper called "ambient" and set it up for exporting your animation out to the DTS file. When this file is loaded into the engine it will automatically see the "ambient" sequence and play it. The engine will not play animation sequences on static shapes that are not named "ambient" by default.

Exporting FAQ

1. If I save my max files several times over, or as multiple files, with the dummy system set up for a model (eye/cam/detail/bounds), the exported dts always seems corrupted in some way. Usually the "cam" dummy is placed at the bounds' pivot point
2. I found this maxscript/macroscript that is supposed to add all the necessary features for exporting my model, but my model doesn't export or load properly why?
3. I'm having trouble adding a bounding box to my player model. I've added the box and made sure that it is larger than the model at any frame in the animation sequences, but I don't know if I'm supposed to link it to the bones or the mesh. Tried both and can't seem to get it to export.
4. I received this error :"Skin found on unlinked node "name" -- skin must be unlinked" what does it Mean and what can I do to fix it?
5. Error: "No Details to Export"!
6. How should I setup my linking so that I get a correct export?
7. Error: "More than one bounds node found"
8. Can my IK Solvers export into the DTS file format or do I need to set them as "always ignore" in my CFG file?
9. Error: "Too many subtrees: t2Autodetail only works with single subtree objects"
10. Error: "Multiple Config Files Found in directory"
11. Error: Sequence "name" is missing keyframes to mark start and end
12. Error: Cannot collapse node "name" because it is a bone!
13. Assertation error on skin object!
14. When I am exporting a mesh which uses SORT:: I receive an error "run time check failure #3 - the variable "bestcount" that seems to be caused by the DTS Exporter plugin in Max R4 or R5.
15. I am using 3DS Max R5 to export my shapes into TGE but when I try to export with the max2dtsexporter.dle Max generates a fatal error and crashes to desktop!
16. Can I use a "SORT::" tag on an object that has a skin modifier assigned to it?
1.

If I save my max files several times over, or as multiple files, with the dummy system set up for a model (eye/cam/detail/bounds), the exported dts always seems corrupted in some way. Usually the "cam" dummy is placed at the bounds' pivot point

Make sure that the nodes are actually exporting. Open up your dump.dmp file and go to the bottom of the file and look at the 'Shape Hierarchy". In Subtrees, you should see those nodes in the list. If not, the exporter is removing them. 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)

2.

I found this maxscript/macroscript that is supposed to add all the necessary features for exporting my model, but my model doesn't export or load properly why?

The maxscript likely isn't building the necessary structure (and linking) that is needed for a scene to successfully export to the DTS file format, do not use the maxscript.

3.

I'm having trouble adding a bounding box to my player model. I've added the box and made sure that it is larger than the model at any frame in the animation sequences, but I don't know if I'm supposed to link it to the bones or the mesh. Tried both and can't seem to get it to export.

Make sure that your object is named "bounds" or it will not export properly.

4.

I received this error :"Skin found on unlinked node "name" -- skin must be unlinked" what does it Mean and what can I do to fix it?

Skinned objects should not be linked as a child to any other object in your scene, they should only be linked to other objects that are necessary to make the skeletal deformation occur correctly. Unlink your skinned object from its parent.

5.

Error: "No Details to Export"!

You do not have any objects in your scene that match the detail marker.

You have setup your detail markers so that they are the parent of another object.

6.

How should I setup my linking so that I get a correct export?

There are numerous examples of correct ways to link your objects from screenshots and examples found in the DTS Exporter tutorial, sample Max files, as well as the schematic view example provided. Use one of these examples to assist you in setting up a hierarchy that you are familiar with and that will work for you.

7.

Error: "More than one bounds node found"

Ensure that the "bounds" object is not the parent of any other objects

Try to ensure that your objects hierarchy in the schematic view is similar to the example found in the DTS Exporter Tutorial or with the example that was provided in the DTS Exporter tutorial, in the sample Max files, and in the image provided above.

Do an "unhide all" and check to ensure that you have not created duplicate bounding boxes that you hid from view.

8.

Can my IK Solvers export into the DTS file format or do I need to set them as "always ignore" in my CFG file?

You can do either, but you don't need them to make your model work. On export, the animation is baked down into rotation values on the bones. It would be better to cull them out so you don't have a bunch of extra nodes floating around that need to be transformed in the engine.

9.

Error: "Too many subtrees: t2Autodetail only works with single subtree objects"

You are linking objects to more than one subtree.

10.

Error: "Multiple Config Files Found in directory"

you have two .cfg files in the same directory as the max file you are trying to export. You can only have one file with the .cfg extension, regardless of its name.

11.

Error: Sequence "name" is missing keyframes to mark start and end

Open the "track view" window in Max. Expand "Objects" and scroll down the list until you find the sequence. Expand this track, then expand the "sequence" track below it. You will now see a track called "sequence begin/end". Add a keyframe where the sequence will begin, and then add another one where you wish to have your sequence end.

12.

Error: Cannot collapse node "name" because it is a bone!

You are likely using your CFG file to "never export" a bone that is currently in your scene, this can cause an error because the exporter thinks that the mesh (with Skin modifier) in your scene needs this bone to perform the deformation. Delete your mesh and then try exporting again.

13.

Assertation error on skin object!

You likely did not set up your envelopes and bone weighting correctly. If there is even a single unassociated vertex on your mesh that has the skin modifier on it, it will cause an assertation error when you try to export.

Collapse your model to an Editable Mesh before applying your skin modifier.

14.

When I am exporting a mesh which uses SORT:: I receive an error "run time check failure #3 - the variable "bestcount" that seems to be caused by the DTS Exporter plugin in Max R4 or R5.

There is a potential problem with the public Max R4 plugin was distributed by GarageGames, you should use the version from http://www.joemaruschak.com/max2dtsExporter.zip instead.

15.

I am using 3DS Max R5 to export my shapes into TGE but when I try to export with the max2dtsexporter.dle Max generates a fatal error and crashes to desktop!

There was apparently a bit of code change with the Multires.dle plugin for Max from release 4 to release 5, 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:

1) 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 a file 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.

2) Manually generate your detail meshes as explained in the DTS Exporter documentation.

A2: Search the resources section of GarageGames for a recompiled version of the exporter for Max 5.1: Max 5.1 Exporter

This exporter no longer requires you to use the R4 multires file in your Max 5.1 software to export Multires data.

16.

Can I use a "SORT::" tag on an object that has a skin modifier assigned to it?

Adding a "SORT::" tag onto any deforming object (ie. An object with the skin modifier assigned to it) will not work correctly as the exporter cannot split the polygons up and also allow your model to still deform as you have told it to.

Miscellaneous Problems In Max

1. I am loading a Max R3 model that uses the MultiRes modifier into Max R4 and I get a plugin load error where the MultiRes modifier should be, why?
2. "An error has occurred and the application will close"
3. How can I import objects from Torque into Max?
1.

I am loading a Max R3 model that uses the MultiRes modifier into Max R4 and I get a plugin load error where the MultiRes modifier should be, why?

When Discreet added MultiRes as a Max R4 default plugin they changed the plugin ID#. Ignore this error, delete the missing modifier and add the Multires modifier to the object again.

2.

"An error has occurred and the application will close"

If you encounter this problem frequently your best solution is to make a post on the GG forums (or the Discreet Max Forums) and inform us of every detail about your system. Things such as your version of Max, hardware that is in your system, driver version for your hardware, BIOS version, software that is running at this time, memory specifications, operating system, will allow other people to try to help troubleshoot what your problem is.

3.

How can I import objects from Torque into Max?

You can't, no one wrote an importer because at the time the Tribes 2 team never needed one (since they had access to the Max files that created the Tribes 2 content).

In-game Problems

1. My character looks like a giant!
2. I've got an animated model in the game, but I've noticed that during my animations the up and down (jumping) motions are not showing up. My root has the character standing while slightly moving up and down in a combat pose, but instead of moving up and down the feet come off the ground while the upper torso remains stationary.
3. I opened the player.max in max4, (after first modifying the player.png to get a different skin), then exported to player.dts. (I saved the originals of course). But now the model will not animate. When I view it in show, the only threads are jetflare and damage. Anybody know why? Don't the original dsq files work with a new dts?
4. My texture doesn't show!?
5. When I uvw unwrapped my model and when I open it in the model viewer or torque itself, the texture's coordinates are wrong!
6. All of my objects face the wrong direction when I bring them into my game!
7. The collision detection on my object is not working, why?
8. My animations are not loading into my shape? What is going on?
9. I don't see my object's actions happening when I play the sequence in the game!
10. I receive the error "Illegal transform animation detected between collapsed node 'name' and 'bounds'" whenever I try to activate a sequence or move a part of my object.
11. In Max all of my objects show up fine, and I have followed all the instructions in some tutorials that I found, but my object will not appear in Torque (or only a few objects will appear in Torque).
12. My character is in the game, but the eye node and the gun mount are at his feet.
13. When I load my character into the game it looks like I am viewing from his foot level, why?
14. I am trying to make my character do a flip, but my character is rotating himself into the ground when I tell (program) the engine to do this, why?
15. How can I make it easier to have sounds added to the actions of my character?
16. I have animated my character in Max and set everything up properly, but when I try to activate the sequence of my character running my character moves forward but does not perform any actions. Why?
17. My "blend" animation sequences are being overridden by other sequences within Torque!
18. My "forward" sequence does not play, why?
19. My character does appear to have a movement motion when traveling on a sloped surface!
20. When I load an object into Torque that uses an alpha channel to make parts of the object transparent, the face normals look as though they are flipped. How can I solve this?
21. My model exports correctly, it works fine in the showtool and when we view it from a first person perspective in the game everything looks good, but when we move to a third person perspective the model looks as if it has blow itself apart!
22. How do I turn on the Environmental Reflections in Torque?
23. I exported my character model successfully but when I view it in the game or in Showtool the character is rotated 90 degrees on the Z axis (appearing as though running on a wall), how can I correct this so that the model is oriented correctly?
24. When I look at the polygon count of my object the count is higher than what my 3D program told me, why is that?
25. When I try to apply some of the existing sequences to my shape or apply a new sequence that I created to an existing shape nothing seems to happen!
26. When I load my model into the engine and play with it in the game, it seems that everything that I attach to the model (such as a weapon) is pointed backwards!
27. When I shoot at a weapon.dts file that is mounted to an object (player, turret, etc.) my shots go right through the weapon geometry!
28. When I walk over a weapon to pick it up, the game will not let me, why?
29. When I export a weapon to use in the game, the weapon is placed incorrectly on my mount node, why is that?
1.

My character looks like a giant!

A Max object comes into the Torque engine at a 1 max unit = 1 game meter ratio. This means that your object will likely need to be exported from Max at a much smaller scale than you may be used to. Use the "box trick" (mentioned above and in the Max exporter tutorial) to scale your object down so that it is the appropriate size and try again.

2.

I've got an animated model in the game, but I've noticed that during my animations the up and down (jumping) motions are not showing up. My root has the character standing while slightly moving up and down in a combat pose, but instead of moving up and down the feet come off the ground while the upper torso remains stationary.

You likely have your bounding box set to "inherit z motion" from the object that it is linked to. You will need to deactivate this in the Hierarchy tab. This will keep "bounds" from following your character as he jumps up or down. You will also want to increase the "bounds" size to allow your character to jump without going outside of the bounding box.

3.

I opened the player.max in max4, (after first modifying the player.png to get a different skin), then exported to player.dts. (I saved the originals of course). But now the model will not animate. When I view it in show, the only threads are jetflare and damage. Anybody know why? Don't the original dsq files work with a new dts?

The player.max file has had the animation sequences stripped out of it, therefore you cannot reexport and get the default player .dsq files.

The DSQ files are loaded into a new shape at runtime constructed by a .cs file that is associated with the shape. If you are exporting the shape and it doesn't have a .cs file, the animations won't load. If you don't have the proper .cfg file for the DTS shape when you exported it, it is probably missing nodes that are in the DSQ files, and the animations won't load into the shape. Look at the player.cs and the dtsScene.cfg that is in the same directory as your player file.

(most likely scenario) There is no .cfg file, and collapse transforms was checked when you exported, so some of the nodes got culled out that the sequences need.

4.

My texture doesn't show!?

Make sure that the texture file that you are using is located in the same directory as the DTS file for the object.

5.

When I uvw unwrapped my model and when I open it in the model viewer or torque itself, the texture's coordinates are wrong!

This is likely due to a very large texture being used on your object. Your texture should be no larger than 512x512 pixels in size for it to be used properly in the Torque Engine.

6.

All of my objects face the wrong direction when I bring them into my game!

The "forward" part of your object must point towards the positive Y axis in the top viewport in Max, rotate your model so that it points the correct direction and export again.

7.

The collision detection on my object is not working, why?

All of your collision objects must be convex, if there is a concave part of the collision mesh, collision detection will not occur. You should also make certain that you have named your collision objects correctly and have also added the necessary collision markers. Concave shapes can be created from multiple Convex collision meshes, but remember that you only have 9 collision meshes to work from. Collision meshes do not need to be hugely detailed, just a close enough estimation of the object's shape to interact with other objects convincingly.

8.

My animations are not loading into my shape? What is going on?

The problem is most probably either that your sequences contain nodes that are not in the DTS file OR there is a syntax error in your .CS file.

9.

I don't see my object's actions happening when I play the sequence in the game!

Make sure that your sequence is long enough to cover the length of time that an animation requires.

Make sure that you have named your sequence correctly so that it matches the correct sequence action within the Torque engine.

10.

I receive the error "Illegal transform animation detected between collapsed node 'name' and 'bounds'" whenever I try to activate a sequence or move a part of my object.

Your bounding box ("bounds") isn't enclosed over your entire object at all times within the animation. Resize your bounding box so that it is always larger than your object (at any time during any of the animations) and export again.

11.

In Max all of my objects show up fine, and I have followed all the instructions in some tutorials that I found, but my object will not appear in Torque (or only a few objects will appear in Torque).

A1: Check the names that you have for 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.

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

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

12.

My character is in the game, but the eye node and the gun mount are at his feet.

The Eye and Mount nodes are getting culled out on export. If they are not in the DTS shape, they default to mounting at the pivot point of the bounding box. Make sure the Eye and Mount nodes are included in your .CFG file for the DTS shape in the 'Always Export' list.

13.

When I load my character into the game it looks like I am viewing from his foot level, why?

You either forgot to add an Eye or Cam dummy, or the Eye and Cam dummy where omitted by the exporter (they were not on the always include list), or you forgot to move the dummy's to the correct location on the model.

The Eye and Mount nodes are getting culled out on export. If they are not in the DTS shape, they default to mounting at the pivot point of the bounding box. Make sure the Eye and Mount nodes are included in your .CFG file for the DTS shape in the 'Always Export' list.

14.

I am trying to make my character do a flip, but my character is rotating himself into the ground when I tell (program) the engine to do this, why?

If you are using the "bounds" object to do the rotation you will cause the character to rotate at the soles of his feet (instead of the hips or another location). This is because the pivot location of the "bounds" object in Max is the location of the ground in the Torque engine. When you try to rotate your character using the "bounds" object, you are actually rotating your character at a point near his feet causing the character to go into the ground. To get around a couple of recommended solutions include:

1) Rotate an object that is at, or near, the character's hip, this could be a mesh, a dummy, or a bone.

2) Do the animation inside of Max instead of programming it into the engine.

15.

How can I make it easier to have sounds added to the actions of my character?

Although your programmer would need to do the actual work implementation of this, you can help out in the processes of triggering a sound from an animation by putting a key and a key value in the trigger track of the sequence helper.

16.

I have animated my character in Max and set everything up properly, but when I try to activate the sequence of my character running my character moves forward but does not perform any actions. Why?

Currently some of the sequences are coded in the Torque engine to only accept certain names. Change the name of your sequence to "blah" and your running sequence should work.

You must have your model animated so that it literally moves forward from its current position. Simply having your bounding box animate, or having your objects legs move up and down in the scene (but the body remains in the same position) will not work.

17.

My "blend" animation sequences are being overridden by other sequences within Torque!

Blend sequences should not be overwritten by other sequences. You can have multiple blend sequences running at once in different threads. You can help affect how sequences blend together by checking the priority of your animation sequences, or by setting up your .CFG file to export only the necessary data for a sequence.

Certain sequences (such as the run and walk) will override any sequence that is currently playing once they have been activated. The best way around this is to export as two (or more) animation sequences. Use your CFG files to ignore the upper body bones in the walk/run sequence, and then tell it to ignore the bones for the lower body during the action of your character swinging his/her weapon.

18.

My "forward" sequence does not play, why?

Change your forward motion sequence name to "run", or if your forward sequence is called "walk" edit the .CS file and change value of sequence1 = "forward_blah.DSQ run"; to sequence1 = "forward_blah.DSQ walk"

19.

My character does appear to have a movement motion when traveling on a sloped surface!

The movement of your character might be too subtle (or small) for the engine to pick-up and display. Try increasing how far your character moves inside of your 3D software and export again.

20.

When I load an object into Torque that uses an alpha channel to make parts of the object transparent, the face normals look as though they are flipped. How can I solve this?

Add "SORT::" to the start of your objects name.

21.

My model exports correctly, it works fine in the showtool and when we view it from a first person perspective in the game everything looks good, but when we move to a third person perspective the model looks as if it has blow itself apart!

The good folks at Bravetree productions have created a small utility called unmessdts.exe (found in the DTS Exporter documentation) that will fix the autodetails that are created by the exporter when the Multires modifier is used. Information on how to use the unmessdts.exe file can be found in the DTS Exporter documentation.

22.

How do I turn on the Environmental Reflections in Torque?

Provided that you have setup your material correctly you will need to add the following lines of code: In your player.cs file you need to add "emap = true;" and in \client\prefs.cs you need to change "$pref::environmentMaps = "0"; " to "1". Please note that environmental reflections will only work with player or vehicle objects that are viewed in the game.

23.

I exported my character model successfully but when I view it in the game or in Showtool the character is rotated 90 degrees on the Z axis (appearing as though running on a wall), how can I correct this so that the model is oriented correctly?

You are probably forcing the Bip01 node to be exported in either your DTS or your DSQ which is causing an odd transform data to be read by Torque and displayed with your DTS shape. Change your CFG file that is used to export this model or sequence so that node Bip01 is always ignored.

24.

When I look at the polygon count of my object the count is higher than what my 3D program told me, why is that?

There are a few of items that typically increase polygon count past what was displayed when you built your model in Max.

The first is that your skeletal system's polygons that make up its shapes are included in the count that Torque Game Engine gives you.

The second is that when the exporter encounters a material with "double-sided" flagged, it actually exports two sets of polygons (the normal polygons that you see and then another set of flipped polygons) for the model/node that the material is applied upon. This is not something that should concern you or affect the performance of your TGE application unless you made a large object use a double sided material. In that case, we are talking about thousands of unnecessary polygons being rendered.

The third is that TGE will include all of your Collision geometry in this total as well.

25.

When I try to apply some of the existing sequences to my shape or apply a new sequence that I created to an existing shape nothing seems to happen!

For sequence to be applied to a DTS shape all of the skeletal nodes and all of the TGE nodes (such as eye, cam, mount, light, ski, etc.) must match between the two files, if they do not the engine will not allow your sequence to be applied.

26.

When I load my model into the engine and play with it in the game, it seems that everything that I attach to the model (such as a weapon) is pointed backwards!

This is likely a problem with how nodes such as "mount0" are oriented. You need to remember that there are several coordinate systems within your 3D application and the default setting is typically "view". This will display the model transform data to you based on the viewport that you are looking through.

Switch the coordinate system to "local" and then look at your nodes. All of your nodes should have their Z axis facing up, and their Y axis pointing towards the direction that you wish them to emit from. If they are not you need to go into the Motion Command Panel, click on the "affect pivot only" button and then rotate the pivot point until it is oriented correctly.

27.

When I shoot at a weapon.dts file that is mounted to an object (player, turret, etc.) my shots go right through the weapon geometry!

The engine by default does not use collision geometry in weapon.dts 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.

28.

When I walk over a weapon to pick it up, the game will not let me, why?

You need to have collision geometry with your weapon, without it the engine will not know that you have interacted with the weapon to pick it up.

29.

When I export a weapon to use in the game, the weapon is placed incorrectly on my mount node, why is that?

You probably do not have an accompanying "mountpoint" node on your weapon model. Without this node your weapon will be placed based on the location of the "bounds" shape.

Your weapon script might be telling the weapon to be offset.

Resetting Transforms: "The Box Trick"

There is a foolproof way to reset the transform of a mesh in 3DSMAX. Most of the built in methods for resetting the transform are not as clean doing 'The box trick". When you have moved, rotated, or scaled your model you will need to use this trick to cleanse its transform information.

This method is preferred over the reset x-form function in MAX. Reset x-form does it's work by sticking a modifier in the 3DSMAX modifier stack. This adds additional data that must be interpreted by 3DSMAX in order to output the correct data, and it is not always correct or accurate. It works, but it has proved problematic in the past on certain shapes.

Procedure 8.19. The "Box Trick"

  1. Create a simple box shape.

  2. Align this box with the origin of the bounding box.

  3. Convert the box to an editable mesh.

  4. With the box selected, go into the modifier panel and click the "attach" button. Select your character mesh to be attached to the box. The character should now be a part of Box01.

  5. We don't want this extra box geometry hanging around, Choose "Select by Element" select the box shape and delete it.

  6. Rename your character mesh so that it conforms to the export parameters (detail number, etc.)

Your character mesh has a brand new transform, identical to that of the box when it was attached.