alpha face sorting inside single mesh? 2004-03-29 - By NoiseCrime
Back
-- -- Original Message -- -- From: "Mads Rydahl" <mads@(protected)>
> I have tried multiple geometrical approaches, including offsetting all 4 verts 1 > unit in z and keeping the camera close by, offsetting 1000+ units, slanting the > faces, so that the lower two verts are significantly in front (like this: > /////), rotating the entire model slightly, you name it... I feel I've tried > everything, but I don't understand the logic at work.
As you've found out there doesn't appear to be sorting of polygons within a mesh, which is giving you problems. Funnily enough i just replied to a similar topic on dirgames-l, not very funny is the bizarre observations i've made with. I've forward the post to this list so you should find it pop up (possibly before this one)
One problem you might have is the rebuildign of the mesh. This isn't required and more than likely is causing the changes in the rendering order you see. This is becuase when you build a mesh in sw3d it does some housekeeping on the mesh in the background, and can do all manor of strange things to your geoemtry that you'll never know about.
However i have an assumption which might help you (but if you see the crosspost message you'll see its not qwuite as straightforward). That is once a mesh is built the face order (i.e. the order the faces are rendered in) should be consistant, as long as you don't rebuild it. So what you should be able to do is sort your sprite quads, and then convert these into the built mesh, where the furthest traingle away will be placed into the vertex indices of the first face, then the next traingle into face 2 and so on.
This 'should' mean you'll get the correct drawing order.
Something else to try would be splitting your sprites into groups of objects that exist at the same depth. Each group then becomes a model and seeing as models are drawn in sorted order that might give you some control over layering.
Noisecrime 2004
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|