Obi Official Forum
Bug / Crash Loosing Shadow.... - 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 Loosing Shadow.... (/thread-937.html)



Loosing Shadow.... - gabibouty - 26-02-2019

Hello everyone, I have a small question ... I could not have shadows of my fluid. After fex times of tests, I did a final test in a demo scene, and there, I saw that if we simply duplicate the original emitter, we lost  the shadow of the fluid there too ! Someone has a solution?

Thanks !


RE: Loosing Shadow.... - josemendez - 26-02-2019

(26-02-2019, 04:13 PM)gabibouty Wrote: Hello everyone, I have a small question ... I could not have shadows of my fluid. After fex times of tests, I did a final test in a demo scene, and there, I saw that if we simply duplicate the original emitter, we lost  the shadow of the fluid there too ! Someone has a solution?

Thanks !

Fluids only support shadowing from directional lights. There should be a ShadowmapExposer component on each light you want to support, and you should provide a reference to the ObiParticleRenderer there. So if you simply duplicate a renderer and do not add it to the exposer, it will have no shadows.

Note that fluid rendering is done using screen-space ellipsoid splatting (state of the art for realtime fluid rendering), so it has its own lightning pipeline, done outside of Unity's built-in one. That's why this process is required to get shadows working on it: the exposer component "taps" into Unity's pipeline, grabs the shadow map and makes it available to Obi's fluid rendering pipeline.


RE: Loosing Shadow.... - gabibouty - 27-02-2019

(26-02-2019, 08:54 PM)josemendez Wrote: Fluids only support shadowing from directional lights. There should be a ShadowmapExposer component on each light you want to support, and you should provide a reference to the ObiParticleRenderer there. So if you simply duplicate a renderer and do not add it to the exposer, it will have no shadows.

Note that fluid rendering is done using screen-space ellipsoid splatting (state of the art for realtime fluid rendering), so it has its own lightning pipeline, done outside of Unity's built-in one. That's why this process is required to get shadows working on it: the exposer component "taps" into Unity's pipeline, grabs the shadow map and makes it available to Obi's fluid rendering pipeline.


Ahhhh ..... I'm sorry, that's the little thing I missed! I may had read the doc too quickly ... Thank you very much Jose for your quick response, and thank you for this plug-in devilishly effective! Good continuation and see you soon !