ACM Transactions on Graphics (Feb. 2017), Vol. 36 (1), Article No. 3
Nils Thuerey, Technical University of Munich
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.
Data-driven fluid simulation, Interpolation, 5D Optical flow
Fluid simulations are established components of VFX production pipelines, with a variety of powerful solvers to choose from, including Eulerian methods, hybrids and pure Lagrangian approaches. Surprisingly, the tools for working with the large amounts of simulation data produced by these solvers are extremely limited — the simulation data is typically just passed on to a rendering stage. Any required change means re-starting a new simulation from scratch.
With this work, we target the reuse of simulation data for the automated generation of in-betweens based on a space-time deformation. We precompute a matching of two 4D shapes. Once it’s computed, a user can freely choose any version in between the two extremes, which can then be generated very efficiently, without starting a new simulation.
Beyond special effects, this is also highly interesting for interactive, data-driven simulations. Previous work in this area has demonstrated the feasibility of precomputing state graphs that are suitable for games. However, the graph quickly grows in size as all possible interactions have to be explicitly precomputed. In such a setting, our method could be used to interpolate a few key variants, greatly reducing the state graph.
Fig. 1: An example interpolation of a smoke simulation at 50% (in the middle).
A key challenge for our work is to fully automate the matching process. In contrast to previous work on blending triangle meshes from liquids with user guidance, we target automatic matches of both smoke and liquid effects. The only requirement for our approach is that a signed-distance function on a regular grid is available. The Eulerian representation is especially useful for ensuring spatial and temporal smoothness, which in practice translates into robustness. This makes it possible to directly work with the complex surfaces of splashy liquids, which could otherwise cause misaligned deformations and incomplete matches.
A central insight of this paper is the fact that signed-distance functions (SDFs), which are readily available in many flow simulations, are a particularly well-suited input for optical flow. With arbitrary data, the optical flow solve is strongly underdetermined, and will often yield suboptimal or unexpected motions. However, the smooth gradients of SDFs give good results even for large deformations. Relying on the signed-distance property of the inputs also allows us to apply a novel projection step to efficiently recover detailed correspondences. In combination with an iterated residual solving approach that we outline below, our approach can find matches between significantly deforming flow surfaces without any user input. Additionally, the volumetric nature and robustness of our approach allow us to calculate matches for the complex shapes of swirling smoke clouds, or even completely different phenomena with changing viscosities.
Specifically, our contributions are: a novel optical flow approach to register deforming space-time fluid surfaces given by SDFs; a method to align multiple consecutive deformations into a single deformation field; a multi-dimensional interpolation scheme for SDFs; and an efficient projection to recover small details, in combination with residual iterations and a robust volumetric error measurement.
Together, these contributions lead to a practical algorithm for the robust registration and blending of complex volumetric phenomena.
This work is supported by the ERC Starting Grant 637014.