<p>I am working on a graphics engine designed to be used in flight simulators.
It therefore has to feature an advanced weather rendering system with clouds you can fly through.</p>

<p>For this, I implemented a particle system that renders a few hundred thousand billboards scattered in layers and in a 120km radius area.
Until now, these clouds were my only transparent objects and I was relying on sorted alpha blending to get the desired result.</p>

<p>My engine is making some progress and I now need to be able to render different types of transparent objects. Of course, I cannot rely on sorted alpha blending anymore since these objects are too different to be handled with a uber shader.</p>

<p>In search for alternatives, I tried to implement a few order independent transparency techniques with inconclusive results :</p>

<ul>
<li><p>Weighted Blended OIT : not working well with very contrasting objects and almost opaque objects. Hard to find a visibility function that can handle all kind of objects.</p></li>
<li><p>Linked List OIT / Adaptive transparency : result quality is very good but efficiency depends too much on scene complexity and a cloud rendering system involves way too much layers/overdraw.</p></li>
</ul>

<p>Most OIT techniques are illustrated with simple to moderate complexity scenes.
I feel like I am in a dead-end and I'm looking for new ideas.</p>

<p>Is there a different OIT technique that I am not aware of and that can be appropriate for such a case ?</p>

<p>Are there cloud rendering techniques or rendering pipeline designs that can help to solve this problem ?</p>

<p>Thank you for your time and help.</p>

CC BY-SA 3.0
2017-10-13T14:53:56.987Z
I don't understand how having other types of translucent objects makes it impossible to keep using sorted alpha blending. Could you elaborate?
Julien Guertault
CC BY-SA 3.0
2017-10-13T17:14:06.493Z
If you have 10,000 particles in a single draw call, you can sort them and do a single draw call.  If you then add 5 other transparent objects, you then have up to something like 12 draw calls since you need to draw all the objects in the correct sort order.  It's possible but painful and likely costly!
Alan Wolfe
CC BY-SA 3.0
2017-10-13T17:14:43.160Z
related question: https://computergraphics.stackexchange.com/questions/5618/are-there-tricks-for-getting-proper-sort-ordering-on-particle-systems
Alan Wolfe
CC BY-SA 3.0
2017-10-13T17:21:47.443Z
Ah I see what you mean. I suppose you could partition Z space to reduce the error due to local incorrect order.
Julien Guertault
CC BY-SA 3.0
2017-10-13T17:51:12.667Z
Vylsain you might be interested in "Order Independent Transparency" or OIT.  It's an active area of research with a few different leading solutions that may or may not be appropriate for your specific usage case.  It allows you to render transparency without sorting, but get the correct results anyways (or close enough to correct, or correct most of the time).
Alan Wolfe
CC BY-SA 3.0
2017-10-16T07:18:12.930Z
Hi and thanks for your help. That's right, sorted alpha blending is not efficient if I constantly have to bind different shaders and split my particle system draw call. About Order Independant Transparency, that's what I've tried as I said in the first post. But it seems there's way too many particles and overdraw involved in my case to have correct or efficient results. I wonder how this is handled with a ray-marching approach...
Vylsain
CC BY-SA 3.0
2017-10-16T12:57:39.703Z
Have you thought of using volume rendering for this? It seems to me like a more sensible approach than your current one
Sebastián Mestre
CC BY-SA 3.0
2017-10-16T14:10:41.890Z
Yes, I'm thinking about it but I don't know what to expect with transparency using this kind of technique... If I render my clouds using ray marching, what happens when a ray encounters a semi transparent object ?
Vylsain
CC BY-SA 3.0
2017-10-18T03:52:41.317Z
What types of other objects are you expecting to draw besides clouds? I would think you could partition the objects by elevation.
aces
CC BY-SA 3.0
2017-10-18T12:36:28.030Z
Other particles drawn with different shader and blending mode (additive), buildings with windows, aircrafts... The cloud ceiling altitude can be adjusted and I have case where a transparent object is in the middle of a cloud. For example, my test scene is a wind turbine equipped with lights in the middle of a cloud.
Vylsain
<transparency><particles>
Cloud rendering and transparency order
Vylsain
# Cloud rendering and transparency order

(Asked by: username_0 on 2017-10-13)

I am working on a graphics engine designed to be used in flight simulators.
It therefore has to feature an advanced weather rendering system with clouds you can fly through.

For this, I implemented a particle system that renders a few hundred thousand billboards scattered in layers and in a 120km radius area.
Until now, these clouds were my only transparent objects and I was relying on sorted alpha blending to get the desired result.

My engine is making some progress and I now need to be able to render different types of transparent objects. Of course, I cannot rely on sorted alpha blending anymore since these objects are too different to be handled with a uber shader.

In search for alternatives, I tried to implement a few order independent transparency techniques with inconclusive results :

* Weighted Blended OIT : not working well with very contrasting objects and almost opaque objects. Hard to find a visibility function that can handle all kind of objects.
* Linked List OIT / Adaptive transparency : result quality is very good but efficiency depends too much on scene complexity and a cloud rendering system involves way too much layers/overdraw.

Most OIT techniques are illustrated with simple to moderate complexity scenes.
I feel like I am in a dead-end and I'm looking for new ideas.

Is there a different OIT technique that I am not aware of and that can be appropriate for such a case ?

Are there cloud rendering techniques or rendering pipeline designs that can help to solve this problem ?

Thank you for your time and help.

**Tags:** transparency, particles

> **Comments:**
> **username_1**: I don't understand how having other types of translucent objects makes it impossible to keep using sorted alpha blending. Could you elaborate?  
> **username_2**: If you have 10,000 particles in a single draw call, you can sort them and do a single draw call.  If you then add 5 other transparent objects, you then have up to something like 12 draw calls since you need to draw all the objects in the correct sort order.  It's possible but painful and likely costly!  
> **username_2**: related question: https://computergraphics.stackexchange.com/questions/5618/are-there-tricks-for-getting-proper-sort-ordering-on-particle-systems  
> **username_1**: Ah I see what you mean. I suppose you could partition Z space to reduce the error due to local incorrect order.  
> **username_2**: username_0 you might be interested in "Order Independent Transparency" or OIT.  It's an active area of research with a few different leading solutions that may or may not be appropriate for your specific usage case.  It allows you to render transparency without sorting, but get the correct results anyways (or close enough to correct, or correct most of the time).  
> **username_0**: Hi and thanks for your help. That's right, sorted alpha blending is not efficient if I constantly have to bind different shaders and split my particle system draw call. About Order Independant Transparency, that's what I've tried as I said in the first post. But it seems there's way too many particles and overdraw involved in my case to have correct or efficient results. I wonder how this is handled with a ray-marching approach...  
> **username_3**: Have you thought of using volume rendering for this? It seems to me like a more sensible approach than your current one  
> **username_0**: Yes, I'm thinking about it but I don't know what to expect with transparency using this kind of technique... If I render my clouds using ray marching, what happens when a ray encounters a semi transparent object ?  
> **username_4**: What types of other objects are you expecting to draw besides clouds? I would think you could partition the objects by elevation.  
> **username_0**: Other particles drawn with different shader and blending mode (additive), buildings with windows, aircrafts... The cloud ceiling altitude can be adjusted and I have case where a transparent object is in the middle of a cloud. For example, my test scene is a wind turbine equipped with lights in the middle of a cloud.  

---

## 0 answers

