(27-05-2019, 06:04 PM)Josterday Wrote: We applied the DielectricFluidShader to the Emitter in the "FluidViscosity" demo scene for testing, but were unable to see anything render. The only particles that seemed to be visible were the standard "ParticleShader".
We applied a texture to the Dielectric Material, but still couldn't see it. We then replaced the "Obi Particle Renderer" with "Obi Fluid Renderer" and added the DielectricFluid Material as the Color (left the ClearFluid material as is?) but couldn't see any difference. It does add a 2D camera, which is why we were thinking it would only render in orthographic.
The other part of this is having Obi fluids appear in environment/object reflections and interact with lighting. It looks like the particles reflect into themselves but the surroundings don't render the particles into their reflections?
Thanks for the help.
Hi,
Can you see the fluid in the included sample scenes? Pretty much all of them use dielectric fluid. Note that fluids
do not render in the scene view, as the scene camera cannot have any components attached to it.
You
cannot apply a texture to the dielectric material. You see, fluid rendering operates in screen space (similar to post-processing effects), so uv coordinates do not have any meaning for them. They expect to receive specific render buffers via the ObiFluidRenderer. They do not work like standard surface shaders.
Adding a fluid renderer
does not add a 2D camera by itself, unless you add it on an object that does not have any camera (because they use Unity's RequireComponent attribute, so Unity will add a camera automatically). Fluid renderers operate in screen space, so they require a camera to work and should generally be added to the camera you wish to be able to see the fluid.
Again, being a screen-space method they cannot appear in environment/object reflections of other objects. This would require generating a 3D fluid mesh in realtime which is prohibitively expensive.
PD: since you're using this for cinematics, why not using Unity's built-in Alembic support instead? that way you would not be constrained by what a realtime fluid simulator can do.