Obi Official Forum
Help ObiFluid doesn't work with Cinemachine? - 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: Help ObiFluid doesn't work with Cinemachine? (/thread-1563.html)



ObiFluid doesn't work with Cinemachine? - Runemark Studio - 16-12-2019

Hi!


I'm using ObiFluid in a 2D game with a SimpleFluidRenderer on an Android platform.
It works like a miracle.

However, when I add a Virtual Camera (cinemachine package) the water particles are not rendering at all. I couldn't figure out what the problem is, but I think this is connected to the Camera Brain.

I think because if I duplicate the original camera before adding a virtual camera to the scene, and turning that copy camera (without the brain) on, the water appears.

Could you help me on this please?


RE: ObiFluid doesn't work with Cinemachine? - josemendez - 16-12-2019

(16-12-2019, 04:05 PM)Runemark Studio Wrote: Hi!


I'm using ObiFluid in a 2D game with a SimpleFluidRenderer on an Android platform.
It works like a miracle.

However, when I add a Virtual Camera (cinemachine package) the water particles are not rendering at all. I couldn't figure out what the problem is, but I think this is connected to the Camera Brain.

I think because if I duplicate the original camera before adding a virtual camera to the scene, and turning that copy camera (without the brain) on, the water appears.

Could you help me on this please?

Virtual Cameras are basically "logic" cameras that are used to switch between cameras that have a camera brain, so as long as the Camera has a FluidRenderer things should work. Haven't tested with Cinemachine, so I will and get back to you asap.


RE: ObiFluid doesn't work with Cinemachine? - Runemark Studio - 17-12-2019

Yep, you are right. Not sure what was the problem, but successfully solved it this morning.

I did the following steps:
  1. Reverted the scene to the working one (with no cinemachine)
  2. Added a camera brain to the camera
  3. Reset the camera component
At this point the fluid was working. When I added a virtual camera to the scene, the particles didn't render.

I could solve this problem by setting Clipping Planes to the original camera settings:
  • Near: 0.3
  • Far: 1000
The virtual camera changed these to 0.1 and 2000.

I'm wondering how these two settings affect the particle rendering