Jump to content
  • Advertisement
Sign in to follow this  
gb_programmer

re-sorting triangles from a polygon soup.

This topic is 3991 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!