Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiFluid Tunneling Issue - Collisions - Performance tips - Gaps between particles
#5
(16-10-2017, 07:10 PM)popuz Wrote: Dear Jose, 

does it mean that it is good to use the FixedJoint for non-kinematic rigidbody drag? I mean, if i take classical included in Unity script "DragRigidbody.cs" and change the Joint to be Fixed instead of Spring Joint. And then I will have closed bottle (with 20 convex mesh-colliders) as non-kinematic rigidbody with obi-fluid inside. Then the fluid will be ok on drag and all water will remain inside bottle? 
I ask it because FixedJoint is also similar to teleport as I can see....


Dear Jose,

I want to make simple chemistry game with bulbs, bottles, probes and ect. Which parametres and settings will you advise to me for more stable simulations, supposing all liquids will be just a water. And main mechanics will be the putting water form one bulb to another. I mean settings for Obi Solver, Emiiter and Collision Materials settings.

Hi! 

I believe I answered this in a PM, but will post my answer here in case it can help someone else out:

The issue you refer to is quite a common one, that happens in all physics engines. It is known as "tunneling", and is usually dealt with by using "continuous collision detection", or CCD. Obi implements CCD by default, however all CCD algorithms need the velocity of all objects involved in a collision in order to be effective. In your case, changing the container position around is basically the same as teleporting it. It has zero velocity, thus CCD cannot kick in.


There's a sample scene included in Obi called "FaucetAndBucket". There you can see that fluid does not escape the bucket even though you can drag the bucket around quite fast.


This is done by adding a rigidbody to the bucket, and setting its velocity accordingly when dragging it (see the included ObjectDragger.cs script). This way continuous collision detection has a velocity value to work with, and as a result collision detection is much more precise and tunneling happens less often.

Still, at *very* high speeds collisions can be missed. For this reason you should limit the maximum speed at which users are allowed to drag the containers.
Reply


Messages In This Thread
RE: ObiFluid Tunneling Issue - by josemendez - 05-07-2017, 09:26 AM
RE: ObiFluid Tunneling Issue - Collisions - Performance tips - Gaps between particles - by josemendez - 18-10-2017, 12:50 PM
RE: ObiFluid Tunneling Issue - by whack - 14-12-2021, 08:30 AM