Game Development Community

Detail levels on mesh?

by CDK · in Artist Corner · 11/23/2006 (7:21 am) · 8 replies

I get a " assertion failed: Too many details for mesh " error when try to export my tree to DTS from Max8.
What is te maximum detail levels TGE supports?
or how do i get around this?

How do I build a decent tree that is easily imported to Torque?

#1
11/24/2006 (4:12 am)
Not sure there, never experienced that error, but check if you have detail nodes that do not have a corresponding detail mesh. I don't know if theres a limit, but 3 - 5 Is usually enough.

So if you have detail8,32,64,96,128 but only the mesh8,32,64,128 you are missing the 96er...
#2
11/24/2006 (4:45 am)
That could be the problem...

How do you guys build your models that has more than one object? i.e My tree has A LOT of branches and twigs and a lot of them are sepperate objects all contained in the bounds box. Could this not maybe be a problem?
#3
11/24/2006 (6:02 am)
Part of the problem maybe. Every Object needs to be labeled with a detail trailing number and then every object needs as many diffrent Level of detail versions (meshes) as you have detail dummys. So If you have a Tree trunk and 10 Branches and 5 Detail levels you need to create 5 Trunks and 50 Branches etc.

So weld those branches onto the trunk to create a single Object. Run an STL Check just to make sure you have no double faces or other errors afterwards.
Then use this mesh to create Lower res versions.

This is not a TGE requirement, yet its always easier to have as few meshes/objects as possible.

So to test this I would say: Make the tree one object, create a snapshot, make it lower res and name the low res tree2 and add detail2 node and the Highres tree 128 and make a detail128 node. Export and test. If you get that working you can then add the otherLODs in the same manner.

Cheers
#4
12/07/2006 (5:29 am)
I still get errors but it seems your advice may lead to getting this right. Making progress.
Thanks Thak.
#5
01/12/2007 (6:02 am)
Nick, can you contact me please, check my gg profile for addy.
Thanks.
#6
01/13/2007 (6:52 am)
You have mail
#7
02/17/2007 (4:51 am)
The problem is in the .cfg file that is located in the root directory of max that has a setting in it for =Params::T2AutoDetail 250. I had a lot of issues with that one a few max versions ago.

C:\3dsmax8\plugcfg
In your similar dir there will be a config file that is used. Torque will first look in the same folder as your model file for the .cfg file. If it does not find it it will load a default one. The docs are not too clear on this and it does have a line in it that you can comment out or calculate your detail for it.
The file is named "dtsScene.cfg". In your folder with your model you should have one named "player.cfg".
These files tell the exporter how to deal with the model. below is an example of one that I have had for a while. This file is meant to be a starting point for you. You will need to edit it to make it work for your model. It was used as a base for Tribes exporting back during my mod days.

AlwaysExport:
eye
cam
mount0
mount1
jetnozzle0

NeverExport:
Bip01
Bip01 L Finger*
Bip01 R Finger*
Dum*
submesh*
Bip01 L Toe*
Bip01 R Toe*
Gun256
case right
guide right
case left
housing left
disc
housing right
sensor
handle_disc
second hand hold
guide left
generator
hideGun256
start01
root 128
energy 128
endcap 128
sensor 128
barrel 128
mountpoint

=Params::T2AutoDetail 250

The =Params::T2AutoDetail 250 is what was used for a typical tribes2 geometry and setup. You need to understand this setting to be of any use towards your setup.
Below is what I used to use for Torque a couple of years ago. (Sorry I havn't been as up to date as others.)

AlwaysExport:
eye
cam
mount0
//mount1
//jetnozzle0

NeverExport:
Bip01
Bip01 L Finger*
Bip01 R Finger*
Dummy*
Bip01 L Toe*
Bip01 R Toe*
start01
mountpoint
DELETE*
//Ski0
//Ski1
Light0
Light1
//Mount1
//Mount2

+Error::AllowEmptySubtrees
+Error::AllowCrossedDetails
+Error::AllowUnusedMeshes
-Error::AllowOldSequences
-Error::RequireViconNode
-Param::CollapseTransforms

//=Params::T2AutoDetail -1

Notice I have the last line commented out.
If you have this line and its uncommented then this is what is kicking back the error.

There is a good explanation of this on the following website: http://fosters.realmwarsgame.com/maxdts/section4.html

Now if you do not have this in the config file and you still get the error then you do not have the meshes in max set up correctly. Basically your telling the exporter that you have X number of detail meshes via either the naming method or the dummy boxes. Now the exporter has to look 2 places. One being the tree under Bip 01 I believe and there is the multires::model properties under the User defined tab. In there you need to have custom information typed in.
Open up the default file that comes with torque(mine was the orc) and find the Multires::bodymesh object. Then right-click on him, then go to the User Defined tab. In here you will see the following:

MULTIRES::DETAILS = 1.0,0.76458,0.64795,0.50621,0.29042,0.1345,0.7256,0.05452
MULTIRES::SIZES = 145,80,60,30,18,12,6,3

The exporter uses these values to calculate the LOD's and is also a reason for that error.

This is all from memory back when I had a similar problem.


Stephen
#8
02/26/2007 (12:51 pm)
Well, I have actually gone back to my program of choice. Lightwave 3D ;) We have just bought Lightwave 9. Although we have a 2 year educational MAX8 I do really preffer Lightwave. The excellent exporter Dave wrote makes the process much less of a hassle than MAX imho.

So I got it to work in the end using Lightwave.

Stephen thanks a lot for your help.
I will still try it out as well in MAX just so I get to know that program as well. It is probably more industry standard than Lightwave3D.