Jump to content
  • Advertisement
Sign in to follow this  
ECrevecoeur

How to handle transparent objects

This topic is 4306 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 I am currently building a render engine and I was wondering what are best techniques to handle transparent objects. Any and all advice would be greatly appreciated thanks. :)

Share this post


Link to post
Share on other sites
Advertisement
You have to draw alpha-blended triangles last, from back to front. So when you submit your object for rendering, triangles with alpha blending (which would probably use a separate material than the opaque triangles) would go in a list that is later sorted from back to front. If you assume the objects in the alpha-blended list don't intersect, then you can reduce material changes by sorting the alpha-blended objects back-to-front and then sort the triangles in each object back to front.

Share this post


Link to post
Share on other sites
You should also take a look at the "Alpha Blending in a texture" tutorial at codesampler.com, they use a cool trick so you can avoid the explicit sorting of the transparent geometry. You could also google for "destination alpha", which will also remove some of the issues with transparent objects.

Hope I've been able to help,
Jeroen

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!