GameSpace 1.5 - LODs?
by Josiah Wang · in Artist Corner · 12/19/2004 (2:09 pm) · 6 replies
(question sparked from here ...)
anyways, I tried to create LODs for my ball projectile in gameSpace to no avail. I tried the Polygon Reduction Tool (which, according to the manual, is used for LODs) with the following settings:
Number: 5
MinDetail%: 10
CavityDet: 0
LOD Group: [checked]
UnionFirst: [checked]
LongEdges: [unchecked]
and all that did was (i think) created the 5 different LOD variants of the ball, and then grouped them together. The show tool doesn't do anything to the model (only 3 notches appear on the slider, as compared to like 6 for the original projectile shape - and moving the notches on my ball projectile doesn't change the shape or the numbers)
Help a newbie out x.x thanks!
[EDIT]
oh yeah, I remember reading on the gameSpace exporter manual that an object has to be exported to a .x shape first, and then to a .dts (because the the sizes don't export correctly) - if that's the case, do I apply the LOD before i export to .x, or after i export to .x?
[/EDIT]
anyways, I tried to create LODs for my ball projectile in gameSpace to no avail. I tried the Polygon Reduction Tool (which, according to the manual, is used for LODs) with the following settings:
Number: 5
MinDetail%: 10
CavityDet: 0
LOD Group: [checked]
UnionFirst: [checked]
LongEdges: [unchecked]
and all that did was (i think) created the 5 different LOD variants of the ball, and then grouped them together. The show tool doesn't do anything to the model (only 3 notches appear on the slider, as compared to like 6 for the original projectile shape - and moving the notches on my ball projectile doesn't change the shape or the numbers)
Help a newbie out x.x thanks!
[EDIT]
oh yeah, I remember reading on the gameSpace exporter manual that an object has to be exported to a .x shape first, and then to a .dts (because the the sizes don't export correctly) - if that's the case, do I apply the LOD before i export to .x, or after i export to .x?
[/EDIT]
#2
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.
12/19/2004 (5:04 pm)
For future reference questions on using the gameSpace DTS exporter should probably be posted the torque artist forums in the section for the gameSpace DTS exporter located hereThe 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.
#3
This is done by either saving to the .x format and reimporting the objects back in or by using the scale normalizer tool written by Luke Derossi that can be found on this thread.
12/19/2004 (5:18 pm)
Also make sure to freeze the scale transforms of all of your objects before you export your DTS shape. This includes the bounds, mesh objects, nodes, collision, everything except markers.This is done by either saving to the .x format and reimporting the objects back in or by using the scale normalizer tool written by Luke Derossi that can be found on this thread.
#4
also, what is this group thing? I read in the gameSpace manuals, and it talked how layers can be groups...is this what you mean?
many thanks again for helping out a poor newb!
12/20/2004 (12:21 pm)
@Matt Summers: thanks man, that was really helpful! just a question though - i changed the name to projectile32 in gameSpace's scene editor, and the object notes editor displayed projectile32 at the top, so i assume i did it correctly...right?also, what is this group thing? I read in the gameSpace manuals, and it talked how layers can be groups...is this what you mean?
many thanks again for helping out a poor newb!
#5
Take a look at Matt's DTS exporter doc - you need at least a 'base01' group and within that a 'shape01' group which contains your highest details mesh(es).
12/20/2004 (2:47 pm)
So all of your objects are at the root level in Scene Editor? You can create a group by dropping one object on another - a new group will be formed and those two objects will be in it. You can then rename the group just like you would any other object.Take a look at Matt's DTS exporter doc - you need at least a 'base01' group and within that a 'shape01' group which contains your highest details mesh(es).
#6
Make sure you are using version 2.0 of the DTS exporter and not the one that is built into gameSpace. The newest version uses group and marker objects to control how things are exported. If you dont know what those are you are probably using the wrong version of the exporter.
12/21/2004 (10:15 am)
Josiah,Make sure you are using version 2.0 of the DTS exporter and not the one that is built into gameSpace. The newest version uses group and marker objects to control how things are exported. If you dont know what those are you are probably using the wrong version of the exporter.
Paul Kreemer
gamespace tips