Interpolations of Smoke and Liquid Simulations

Nils Thuerey

TL;DR

This paper introduces a novel method for interpolating between different fluid simulations (smoke and liquid) by treating them as 4D volumes and applying a specialized 5D optical flow algorithm. By precomputing a dense space-time deformation between existing datasets, researchers can generate high-quality "in-between" simulations instantly, bypassing the need for expensive re-simulation.

What Problem Does This Paper Address?

In visual effects (VFX) and engineering, fluid simulations are notoriously computationally expensive. If a director wants a splash to be slightly more to the left, or a scientist wants to see how a smoke plume behaves with a slightly different viscosity, they typically have to tweak parameters and restart the simulation from scratch.

The challenge is that fluid data is "unstructured" over time—topologies break, droplets merge, and surfaces swirl. Simply averaging two simulations (linear blending) results in "ghosting" or double-images rather than a physically plausible intermediate state. This paper tackles the problem of automated data reuse: how can we take two or more existing simulations and "morph" them into a new, valid simulation that represents a parameter state somewhere in between?

Methods

The authors move away from traditional mesh-based matching and instead adopt an implicit Eulerian representation.

  1. 4D Signed-Distance Functions (SDFs): They represent 3D fluid sequences as 4D volumes (3D space + time). By converting these to SDFs, every point in the grid knows how far it is from the fluid surface.
  2. 5D Optical Flow: They extend the concept of optical flow (usually used to track pixels in 2D video) to five dimensions: three spatial dimensions, one time dimension, and one "parameter" dimension (the variable being interpolated, like viscosity or initial position).
  3. Residual Iterations and Surface Projection: To handle large deformations, the algorithm uses a multi-scale approach. It first matches large-scale features and then uses "residual iterations" and a novel "surface projection" step to snap the fine details of the source surface onto the target.
  4. Eulerian Deformation Alignment: A significant mathematical contribution of the paper is a method to concatenate multiple "backwards-looking" Eulerian deformations into a single, smooth linear map. This prevents the fluid from "breaking up" during complex interpolations.

Datasets

The method was evaluated using synthetic datasets generated with the mantaflow solver. These included:

  • Smoke Clouds: Two buoyant smoke plumes with different initial positions and obstacle interactions.
  • Liquid Drops: Simulations of drops impacting a basin at different times and locations.
  • 2D Parameter Spaces: A liquid stream hitting an obstacle where both the inflow height and depth were varied (requiring interpolation between multiple simulations simultaneously).
  • Cross-Physics Matching: A particularly challenging case matching a falling liquid drop to a rising blob of heavy smoke.

Key Insights and Ideas

  • SDFs solve the "Aperture Problem": In standard optical flow, flat regions with uniform color are impossible to track because they lack gradients. Because SDFs have a constant gradient of 1 everywhere, the optimizer always has a clear "downhill" path to find a match, even far away from the actual surface.
  • Topology Agnosticism: Because the method works on a grid rather than a mesh, it inherently handles cases where fluid splashes apart or merges together. There are no "vertex correspondences" to maintain.
  • Space-Time Coherence: By solving in 4D/5D, the method ensures that the interpolation isn't just smooth in space, but also smooth in time, preventing flickering or jitter in the resulting animation.

Key Results

  • Efficiency: Once the deformation is precomputed (which takes a few minutes), generating a new interpolated frame is nearly instantaneous—typically between 0.5s and 0.9s per frame.
  • Robustness: The system successfully matched simulations where features moved more than 150 grid cells apart, a distance that would cause most traditional registration algorithms to fail.
  • Visual Fidelity: Compared to standard hierarchical optical flow, this method produces much cleaner surfaces with fewer artifacts like stretching or "dissolving" fluid, as shown in the comparison between Figure 11 and Figure 18.

Limitations and Future Work

  • Similarity Requirement: The method relies on finding correspondences. If two simulations are fundamentally different (e.g., a single drop vs. a massive wave), the algorithm will produce a result, but it may not look physically meaningful.
  • The "25% Rule": The authors noted that if the distance between features exceeds roughly 25% of the domain size, the local optimizer can get stuck in suboptimal matches.
  • Physics Constraints: Currently, the interpolation is purely geometric. It does not strictly enforce mass conservation or the Navier-Stokes equations. A promising future direction is integrating these physical constraints directly into the optical flow optimization.
  • Memory: 5D solves are memory-intensive; the authors' implementation required about 5GB of RAM for a $60^4$ resolution solve.

Summary updated

Abstract

We present a novel method to interpolate smoke and liquid simulations in order to perform data-driven fluid simulations. Our approach calculates a dense space-time deformation using grid-based signed-distance functions of the inputs. A key advantage of this implicit Eulerian representation is that it allows us to use powerful techniques from the optical flow area. We employ a five-dimensional optical flow solve. In combination with a projection algorithm, and residual iterations, we achieve a robust matching of the inputs. Once the match is computed, arbitrary in-between variants can be created very efficiently. To concatenate multiple long-range deformations, we propose a novel alignment technique. Our approach has numerous advantages, including automatic matches without user input, volumetric deformations that can be applied to details around the surface, and the inherent handling of topology changes. As a result, we can interpolate swirling smoke clouds, and splashing liquid simulations. We can even match and interpolate phenomena with fundamentally different physics: a drop of liquid, and a blob of heavy smoke.
BibTeX
@article{thuerey2017interpolations,
  author = {Nils Thuerey},
  title = {{Interpolations of Smoke and Liquid Simulations}},
  journal = {ACM Trans. Graphics},
  year = {2017},
  url = {https://openreview.net/forum?id=BSKO-AjF36},
}

Loading related content...

Figure