torque 3d dts converter

Game Engines, Projects and more
Post Reply
User avatar
seppgirty
Master Chief Petty Officer
Posts: 343
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.
Contact:

torque 3d dts converter

Post by seppgirty » 30 Aug 2014, 15:31

Going to start posting videos about truespace to torque 3d.











just thought i would add the torque 3d dts converter and pdf here in case anyone wants to mess with it. I've been messing with it,
Attachments
torque3d.zip
tsx and pdf
(2.27 MiB) Downloaded 86 times
Last edited by seppgirty on 07 Sep 2015, 20:20, edited 5 times in total.
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com

User avatar
seppgirty
Master Chief Petty Officer
Posts: 343
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.
Contact:

Re: torque 3d dts converter

Post by seppgirty » 16 Nov 2014, 17:03

------------------------------------JUST POSTING ANY INFO I THINK MAYBE HELPFULL------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------

@Kevin. Put your mesh on a new layer and name the layer "Mesh Layer: size=145".

@ Eric. I have used Matt's plugin for creating characters in GameSpace and it works great. One thing you need to know is that the bone structure is quite different in GameSpace then 3DS Max so you will not be able to use the animations (DSQs) that come with the Torque example. If you animate your character in GameSpace and export it, it works great. I haven't yet tried exporting any DSQs only but plan to by tonight.

When you create your skeleton, I always found it best to just build up the skeleton from scratch as opposed to using the Puppeteer plugin. when ever I used to bones in the Puppeteer plugin, after I saved the scene and reopened it, the bones went back to the original size and royaly screwed up my mesh.

This is how I create my characters.

1) Add a new layer (upper left hand corner) and rename it to "Mesh Layer: size=145" . Put your mesh and bones on this layer.

2) create your skeleton. Watch the 3DBuzz tutorial to learn how best to do that. After you create your skeleton and attach it to your mesh, you will need to name the bones properly. Here is the list for the bone names...you should be able to figure out which bone receives what name:

Bip01 Pelvis
Bip01 Spine
Bip01 Spine1
Bip01 Spine2
Bip01 Neck
Bip01 Head
Bip01 L Clavicle
Bip01 L UpperArm
Bip01 L Hand
Bip01 R Clavicle
Bip01 R UpperArm
Bip01 R Hand
Bip01 L Thigh
Bip01 L Calf
Bip01 L Foot
Bip01 R Thigh
Bip01 R Calf
Bip01 R Foot

Once those are named you need to create another layer and call it "bounds". Next click on the DTS icon in your plugins area, then select and click add node for each of the following: "eye", "cam", "mount0". Also, type in node dropdown "unlink" and click add node. I'm not sure yet what unlink is for but the stock DSQs contain them.

You will then need to animate your character. Once that is done, click on the DTS icon again, select "Export Animation" and also "Export in DTS" and then Export it. You will also need to copy your texture to the folder you exported to.

Hope that helps!
Jason


--------------------------------------------------------------------------------------------------------------------------------------------------------


Using trueSpace and Exporting to DTS using Version 2
The second trueSpace add-on for DTS export is version 2.0 which was released by Dark Industries in August 2004. It is described as being a complete re-write compared to version 1.0, and is advertised as having complete support of the DTS feature set, however it is much more complex. There is a 21-page documentation file supplied as a PDF. The version 2 exporter tool can be identified by a “2” in the tool icon.
Setting up the File
Using this exporter requires that you learn how to create a DTS hierarchy using object grouping in gameSpace or trueSpace, which can be done using the Scene Editor. There are several rules for organizing this hierarchy, which includes subtrees for different levels of detail, for collision meshes, etc. These rules are explained here and in more detail in the documentation file.

In addition to setting up the hierarchy in the correct way, there are many custom object properties that must be configured in order to export your DTS shape and DSQ animation files. These custom properties are stored in the “object notes” of the various objects and helper objects in your scene, which is a facility to attach textual notes to the objects of the model, much like the “Comment” facility in MilkShape.

To open the object notes editor click and hold down on the Object tool icon (the arrow icon). Select the Object Notes tool, which is the top icon from the flyout menu to open the object note editor. If you also have the Scene Editor open clicking on any object in the scene editor will display the object notes for the current selected object.

