Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Fluid rendering - transparency / translucency
#4
(10-12-2018, 12:35 PM)Mitch@PG Wrote: Yes ... heh ...  Sonrojado   ... about that ...

So, that odd things happen when you put transparent objects inside other transparent objects .... and I didn't realise that the objects I had inside the fluid had their shader set to transparent.  I swapped the shader back to the standard shader, and suddenly they all appeared.  

Thank you for the above information though - it's helpful to have it laid out clearly.

If you have multiple transparent objects inside each other, you will have to sort them back to front in order to be drawn correctly. This is just a thing of realtime rendering, cannot be avoided (at least not in a cheap way). Unity does this for you if you put your shaders in the transparent render queue, but for fluid, it has to be rendered last. Even then, multiple intersecting transparent objects will look weird. Only if they do not intersect at all will they look somewhat correct.

You should be able to modify Obi slightly to achieve this. In ObiBaseFluidRenderer, change all instances of CameraEvent.BeforeImageEffectsOpauqe to CameraEvent.BeforeImageEffects. Note however, that this will render fluid on top of all transparent objects regardless of their depth.

cheers,
Reply


Messages In This Thread
RE: Fluid rendering - transparency / translucency - by josemendez - 10-12-2018, 03:12 PM