2

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.

Vylsain
  • 21
  • 2
  • 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 Oct 13 '17 at 14:53
  • 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 Oct 13 '17 at 17:14
  • related question: https://computergraphics.stackexchange.com/questions/5618/are-there-tricks-for-getting-proper-sort-ordering-on-particle-systems – Alan Wolfe Oct 13 '17 at 17:14
  • Ah I see what you mean. I suppose you could partition Z space to reduce the error due to local incorrect order. – Julien Guertault Oct 13 '17 at 17:21
  • 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 Oct 13 '17 at 17:51
  • 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 Oct 16 '17 at 07:18
  • 1
    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 Oct 16 '17 at 12:57
  • 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 Oct 16 '17 at 14:10
  • What types of other objects are you expecting to draw besides clouds? I would think you could partition the objects by elevation. – aces Oct 18 '17 at 03:52
  • 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 Oct 18 '17 at 12:36

0 Answers0