Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  ObiFluid doesn't work with Cinemachine?
#1
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?
Reply
#2
(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.
Reply
#3
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
Reply