re-sorting triangles from a polygon soup.

Started by
1 comment, last by shotgunnutter 16 years, 3 months ago
Hi, The models in my application are polgon soups. Each model is constructed of smaller subsections, in a hierarchy, and this is used for culling. The question is, what methods are there for re-ordering the triangles by order of depth, to allow proper alpha blending, without implementing a different model format? Thx.
Advertisement
You either :

a) Render on triangle basis - with this you'll be able to sort all triangles as you want.

b) Render on sub-model basis (subsections) - with this you won't get all triangles as you want, but is probably a lot faster way to go for.


Sincerely,Arto RuotsalainenDawn Bringer 3D - Tips & Tricks
My method is to pass meshes to the renderer, which then strips out all the triangles and stores them in an std::vector. When all models are passed in, all triangles are rendered. I did, however, need to add texture information to the storage struct within the renderer, with a link to the texture being used for that triangle.
I just wanted to see if he would actually do it. Also, this test will rule out any problems with system services.

This topic is closed to new replies.

Advertisement