There are two types of object properties that can appear in the object notes:
• A property name followed by a space and a number. For example: “startFrame 0”
• A property name followed by a boolean state (true or false). For example: “twoSided true”.

Only one property name and value pair should appear on each line in the object notes. You can also create comments for yourself in the object notes by adding “//” to the beginning of the line. Everything after // is ignored to the end of the line. For example. “// Note to self......”.

There is a third source of information used for the function of the DTS exporter, which is a configuration file, located in the directory for the .scn file, which is a file called <fileName>.cfg in the same directory as your DTS file is being exported to. The configuration file can contain several keywords that determine which objects are exported and which objects are ignored as well as export parameters.

There are three lists that can be in the configuration file: AlwaysExport, NeverExport, and NeverAnimate. Node and object names are placed into one of those three lists. By default, all objects are implicitly placed into the AlwaysExport list. Names can include wildcards (*) to simplify writing configuration files. Lines with + or - along with the parameter name turn on and turn off boolean parameters.

Lines with = set the value of valued parameters (note: the = occurs at the beginning of a line). If a node’s name matches a name on the NeverExport list, that node will not be exported. Any meshes that are children of that node will be parented to that node’s parent (or its parent’s parent if the parent is also on the NeverExport list).

If a node is on the AlwaysExport list, it will be exported even if there are no meshes on the node, and even if the name matches a name on the NeverExport list. The AlwaysExport list takes priority over the NeverExport list. If a node is on the NeverAnimate list, its animation will not be exported even if it contains animations.
Creating the Model
The materials on the trueSpace object must use the texture shader (rather than a procedural shader). Use the following instructions:
• Click on the blue sphere at the top of the color shader and select plain transparency from the menu.
• Right click on the reflectance shader and select an environment map shader from the reflectance shader selector.
• In your environment map shader use these settings
o Set the luminance slider to 0
o Set the diffusion slider to max
o Set the shininess slider to 0
o Set the specular slider to 0

Your object should be about 5 to 15 trueSpace units on all sides to be scaled correctly for human scale.
Your bounds object should have its axes centered and at the bottom (usually 0,0,0) as this is the point where the object will come to rest on the terrain.

All Torque scenes must contain the following objects at the scene root level in order to export properly:

