Game Development Community

So, there's no way to SORT a skinned mesh?

by Andrew Locko · in Artist Corner · 04/20/2005 (4:13 pm) · 7 replies

I'm having this problem where my skinned animated driver is showing up in front of everything that has transparency applied to it. I've been sorting all my meshes so that they display correctly but I've read on this forum that a skinned mesh can't be treated the same way? Is there any solution to this?Thanks

#1
04/21/2005 (8:27 am)
Nope no solution at all. The reason for this is that the SORT:: algorithm subdivides the faces so that they can hopefully render properly, the problem that arises when you use skeletal deformation to drive the characters is that you have a whole bunch of new verticies that are unweighed or have reordered the vertex numbers so that the weights drive them differently.

The best solution is to be proactive and not to have transparent textures on your player characters or just live with it if you do.

Logan
#2
04/22/2005 (12:59 am)
Oh man I just ran into this and it sucks so much!
No translucent visors, no smooth edges on decals, no headlights with smooth edges!
#3
04/22/2005 (8:24 am)
I'm totally uninformed here, but I'm trying to understand the issue.

@Andrew - To be clear your skinned driver does not itself contain transparency... right? It's that the driver is appearing in front of other DTS shapes with transparency... right?

@TerroX - Couldn't you mount a visor or other transparent accessories for your character? This would make it a sub object of your skinned character and would always render after your character does. This also has the benefit that you can remove or exchange the visor or accessory dynamically in game.

As for headlights i suspect you mean a decal which makes the lights *look* like they are lit up? Isn't that usually done with a particle or strictly on non-skinned objects. It doesn't seem that decals are an issue for skinned characters.
#4
04/22/2005 (9:13 am)
@Tom - Correct. My driver mesh itself has no transparency or alpha applied to it. Just the car itself.
#5
04/22/2005 (9:15 am)
I just fixed this problem by detaching my driver into pieces ( arms, legs, head ) and animated the mesh itself without it skinned to a skeleton. Now everything is sorting nicely. It's not the common way I animate a character, but in this case it works. :)
#6
04/22/2005 (9:41 am)
@Andrew - Hum... i see the problem you had i think. You have to find a way to force the rendering of the driver *before* the car is rendered. There seems to be no sorting done for ShapeBase objects even if they have transparency. That sounds very odd, so maybe I'm not finding the right part in the code. ;/

I guess your fix of splitting up the character happens to be lucky and made things render in a different order. Or is there a more logical reason for the split up to change the sort order of rendering?
#7
04/22/2005 (6:25 pm)
Tom,
Yes I have split it up. But it limits the amount of fx I can do with only 8 mount slots available, most taken by other game objects.