Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fluid crawling up a slanted collider (v6.5.4)
#1
We have a really weird problem with fluid crawling up the side of a slanted collider. Everything works well as long as the sides of our containers are upright, but as soon as they are slanted, this happens:


.png   Unity_2024-11-27 02.11.00.133.png (Size: 14.85 KB / Downloads: 13)

An even weirder detail is that if I deactivate and reactivate the whole thing (Rigidbody, Collider, Emitter and all) via the Unity editor while it's still running, it starts to crawl up on the right side instead:


.png   Unity_2024-11-27 02.11.35.387.png (Size: 14.79 KB / Downloads: 13)
Reply
#2
(27-11-2024, 02:45 AM)Tobias Wrote: We have a really weird problem with fluid crawling up the side of a slanted collider. Everything works well as long as the sides of our containers are upright, but as soon as they are slanted, this happens:

Hi,

This is a consequence of fluid being discretized as particles, instead of being a continuous material. All particle based fluid simulators are affected.

Particles are supported by the slanted wall, and the column of fluid is unable to fall back into the main body of fluid because each particle sits on all particles below it due to pressure constraints. The column may even continuously go up if pressure is high enough at the bottom of the container.

Increasing the fluid's surface tension can help prevent this, since fluid particles will stick to each other forming round droplets which prevents columns from emerging.

(27-11-2024, 02:45 AM)Tobias Wrote: An even weirder detail is that if I deactivate and reactivate the whole thing (Rigidbody, Collider, Emitter and all) via the Unity editor while it's still running, it starts to crawl up on the right side instead:

Which side it happens is entirely random, because Obi (like most physics engines) is not deterministic: running the same simulation multiple times will not yield the exact same results every time.
Reply
#3
Thanks; that makes sense.

(27-11-2024, 08:54 AM)josemendez Wrote: The column may even continuously go up if pressure is high enough at the bottom of the container.

Yeah, that is something that I notice in our actual scenario (which is pouring drinks into glasses). The fluid continues to rise more and more on one side:
   

I also notice a lot of unceasing swirling inside the glass (when multiple different-colored fluids are combined) which might also be due to said pressure?

Do you know any ways of fixing both problems? Unfortunately, raising surface tension makes the column-forming better, but the swirling gets even worse with higher surface tension. Also the fluid will still rise higher on one side, which looks weird.
Reply