Obi Official Forum
Help Fluid oddities at <= 4 particles - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html)
+--- Thread: Help Fluid oddities at <= 4 particles (/thread-4539.html)



Fluid oddities at <= 4 particles - slimedev - 13-08-2025

Hello. I have an Obi Fluid Emitter of 12 Particles, which generally just sits there (purple) without any input. But I noticed that at low particle numbers, the individual particles seem to narrowly clump together, and become somewhat jittery, like boiling water droplets. They also seem to gain a lot of friction to the WASD controls, making it generally annoying/ impossible to control.

I had no intuition that it was Particle Velocities, but on trying to refine the WASD controls I discovered that bodies of 4 or less particles have these interesting symmetrical velocities. I don't know if they are pointing in or out vs the position of the centermass of the droplet.
Obi seems to modify velocities in a lot of places, and I was wondering if you could point me in the right direction. Where might there be relevant forces applied, that I can try to hook into?

I had previously attempted passing around a duplicated velocities array, and copying/zeroing it out, but it didn't work at all in the few locations I tried.

Images of Debug Velocities: various numbers of particles. At just 1 particle remaining, the particle is a bit jumpy and sometimes meanders around a little even without any input
[attachment=2465][attachment=2464][attachment=2463][attachment=2462][attachment=2461]


RE: Fluid oddities at <= 4 particles - josemendez - 14-08-2025

(Yesterday, 11:48 PM)slimedev Wrote: Hello. I have an Obi Fluid Emitter of 12 Particles, which generally just sits there (purple) without any input. But I noticed that at low particle numbers, the individual particles seem to narrowly clump together, and become somewhat jittery, like boiling water droplets.

Hi,

That sounds like surface tension. It's a force that acts on particles whose neighborhood is not full of other particles. It acts to clump small groups of particles together into groups while attempting to minimize the surface of the fluid. Since the shape that has less surface to volume ratio is a sphere (circle in 2D), the result is radially symmetric droplets.

Setting the fluid's "polarity" parameter to zero should disable this.


(Yesterday, 11:48 PM)slimedev Wrote: They also seem to gain a lot of friction to the WASD controls, making it generally annoying/ impossible to control.

How are you controlling them? using external forces, acceleration (directly writing to solver.velocities), force zones...?


(Yesterday, 11:48 PM)slimedev Wrote: I had no intuition that it was Particle Velocities, but on trying to refine the WASD controls I discovered that bodies of 4 or less particles have these interesting symmetrical velocities. I don't know if they are pointing in or out vs the position of the centermass of the droplet.

Yes, this sounds about right. Surface tension results in (intentional) inward pointing forces that keep particles together, forming a droplet.

(Yesterday, 11:48 PM)slimedev Wrote: Obi seems to modify velocities in a lot of places,

Actually it modifies velocities only once at the end of each simulation step. Obi is a position-based engine, which means all internal calculations take place using particle positions, not velocities. Velocities are calculated as a function of the change in position and the timestep duration.

(Yesterday, 11:48 PM)slimedev Wrote: Images of Debug Velocities: various numbers of particles. At just 1 particle remaining, the particle is a bit jumpy and sometimes meanders around a little even without any input

A single isolated particle is not affected by surface tension, so this "jumpy" behavior you describe should come from somewhere else. Could you share a video - or even better, a repro project - that shows this behavior so that I can take a closer look?

kind regards,