Game Development Community

Yet another Skinned-Sorting w/Misc Problems Thread

by Raxx · in Artist Corner · 01/09/2006 (4:29 pm) · 24 replies

After much chin scratching and ramming of my head against the wall, I now lay (almost) all my hopes in the hands of the community...

I have a model with 6 different mesh objects: Body, Mane, Tail, Eyes, Saddle, Chain

They all have their separate materials, and the Mane, Tail, and Chain materials have opacity checked.

All the objects are skinned with their vertices assigned to a slew of bones (hopefully irrelevant to the problem, except that the SORT:: parameter can't be used).

Exporting is smooth, but when I load the DTS file in Torque Showtool Pro (and TGE), the sorting issues are apparent. The Mane, Tail, and Chain are overlapped by the Saddle, Eyes, and Body meshes regardless of which perspective the horse is viewed in. Below are pictures of what it looks like in TSP and the hierarchy in 3dsmax.

I know some if not several have come across this problem, and I would like to know what solutions are possible. Is there a parameter I can use in the .cfg file that can help with the sorting issue?

usera.imagecave.com/Raxx/mane_tail_sort_error.jpg
usera.imagecave.com/Raxx/schematic_sort_error.jpg
All my progress has come to a mind-numbing halt due to this problem, and I do not wish to turn to alternatives that would drastically sacrifice the quality. If someone could shed light on this problem, I would be most grateful.

Now, the other problem I have is that some of the actual bone objects become exported as a mesh (you can see one of them sticking out of the tail). I'm not sure if there's a simple fix within 3dsmax for this, so I figured I'd toss this in as well, see if anyone knows the solution off the top of their heads. [edit] Whoops, figured out the bones issue (number suffix problem--the numbers at the end of some of the bones were the same as the detail level (detail1)--so changing the number to something else or with a 01 instead fixes everything).
Page«First 1 2 Next»
#21
01/11/2006 (1:24 pm)
OK I got the script wrote (SORRY Raxx Couldn't wait). I think it works pretty good for now. I am gonna upade it with a drag drop gui, a macro and an installer but that gonna take few more days. If it happens at all.

The script can be found here: ReOrderScene.zip

Simply unzip the script into the script directiry you use and RUN SCRIPT from any script choice (utility or Menu.

The MAX 6,7,8 DTS exporters can be found HERE: MAX6,7,8 DTS exporters. I can,t vouch for the state of any of them I think they are all good though. 8 is slow and not modified yet.

Let me know if there are any problems with anything. Instructions are at the top the script. Its real easy to use.

Have Fun
Matt

IMAGE OF GUI

--- This script was created by Matthew Jones to address an issue brought and solved by RAXX at this Forum thread
--- http://www.garagegames.com/mg/forums/result.thread.php?qt=38584 
--- The method use in this script for reordering the scene is the same method devised by RAXX.
--- Matthew Jones and Sharp Productions make no warrenties or claims of use. USE AT YOUR OWN RISK!
--- Instructions  and Preface ---
--- The SceneReOrder tool will only pick up objects in your scene that have a SKIN modifier applied to them
--- As we supposed to know in a scene built for DTS has everything linked to either the start node
--- or the Base node EXCEPT any nodes modified with the SKIN modifer. 
--- To make these SORT correctly wee need to reorder them in the SCENE LIST. The scene list is an array (or a list) of objects that 
--- MAX stores in memory.
--- This tool reorders that array. HOW?
--- Simply by parenting all our skin objects to a dummy helper then unparenting them in the order we chose.

--- Simply select the order in which you want things wrote to file. Keep in mind Torque draws these things from the top of the file to bottom
--- Example ---
--- You have 3 skin modfied meshs in your scene. A B C
--- A is solid, B wraps A with transperant material, and C wraps B with another. To correctly SORT in the Zbuffer you would want A to draw 
--- first then B to draw second then C to draw third.
--- In the Reorder tool you would choose them exactly in that order A in the first slot, B second slot, And C third slot.
--- Then simply hit REORDER. your scene will then be correct 
--- On the right of the slots you will notice the current state of your scene this will update according to the way you reordered the scene.
--- The Re-Populate list button will repopulate all the listbox slots with any NEW objects you might have added since you opened the tool
--- Some Advice ---
--- Build your scene first and reorder after you exported one time. This will allow you to see what changes need to made to your object IF ANY.
--- I have 12 slots if you need more either add them yourself through script or post on the forum address above and I will try to help.
--- Good luck
--- If you have any problems with the script please make note of them in the above forum address.
#22
01/11/2006 (1:32 pm)
Nice job, it's a different (and more efficient) approach than the script I'm working on, looks like it'll work pretty well (can't test it out yet)

I'm going to still finish mine, because I want to add more tools to it later as well ;)
#23
01/11/2006 (1:37 pm)
Well feel free to write me if you need any advice.

Matt
#24
01/12/2006 (2:11 pm)
Figured I'd post my progress at least, though I'm far from done. So far this script properly re-arranges selected nodes of any type that have undefined parents, and there's only a few bugs I have to stamp out before I implement support for nodes with defined parents (for cases where the meshes are parented to a dummy, such as "detail2").

I've also begun on the help and about section of the script, when it's done it'll explain plenty about how to use the features and what it does.

I'm probably going to add other tools, like resetting the transform data for selected nodes, instantly creating the helpers necessary for static, skinned, vehicle, and player DTS shapes, and other things that'd speed up production (even if these tools are already available in scripts made by users before me).

Here's a screenshot of what it looks like so far. I'm not posting the script until I'm sure it won't break on me, and not until I get the preview feature working properly.
usera.imagecave.com/Raxx/tut1/dtssortprog1.jpg
Page«First 1 2 Next»