Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Distance field and mesh collider
#1
Hello,

I am using obi fluid to simulate liquid in a bottle, as I need it to run on mobile AR environment, I found it extremely laggy during the simulation.

I read the document so I know that the lag is due to the use of mesh collider in collision detection. So I generated distance field for the mesh and then added it into the obi collider.

I am not sure should I remove the mesh collider in the obi collider in order to use the distance field or not. Since when I remove it, the fluid go through the mesh, but I think I have generate the distance field correctly, it shows 7 thousands of nodes and the shape is correct.

Thanks.
Reply
#2
(13-06-2023, 04:31 AM)evonnaho7471 Wrote: Hello,

I am using obi fluid to simulate liquid in a bottle, as I need it to run on mobile AR environment, I found it extremely laggy during the simulation.

I read the document so I know that the lag is due to the use of mesh collider in collision detection. So I generated distance field for the mesh and then added it into the obi collider.

I am not sure should I remove the mesh collider in the obi collider in order to use the distance field or not. Since when I remove it, the fluid go through the mesh, but I think I have generate the distance field correctly, it shows 7 thousands of nodes and the shape is correct.

Thanks.

Hi there,

You should not remove the mesh collider reference from the ObiCollider. The distance field sort of "wraps" the mesh collider, which is still used for regular collision against other colliders/rigidbodies. If there's no mesh collider reference there will be no collisions even if you have correctly added a distance field.

kind regards,
Reply