Jump to content
  • Advertisement
Sign in to follow this  
Tangletail

OpenGL Some questions about Translucency sorting and OIT

This topic is 738 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

I've been looking through several different Order Independent Transparency algorithms. But very few of them seem to answer a few things.

I understand that the idea of OIT is to not worry so much about ordering. But does it still matter in some cases? And is there a way to preserve it if a certain ordering is desired?

 

 

For starters, does presorting impact OIT in any way? Such as speeding it up, or producing different visual results?

 

And is lighting still handled per pixel as normal when you submit your geometry to be rendered. Or does it happen defacto?

 

A few algorithms I have been looking at.

 

Intel's OIT solution. This also seems to be fairly popular with AMD as well. AMD's Powerpoint

 

Depth Peeling. Can't find a good link.

 

And then Depth Weighted blending. Which seems to produce muddy results with layers. Linky

 

I guess I should also ask how necessary, and how fast is this. My main issue isn't layer's of transparent objects with overlaps. Things like holograms and layers upon layers of glass are likely to be rare. Trees and Grass will likely just be rendered as part of the opaque geometry with alpha testing. But I am mostly concerned with particles and their drawing order from different particle systems, and them interacting with other transparent objects correctly.

 

Currently... the engine treats a particle engine like one complete object, and renders them directly to the backbuffer on the transparency pass. Though because the particles are volumes... it causes some graphical errors. For example if there was a huge explosion that covers a massive chunk of land... there will be a random stack of smoke that renders on top of it.

 

Or if the graphics are cartoony and vector like (my targeted art style) and fade in to being fairly opaque real quickly the ordering of the particle systems will be impossible to tell if one particle system is supposed to ring around the other.

 

And I don't want to break up all the particle instancing to batch them with the rest of the geometry... as it would likely massively raise the draw calls for every break.

 

 

Share this post


Link to post
Share on other sites
Advertisement

I understand that the idea of OIT is to not worry so much about ordering. But does it still matter in some cases? And is there a way to preserve it if a certain ordering is desired?

 

"Order independent" refers to submission only, you still need to sort the stored fragments either afterwards or while inserting them in per pixel lists to get correct results.

Weighted blending is an exception, but i guess you need luck and a lot of tuning time to make it 'good enough'.

 

I see 3 methods of implementing per pixel lists:

1. max N fragments per pixel - because N is small it should work best to sort ant insertion to keep the closest N fragments.

2. max N fragments per pixel block, e.g. 8x8 pixels has max 256 samples. If you are sure 256 is enough, the method may be faster requiring less memory for more fragments.

3. max N fragments per frame, implemented with 2 pass method: 1st pass increases just a counter per pixel - prefix sum so each pixel gets its exactly necessary number of fragments reserved, 2nd pass renders to those lists, sorting can be done afterwards. Best memory utilization and less pressure on atomics, but 2 passes.

 

All of this is still very demanding, i'd consider raytracing as well - perticles means you could do it with a ray - sphere test.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!