• A bounding box named bounds. This defines the shapes orientation and position in the world. Without the bounding box, the scene will not export.
• The DTS hierarchy. This is a group in the scene root (base01) that contains at least one detail level marker (_detail#) and at least one additional group with children (start01) that has geometry somewhere in its sub-hierarchy and/ or a IK group that deforms a mesh.

A detail level marker indicates to the exporter what detail level mesh should be drawn at a given distance. The number following the name of an object corresponds to the pixel size in the game engine at which the shape will be drawn. The shape branch of the DTS hierarchy corresponds to the actual DTS shape that will be exported. The whole subtree can be under one branch or there can be multiple branches (shape01, shape02, etc.).

Here are the steps to start from a visible shape and fill out the surrounding nodes:

1. Create the shape. Union it into a single shape object.
2. Rename the shape to be an object called “shape64”.
3. Create the collision object.
4. Rename the collision object to be “col-1”.
5. Group as sibling between shape64 and col-1.
6. Rename the group to be “start01”.
7. Create two marker objects as cubes off to the side.
8. Rename one to be “_detail64”, and one to be “_collision-1”
9. On the scene editor, select each of _detail64, _collision-1, and start01. Then group as sibling.
10. Rename the group to be “base01”.
11. Create a cube and adjust it to be the bounds of the object.
12. Rename the cube to be called “bounds”.

The resulting hierarchy will look like:


You can have a custom collision mesh. Vehicles are limited to ONE collision mesh for the collision shape. Complex collisions can be created using multiple simple collision shapes

Collision meshes cannot be concave. In the Torque engine, the collision bounds are shown with a yellow box when the object is selected in the game editor.

Triangulation is handled automatically by the DTS Exporter. Unless you prefer implicit control of the triangles in your model it is fine to leave the objects in the scene as quads as the Exporter uses functions in the TSX SDK to return a triangulated version of the objects in the scene at export and the objects in your scene are left as they are.
Fixing the Scaling
A hidden “gotcha” in the export process is that you need to convert your objects to proper coordinates, since the object manipulation tools in trueSpace doesn’t actually change the physical size of an object, instead these tools apply a scale factor to the X, Y, and Z axes of all objects.

Since there is apparently no way in trueSpace to freeze the scale transforms of an object before export you must export your objects (including the bounds) from trueSpace to the .X format and then load the objects back into trueSpace. The .X exporter recalculates the vertex positions and recalculates the scale transforms applied to exported objects. This will allow your objects to export at the proper size.

To export your object to .X format, select an object in your scene or group all of the objects in your scene and select the object group then click on the file menu and choose: “save as object” and choose the .X format from the file type selector. Click the settings button in the save object window and adjust the .X exporter settings to fit your needs. In the setting dialog box, turn off all options.
Animation
After all of the modeling and scaling (using the .X export/load) has been done, you can add the animation to the file. We have more discussion of this in the trueSpace notes.

While the Exporter does support a range of animation types, the one that works best is the bones and joints-based animation.
Performing the Export
Now you are ready to perform the export itself: Left clicking the Exporter icon will export all of the objects in your scene as a DTS file and any sequences setup in the file will be stored inside the DTS file. Right clicking the exporter icon will export all of the sequences in the scene as one .DSQ file containing all of the sequences setup in your scene.

This step produces a “dump.dmp” file in the output area, which is a text file that contains a processing log for the exporter. It can provide a trace of what objects were exported, how many nodes they have, etc.

Finally, you will need to copy all of the texture files used into the resulting area.
Last edited by seppgirty on 19 Apr 2015, 15:10, edited 1 time in total.
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com

User avatar
seppgirty
Master Chief Petty Officer
Posts: 343
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.
Contact:

Re: torque 3d dts converter

Post by seppgirty » 16 Nov 2014, 17:06

tHIS IS A ZIP FILE THAT CONTAINS a scene and some objects for truespace to torque. I did not make them. read the read me file that comes with it.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------

I have a small encapsulated trueSpace project folder that is strictly for Torque DTS creation. It contains the following:

- One default scene with the minimal items to get started and good use of layers for organization

- One example scene with many of the exporter's features

- A material library with the default exporter material and three other commonly used variants (self-illum, material transparency, env mapping enabled)

- A shape library with common objects (like base01 group, misc. markers, etc.)


The example scene has simple node animation, auto LOD, manual LOD, billboarding, and other miscellany. It can be used in the latest head as player.dts provided that the DSQ mapping in player.cs file is removed (just delete the sequence## lines.)

It has helped me as I learned the new workflow and nuances of the new exporter. I'd be happy to share it with anyone else who'd like it. Better yet, if someone would care to host it someplace, it'd save one-to-one distribution. :)


Luke
Attachments
20040831_gameSpaceTorqueProject.zip
(94.23 KiB) Downloaded 70 times
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com

User avatar
seppgirty
Master Chief Petty Officer
Posts: 343
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.
Contact:

Re: torque 3d dts converter

Post by seppgirty » 16 Nov 2014, 18:30

Tip by Andrew Locko for vehicles.......................................

For those of you using the 2.0 DTS exporter in GameSpace, here are some things to keep in mind to make your vehicles work right in Torque:

1.You need a bounds ( outside of the heirarchy ),as well as "_collision-1", "_mount#", "_hub#", "_cam","_eye" nodes.
2."_hub0" should be driver side front, "_hub1" should be passenger side front, "_hub2" should be passenger side rear, "_hub3" should be driver side rear.
3.Bounds, collision, and nodes should have no scale factors on them. This is achieved by exporting them in .X format then re-importing them into your scene.
4. Whatever # is at the end of the detail node should also be at the end of mesh object names
5.Use .cfg file to comment out group nodes ( i.e. base01 and start01 and include any subgroups )
6.For tires, the axis for the bounds, collision, and mesh should be at the objects center and there should be no rotations applied to the tire mesh. You should also have a collision object for your tire mesh.

User avatar
seppgirty
Master Chief Petty Officer
Posts: 343
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.
Contact:

Re: torque 3d dts converter

Post by seppgirty » 18 Apr 2015, 16:05

Matt Summers on using LODS

-----------------------------------------------------------------------------------------------------------------------------------------------------

The LOD tool built into gameSpace and trueSpace is a big waste of time, so dont even bother using it . It creates really bad geometry and looses all of your UV mapping. That said there are two basic ways to create geometery for your detail levels.

1) Make several copies of your mesh objects and manually remove geometry from from them to create the mesh objects for your detail levels.

2.) Use the AutoLOD generation tools that are built into the gameSpace DTS exporter.

