![]() |
Maya2DTS Frequently Asked Questions compiled by: Danny Ngan updated: September 16, 2004 |
Either one will work in Torque.
Although there are no maximums or limits for polygonal models in Torque (meaning, you can go as high as your target system can handle), here are some recommended polygon counts:
For any other object that you wish to add to the scene (e.g. crates, barrels, rocks, etc.), you should not exceed 400 polygons for each model. It is recommended that you aim as low as possible, since there is no reason that extra scene objects should be polygon-intensive.
These values are only recommended numbers for optimal speed on average video hardware. This is by no means are a hard limit. When targetting high-end video cards, the polygon counts can be much higher.
In general, polygon counts for games refer to the number of triangles in the shape. This can be a confusing topic in Maya, because Maya's poly count feature (Display > Heads Up Display > Poly Count) counts any n-sided face as a polygon. For example, 4-sided face (quad) in Maya will counted as 1 polygon, but a quad is actually 2 triangles.
There are several methods for getting the actual triangle count of objects in the scene:
polyEvaluate -t;
You can use NURBS to create models, but you will need to either convert the meshes to polygons or set the output type for the NURBS surface commands to polygons (this is set in the options boxes for any NURBS surface command).
You can use subdivision surfaces to create models, but you mush convert them to polygons prior to exporting.
Some formats either do not contain vertex normal data or the face normal information is not compatible with Maya. To solve this problem, you must reverse the normals (Edit Polygons > Normals > Reverse) on the faces that are rendering incorrectly.
You should use empty groups (also known as null objects) for these nodes. You can create an empty group from Create > Empty Group or by pressing control-g (the default hotkey for the group command) with nothing selected.
It is recommended that you do not leave any open edges on your meshes. These could potentially cause the exporter to hang a bit when it looks at the location of vertices in the 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 the mesh, you will need to close the hole and export again.
Multires is a modifer that is only available for 3D Studio Max. There is currently no equivalent feature for Maya.
No, you do not need to create more than one LOD for your model. However, it is recommended that you have multiple LODs to improve in-game performance.
Collision geometry should be anywhere between 10 to 30 polygons. Higher polygong counts for collision geometry will affect performance in the engine, because the engine must calculate collision for every face on every frame. It is recommended that collision geometry be a best fit, not a perfect fit.
You can have up to nine (9) collision geometry nodes in your scene.
The "box trick" is a method used in 3D Studio Max to cleanly reset the transforms on scaled objects. In Maya, you can use Freeze Transformations to reset the transforms (Modify > Freeze Transformations). By default, the Freeze Transformations command affects all transforms (translate, rotate, and scale). You can isolate a single transform in the Freeze Transformations options box.
You should use real-world measurements for your models. For example, the height for a standard human male might be 2 meters = 200 centimeters. Most measurements in Torque are based on meters. Changing Maya's linear working units from the default setting of centimeters to meters will make it easier to coordinate object scales in Maya and Torque.
You can use Lambert, Phong, and Blinn materials.
To make a material transparent, the texture map on the object must have an alpha channel. The amount of transparency is controlled by the alpha channel. Applying a texture with an alpha channel to a material's Color attribute will automatically apply the alpha channel to the materials Transparency attribute.
Torque supports JPG, TGA, and PNG file formats. PNG support for Maya 5 is provided by the IMFPng Plugin included in the Maya2DTS File Pack. PNG support is built-in for Maya 6.
Yes. Torque supports animated texture maps as IFL or Image File Library. An IFL is a text document with a list of filenames for each image in the animation.
However, Maya does not support IFLs as textures. You can still assign the IFL to the materials Color channel, but you cannot view the animation in Maya's viewpanels. The animated texture must be viewed in the ShowTool or in the game.
You can use 512x512 texture maps, but, in general, 256x256 or smaller power of 2 images should be used instead. This will help to converse video memory.
No. The exporter only supports one UV set.
Add a custom attribute named vis to the mesh. The vis attribute must be a float value with a minimum value of 0 and a maxmimum value of 1.
This attribute can be added quickly from DTS > Rendering Options > Enable Visibility Animation in the dtsUtility window. enableVis must also be turned on in the matching sequence node.
Two-sided materials are supported by adding a custom attribute named twoSided to the mesh. The twoSided attribute is a boolean value that determines whether or not the shape will export with double-sided materials.
This material can be added from DTS > Rendering Options > Enable Two-Sided Materials in the dtsUtility window.
Yes. Simply assign the appropriate materials to the specific faces that need them.
Using multiple 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) an instance of the mesh for each texture that is applied to it. So, if you have 2 textures applied to a mesh and that mesh 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.
Procedural textures are not supported by the exporter. However, you can render the procedural texture to an actual image file and then apply that to the mesh.
The Maya2DTS exporter only support smooth binding. Rigid binding is not supported.
You can use deformers, but they must be exported as morph animation in order to work in the game. However, it is recommended that you do not use morph animations unless it is absolutely necessary, because morph animations can result in extremely large files that could impact performance in the engine.
Although this has not been tested, the tentative answer is no.
You can either parent all the segments into a hierarchy and animate them via FK (forward kinematics) or parent each segment to joints in a skeleton and animate the skeleton.
Yes.
There is currently no Character Studio equivalent for Maya. There are, however, auto-rigging MEL scripts available online. These scripts can be found on at HighEnd3D (www.highend3d.com). Be careful with some of these scripts though. Most of them are not designed with real-time performance in mind and may include elements that are not compatible with Torque.
There is not set number of joints that must use for a character. You can use whatever is necessary to get the correct deformations and control for the character.
Yes. Be sure to include those control objects in the AlwaysExport list in the configuration file for the animation.
Parent all of the top-level nodes of the character rig to an empty group. Make sure to only include joints, IK handles, and control objects and not the mesh. Scale the new group object to the desired size.
This is not a sure-fire solution, but it works the majority of the time. If you use set driven keys and/or expressions to control the rig, this will most likely not work. In that instance, you must rebuild the entire rig at the correct scale.
Yes.
All animations that you wish to export must be marked with a sequence node. See the Maya2DTS reference for more information on how to set up and use sequence nodes.
Typically, a person will move the following distances in one second:
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.
You will need to add a sequence node called "ambient" and set it up for exporting your animation out to the DTS file. The engine will automatically see the "ambient" sequence and play it. By default, the engine will not play animation sequences on static shapes that are not named "ambient".
All meshes must be triangulated in order to export. Be sure that every single mesh that is part of the shape is triangulated (Polygons > Triangulate).
This means one of two things:
Check the dump file that was generated to see where the export stopped. That will help determine which object/node is causing the problem.
If the export stopped while optimizing the mesh, here are some possible problems/solutions:
These are not sure-fire methods for avoiding crashes. Building clean meshes, organizing objects in the scene and keeping the scene clear of unneeded nodes will help to keep your process less error-prone.
This usually means that you built your model at Maya's default linear unit of centimeters. Torque uses meters for most measurements. You will need to scale up your model, so that it will render correctly in the game.
You should use real-world measurements for your models. For example, the height for a standard human male might be 2 meters = 200 centimeters. To simply things, you can set Maya's linear units to meters.
It is likely that the bounding box is inheriting the Y-axis motion from the object it is linked to (e.g. root joint of the character). Make sure that the bounding box is only parent constrained on Z-axis for forward and backward motions and, if necessary, the X-axis for side-to-side motions.
Make sure that the texture file is in the same directory as the DTS file.
In Torque, the positive Y-axis is forward with positive Z being up. However, in Maya, positive Y is up. To compensate for this, the bounding box's local axis is used to orient the model in Torque. Make sure the object is facing the same direction as the bounding box's positive Y-axis.
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.
There may be a syntax error in the .CS file that is associated with the DTS shape.
It is also possible that the animation contains nodes that are not in the DTS file. All nodes in a sequence must exist in the matching DTS file.
Make sure all of the objects' names have a number at the end that matches the corresponding detail markers in the scene. For example, if you have a detail marker named "detail64", then all meshes at that detail level should have the number 50 at the end of their names, like "head64", "body64", etc.
Make sure that all objects and nodes are parented correctly. Hierarchy errors can result in object data not being exported.
Check your dump file to make sure that objects are being exported correctly and are not being ignored by the exporter. If an object that should be exported is being ignored, add that object to the AlwaysExport list in the .CFG file associated with the scene.
You either forgot to add an eye or cam node, or the eye and cam nodes are being culled by the exporter, or you forgot to move the nodes to their correct locations on the model.
If the eye and cam nodes are being culled by the exporter, add them to the AlwaysExport list of the .CFG file associated with the scene.
It is possible that the mount nodes are being ignored by the exporter. Add them to the AlwaysExport list in the .CFG file associated with the scene.
It is also possible that the weapons do not have mountpoint nodes on them. Be sure to add them to the correct locations on the weapon models.
There are a few reasons why polygon counts in the engine and in Maya may differ.
One reason is that when the exporter encounters a material with "twoSided" 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.
Another reason is that Torque will include all of your Collision geometry in this total as well.
This double mesh (or ghosted mesh) is caused when a mesh that is smooth skinned to a skeleton is embedded in the shape hierarchy. When a shape is exported, the exporter automatically finds all meshes that are skinned to joints in the shape hierachy and exports them accordingly. It is not necessary to embed the skinned mesh in the hierarchy.
The solution to this is to unparent the skinned mesh and place it at the scene root level.