Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Obi Fluid 7 Transparent Fluid has no color
#11
(06-01-2025, 08:39 PM)hariedo Wrote: If I don't have the ObiFluidRendererFeature set up properly, then I will get no fluids rendering at all. Since I said I get fluids but they're lacking turbidity, you can skip repeating the advice to set that part up.

Rendering the fluid's mesh is done by ObiFluidSurfaceMesher (as the name implies, it builds a mesh for the surface of the fluid), so it's not possible to get no rendering at all by not having a ObiFluidRendererFeature.

By not having a properly set up ObiFluidRendererFeature fluid *will* get rendered, but it will look exactly like in your screenshot because turbidity and thickness effects won't work as I explained in my last post:

Quote:Specifically, make sure you've added a ObiFluidRendererFeature rendering feature (step #3 in the manual page linked above) and that you've assigned the fluid pass(es) you're using to it. Otherwise refraction/thickness/turbidity will have no effect on transparent fluids.

That's why I feel like I must repeat the same advice, even if I risk sounding like a broken record.


(06-01-2025, 08:39 PM)hariedo Wrote: I mis-spoke.  Not only am I using the stock blueprints, but I am ALSO using the stock ObiFluidRenderingPass (named FluidPassTransparent) but am adjusting its settings.  After all, that's the only place where settings like Turbidity and Diffuse Color show up in the interface, so I must be using it.

My guess is that you haven't added the ObiFluidRenderingPass to your ObiFluidRendererFeature. Even if you use stock assets, this step is necessary for the URP renderer (which is not a part of Obi, so you cannot use a stock one!) to provide the necessary buffers for transparent fluids to work as explained in the manual, see the bit circled in yellow:

[Image: xqOMC3P.png]

(06-01-2025, 08:39 PM)hariedo Wrote: From the Burst Transparent shader graph, it looks like you only use the alpha value of Turbidity, not its color.  If this was your design intent, it is pretty confusing from a user perspective.  That said, you can see from my settings of ~0.5 alpha turbidity and bright green diffuse color, my fluid should not be water. 

Not sure what you mean, in the ShaderGraph shader you can clearly see its RGB channels are being used. Turbidity is a color as illustrated in the manual:

[Image: kHWFdZu.png]


(06-01-2025, 08:39 PM)hariedo Wrote: I have tried this with the ObiFluidRendererFeature at the top of the stack, and at the bottom of the stack, and alone in the stack, so it's not a matter of ordering the rendering features.

Ordering has no effect at all indeed. However if you just add the ObiFluidRendererFeature but forget setting it up by providing one or more passes, thickness, turbidity and other transmittance-related effects won't work for those passes.

let me know if you need further help,

kind regards
Reply
#12
(07-01-2025, 09:43 AM)josemendez Wrote: That's why I feel like I must repeat the same advice, even if I risk sounding like a broken record.

My guess is that you haven't added the ObiFluidRenderingPass to your ObiFluidRendererFeature. Even if you use stock assets, this step is necessary for the URP renderer (which is not a part of Obi, so you cannot use a stock one!) to provide the necessary buffers for transparent fluids to work as explained in the manual, see the bit circled in yellow:

[Image: xqOMC3P.png]

Apologies for sounding uncivil above. This setup is kinda ridiculous, to be honest. Add feature. Add pass so that PART of the feature works. But we got there.

I dunno, having some part of the Feature spit out an error if there are zero passes might help. Having some part of the Mesher spit out an error if there's no Feature might help. Having a "helpful tip" of "hey, if you get clear water" in the manual might help. Replacing my brain might help.
Reply
#13
(08-01-2025, 12:21 AM)hariedo Wrote: Apologies for sounding uncivil above. 

No problem, we all do when under pressure or when frustrated. Hope you got it to work the way you needed.

(08-01-2025, 12:21 AM)hariedo Wrote: This setup is kinda ridiculous, to be honest.  Add feature.  Add pass so that PART of the feature works.  But we got there.

Not just part of it, the entire renderer feature won't work if you don't set it up. It's the same thing with most renderer features in Unity, like RenderObjects or FullScreenPass for instance: they require you to set up object layers, add references to materials, etc. Just adding a feature is no guarantee it will work as desired or at all. Same thing with components. To be honest I'm not sure how this can be improved upon as it's a fundamental workflow in Unity.

(08-01-2025, 12:21 AM)hariedo Wrote: I dunno, having some part of the Feature spit out an error if there are zero passes might help. 

Thanks for the suggestion! we will look into adding this in the next update. A potential problem is that you might not get to see the error if you don't unfold the renderer feature inspector, and logging to the console might be a bit spammy. Will need to think about how to best bring attention to this without getting in the way.

(08-01-2025, 12:21 AM)hariedo Wrote: Having some part of the Mesher spit out an error if there's no Feature might help. 

You might not want to use the Feature, for instance when using opaque fluids or certain custom shaders that do not require transmittance buffers. Or when using multiple renderers for different levels of quality. So spitting an error in case you don't have a Feature wouldn't be right as you might not want to have one depending on what you're doing.

(08-01-2025, 12:21 AM)hariedo Wrote: Having a "helpful tip" of "hey, if you get clear water" in the manual might help. 

The manual does warn you that transparent fluids won't render properly if you forget adding the pass to the feature. This is mentioned multiple times throughout it, and the first mention you encounter is a warning box in step #1:

[Image: iCgXyaS.png]

It's explained again in step #3, together with a screenshot highlighting exactly where you should add the pass(es) in the interface.

(08-01-2025, 12:21 AM)hariedo Wrote: Replacing my brain might help.

Probably no need to go that far, heard about brain transplants being expensive Guiño.

let me know if you need further help,

kind regards
Reply