Obi Official Forum
Bug / Crash Reflections appear in play mode but not in build - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Bug / Crash Reflections appear in play mode but not in build (/thread-3564.html)

Pages: 1 2


RE: Reflections appear in play mode but not in build - josemendez - 05-09-2022

Attached to this post you will find a modified version of both the built-in fluid shader as well as the editor/inspector classes, that accepts a custom cubemap as input for reflections.

There's 4 files in the provided patch, this is where they should be placed in your project:

- Obi/Scripts/Fluid/Rendering/ObiFluidRenderer.cs
- Obi/Scripts/Fluid/Rendering/FluidRenderingUtils.cs
- Obi/Resources/ObiMaterials/FluidShader.shader
- Obi/Editor/Fluid/ObiFluidRendererSettingsDrawer.cs

Once you drop these files in your project, the fluid renderer will show an extra field under the "Reflections" section that accepts a cubemap as input:

[Image: 52esuv4.png]

Note: Unlike reflection probes, cubemaps aren't convolved/prefiltered, so changing the "smoothness" parameter in the fluid renderer will jump between cubemap mipmaps instead of smoothly interpolating.

let me know if I can help in any way.

kind regards,


RE: Reflections appear in play mode but not in build - locque - 06-09-2022

Thank you! Sonrisa