Here is a quick overview of using the autoLOD tool in the DTS exporter more information on using AutoLOD can be found on page 9 of the Docs that come with the exporter.

So let say that your mesh object is named "projectile" rename this object to "projectile128" the number added to the name of the object is the size value of this detail level. This tells the exporter that this mesh object should appear in Torque untill it reaches 128 pixels in size. If you were to export this object with only this detail size it would most likely dissappear rather quickly as you moved away from the object in game or as it moved away from you. To correct for this you can either lower the size value to something like 2 or you could add more detail levels to your shape that have smaller size values. As the object gets smaller or larger in game, Torque will automatically switch between the detail levels in your DTS shape.

To use the autoLOD tool that is built into the exporter you need to add information to the object notes of each of the mesh objects in your scene that you wish to auto generate LODs for. This information will tell the exporter how you want it to generate LOD's for your shape. Here is an example that will generate 4 additional detail levels for our shape named "projectile128".

In the object notes for "projectile128" add the following:

numAutoDetails 4
autoDetailSize0 64
autoDetailPercent0 0.8
autoDetailSize1 32
autoDetailPercent1 0.6
autoDetailSize2 16
autoDetailPercent2 0.4
autoDetailSize3 2
autoDetailPercent3 0.2

numAutoDetails - tells the exporter the number of detail levels you are going to have it generate.

autoDetailSize - starting from 0 you will need one these for each detail level you are generating. this setting tells the exporter the size value of each generated LOD. It must also have a matching autoDetailPercent.

autoDetailPercent - starting from 0 you will need one of these for each detail level you are generating. This setting tells the exporter the percentage of triangle reduction to apply for each generated LOD. The value is a floating point number between 1.0 and 0.1 in this example 0.8 is a 20% reduction, 0.6 is 40%, 0.4 is 60% and 0.2 is a 80% reduction.

The last thing you need to do is create detail level markers for your shape. Every detail level requires a detail marker for it to be exported properly, even autoGenerated detail levels. Add the following detail level markers and add them to the group base01.

_detail128
_detail64
_detail32
_detail16
_detail2

If everything else is setup correctly your scene will export to DTS and your DTS file will contain the highest detail level that you created and the 4 autoGenerated LODs that the exporter created for you.


-----------------------------------------------------------------------------------------------------------

Groups end up as nodes, groups are not mesh objects and as such they cannot have LOD settings (auto or manual), only mesh objects can have LOD. A group in gameSpace or trueSpace is just a location in 3d space that effects all of the objects in the group. You can see this by clicking on the group name in the scene editor and then clicking the axes icon (axes are also called the center or pivot in other 3d apps) to make the axes for the group appear. You can also move the axes of the group to any location that you desire, the default is usually the center of all of the objects in the group.

For autoLOD to work you need to add autoLOD settings to each of the highest detail level meshes in your dts shape and also add detail level markers for each unique detail level you want to create.

Using the example above you would rename your first detail marker to a higher detail size like 128 (or what ever looks best to you) and then also change the names of your highest detail level meshes to reflect this change. Then you would add detail markers for each of the the detail levels you want to create using autoLOD. Finally in the object notes for each of the highest detail level meshes you will add the autoLOD generation properties that are listed in the docs for the exporter. (Which basically consist of how many LODs to create, the pixel size at which to display them and the % of poly reduction to apply for each detail level generated.)

Make sence?
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com

User avatar
seppgirty
Master Chief Petty Officer
Posts: 343
Joined: 22 May 2009, 03:34
Type the number ten into the box: 0
Location: pittsburgh Pa.
Contact:

Re: torque 3d dts converter

Post by seppgirty » 06 Sep 2015, 21:30

just added videos in top post
truespace 3.2, 5.2, 6.6, ani-pack, flash plugin,........ you can check out my films athttp://www.chaosbrosfilms.com

Post Reply