Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Render fluid after all opaque on Quest only
#1
Hello,

I have a problem with ObiFLuid.

The fluid is displayed well in the editor, but when I test by making an apk on Quest, the fluid is displayed on top of everything: transparent and opaque.
I'm using Universal Render Pipeline / Lit for opaque elements.

Someone have an idea ?


Unity : 2020.3.12f1
URP : 10.5.0
ObiFLuid : 6.2

Thanks in advance

Aurélien
Reply
#2
Hi there,

This can be due to a variety of reasons. Fluid should always be rendered after all opaque objects (objects in the opaque render queue). Also, your render pipeline needs to generate a depth buffer, otherwise fluid will be rendered on top of everything.

Since you're using the standard Lit shader for opaques, only possible reason for this is that depth buffer generation is disabled in your pipeline. Try enabling it. See:
http://obi.virtualmethodstudio.com/manua...ering.html
Reply
#3
(13-09-2021, 11:07 AM)josemendez Wrote: Hi there,

This can be due to a variety of reasons. Fluid should always be rendered after all opaque objects (objects in the opaque render queue). Also, your render pipeline needs to generate a depth buffer, otherwise fluid will be rendered on top of everything.

Since you're using the standard Lit shader for opaques, only possible reason for this is that depth buffer generation is disabled in your pipeline. Try enabling it. See:
http://obi.virtualmethodstudio.com/manua...ering.html
Hi,

Thanks for your reply.

Depth Texture and Opaque Texture boxes is checked :
   
Did you know how can I know if my pipeline generate a depth buffer ?

Thanks

Best
Reply
#4
If I checked Surface Reconstruction AND Lighting, the sorting is well done.
But in this case, the framerate is very low in VR on Oculus Quest...
   
Reply
#5
(13-09-2021, 02:07 PM)aleveque Wrote: If I checked Surface Reconstruction AND Lighting, the sorting is well done.
But in this case, the framerate is very low in VR on Oculus Quest...

Quest is basically a mobile platform, which is very filtrate limited. Rendering at full resolution will probably be too expensive there. You should use downsampling, as stated in the manual:
http://obi.virtualmethodstudio.com/manua...ering.html

Quote:Mobile performance

For desktop platforms, you can get away with full-resolution rendering and all renderer features most of the time. Mobile devices however are typically more fillrate limited, so it can be beneficial to use aggresive downsampling, and skip surface reconstruction if possible. Using simple blending instead of refraction can also improve performance.
Reply
#6
Is there a way to adjust the rendering layer of the fluid in Unity so it appears behind other objects, even if they are opaque, while using the Universal Render Pipeline with Lit materials?
https://cxfileexplorerapk.net/
Reply
#7
(01-07-2024, 03:32 PM)alexisss Wrote: Is there a way to adjust the rendering layer of the fluid in Unity so it appears behind other objects, even if they are opaque, while using the Universal Render Pipeline with Lit materials?
https://cxfileexplorerapk.net/

Hi,

There's no such thing as a "render layer" that would allow objects to always appear behind other objects under all circumstances. In rendering, the chronological order in which objects are rendered and their actual overlap order on the screen are two completely different things.

Overlap (whether an object appears in front of or behind another object) depends on how the object uses the depth buffer: whether it reads from it, which kind of test it performs to determine whether it should be visible or not, whether other objects write to it, etc. Only in cases where an object does not use the depth buffer does rendering order become important: objects drawn later will obscure objects already drawn to the screen.

You must be a lot more specific about your use case, as it may involve changing the fluid render pipeline, the fluid shader, or even other object's shaders: do you want fluid to alway appear behind all opaque objects, only some specific objects, must this happen regardless of relative distance to camera (depth)? how about transparent objects?

kind regards,
Reply