Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  sticky fluid crawls out of containers
#2
(11-05-2022, 07:01 PM)locque Wrote: Look at this: https://youtu.be/Y3trDSWeQh0

The fluid behaves normally when I first pour it into the container with a sticky collision material, but as soon as I pick it up it suddenly starts crawling out of the container in all directions, and as soon as I let go it stops again. This happens with any non-zero stickiness value, which sucks because I really need to fluid to stick at least enough to not fall straight out of the bowl when you hold it at an angle or upside down. I tried increasing the solver substeps up to 8 since that fixed some inconsistencies I had in other cases, but it didn't make any difference here.

The container rigidbody doesn't become kinematic when grabbed by a hand in case you suspect that's the issue. It doesn't get parented either, both the hand and the container stay exactly where they are in the hierarchy and only connect through this configurable joint: https://imgur.com/a/AtHImSd

Here are my relevant obi component settings: https://imgur.com/a/hkMHo14

Hi!

That seems to be an issue with friction, rather than stickiness. Stickines/adhesion only applies a force in the contact surface's normal direction, keeping particles glued to the surface of the object. The forces applied by friction however, are tangential to the surface, and proportional to the rigidbody's velocity at that point.

My guess would be this is an update order issue:

A) the container's rigidbody has a certain velocity at the start of the frame.
B) fluid is simulated, and particles calculate their friction using the rigidbody's velocity.
C) At a later point in the frame (before rendering), the rigidbody velocity is either discarded or modified. As a result, particles have moved across the surface of the container as if it were to move using the velocity reported in A), but this velocity is not the one finally used to move it. As a result, fluid crawls over the surface of the container.

Off the top of my head, I would try using a ObiLateFixedUpdater component instead. This will ensure the fluid simulation takes place after all FixedUpdate calls in the scene, if my guess is correct this should fix it.
Reply


Messages In This Thread
sticky fluid crawls out of containers - by locque - 11-05-2022, 07:01 PM
RE: sticky fluid crawls out of containers - by josemendez - 12-05-2022, 07:44 AM