Digital Artists

A Custom Houdini Bubble Solver Built From Wētā's Multi-Scale Research

Pavel Morozov went to the paper rather than the tutorial — and bubbles are a genuinely hard simulation problem for reasons worth understanding.

There is a version of learning VFX that consists entirely of following tutorials, and a version that consists of reading the papers the tutorials were derived from. The second is much slower and produces people who can build things that don’t have tutorials yet.

Pavel Morozov, a Houdini FX artist, has built a custom bubble solver drawing on Wētā FX’s work on a unified multi-scale method for simulating immersed bubbles.

Why bubbles are hard

Water simulation is a solved-enough problem that every 3D package ships a competent solver. Bubbles inside water are not, and the reason is scale separation.

A FLIP solver — Fluid-Implicit-Particle, the standard approach in Houdini and elsewhere — represents fluid as particles carrying velocity, transferred to a grid to enforce incompressibility and back again. It works beautifully, and its accuracy is bounded by grid resolution.

Now consider the bubbles in a glass of sparkling water. They range from sub-millimetre to perhaps a centimetre. To resolve the small ones on a grid you would need a cell size below a millimetre — across the entire volume of the glass. The memory and compute cost of that grid is prohibitive, and almost all of it is spent on regions containing no bubbles at all.

So small bubbles fall below the grid. They cannot be represented as fluid at all; they have to be something else.

Worse, bubbles do things that a single representation struggles with:

  • They rise under buoyancy, at a speed depending strongly on radius — and the relationship changes regime with size, because small bubbles stay spherical and large ones deform
  • They coalesce, two becoming one with conserved volume but a new radius
  • They break up under shear
  • They deform into non-spherical shapes when large
  • They displace water, which means the coupling runs both ways — the water pushes the bubble and the bubble pushes the water

What “unified multi-scale” means

The phrase in the Wētā work’s title is the answer to exactly that problem: represent bubbles differently depending on their size, and let them move between representations.

Broadly, the approach such methods take:

  • Small bubbles become particles — Lagrangian points with a radius and a buoyancy force, cheap enough to have millions of, not resolved on the grid at all
  • Large bubbles become surfaces — resolved geometry with a tracked interface, simulated properly because they are big enough to matter individually and to deform visibly
  • The “unified” part is the transition: a particle bubble that coalesces past a threshold gets promoted to a resolved surface, and a resolved bubble that breaks up into fragments below the threshold gets demoted to particles

That promotion and demotion machinery is the hard engineering, and it is why this needed a paper rather than a parameter. Conserving volume, momentum and plausibility across a representation change — without a visible pop as a bubble changes what kind of object it is — is the entire difficulty.

Why this is the right thing for an artist to be doing

Because the coupling is what sells it. 80 Level’s coverage also points to related work by Alexander Vasilenko featuring two-way coupling between the bubbles and the surrounding water, and notes Morozov has built a FLIP solver with GPU support.

Two-way coupling is the difference between bubbles that look composited and bubbles that look present. One-way coupling — water drives bubbles, bubbles don’t affect water — is much cheaper and looks fine in isolation. It fails the moment a large bubble rises through a free surface, because in reality it pushes a dome up before it bursts, and with one-way coupling the surface simply doesn’t notice.

And because the lesson generalises past bubbles. The multi-scale pattern — cheap particle proxies for the small stuff, full resolution for the large stuff, promotion and demotion between them — is the standard answer to any simulation where the interesting features span orders of magnitude. Spray and foam on water. Embers in fire. Dust in a collapse. Debris in a destruction sim. If you understand it once, you recognise it everywhere, and you stop trying to solve scale problems by raising resolution.

The GPU FLIP solver is the other tell. Writing your own solver when Houdini ships one is not usually the efficient choice — but it is the only way to get behaviour the shipped one doesn’t have, and it is how someone ends up with a toolset nobody else has. For a working FX artist that is career-shaped rather than shot-shaped.