Simulating Fluids in Real-World Still Images

ICCV 2023 Oral
1SenseTime Research, 2Shanghai AI Laboratory, 3The Chinese University of Hong Kong, 4CPII

Overview.Given a still image and a coarse hint of motion as inputs, our model estimates fluid motion to generate animating videos. To be able to represent complex scenes like transparent fluid shown in the figure, we propose to learn a single background RGBA layer and per-frame surface liquid RGBA layer to compose each frame of the final animated video (orange solid arrows indicate the data flow). Besides, a simulation-based motion editing method (blue dot arrow in the figure) is introduced to generate realistic effects like fluid-rock interaction, which cannot be easily captured by learning based method. The edited motion direction is represented as red arrows.

Abstract

We have witnessed great progress in physical-based simulation and neural video generation for animating fluids. However, the two types of methods suffer from different drawbacks. The physical-based simulation methods are built upon manual-designed environments with specific materials, motion trajectories and textures, thus are only capable of animating particular fluids in synthetic scenarios. On the other hand, the neural video generation methods usually encode and warp the entire scene as a whole, which are generally not aware of the complex contents, such as transparency, collision and thin structures that frequently appear in real-world scenarios. In this work, we tackle the problem of real-world fluid animation from a still image.

The key of our system is a Surface-based Layered Representation(SLR) deriving from video decomposition, where the scene is decoupled into a surface liquid layer and an impervious background layer with corresponding transparencies to characterize the composition of the two layers. The animated video can be produced by warping only the surface liquid layer according to the estimation of fluid motions and recombining it with the background.

In addition, we introduce Surface-only Fluid Simulation(SFS), a 2.5D fluid calculation version, as a replacement of motion estimation. Specifically, we leverage the triangular mesh based on a monocular depth estimator to represent the liquid surface layer and simulate the motion in the physics-based framework with the inspiration of the classic theory of the hybrid Lagrangian-Eulerian method, along with a learnable network so as to adapt to complex image textures. We demonstrate the effectiveness of the proposed system through comparison with existing methods in both standard objective metrics and subjective ranking scores. Extensive experiments not only indicate our method's competitive performance for common fluid scenes but also better robustness and reasonability under complex transparent fluid scenarios.

Moreover, as the proposed surface-based layer representation and surface-only fluid simulation naturally disentangle the scene, interactive editing such as adding objects to the river could be easily achieved with realistic results.

Overview Video

Animated Results

Waterfall

Shallow Water

Simulation Results

Using Surface-only Fluid Simulation(SFS) you can edit a vivid motion fluid-rock interaction.

(Up)Animated with 75% week incompresible simulated motion and our SLR. (Down)Animated with 100% incompresible simulated motion and w/o SLR.

3D Editing Effects

You can put a 3D model in of our Surface-Based Layered Representation(SLR).

3D model above water is placed in front of fluid layer, and the part under water is placed to BG layer (Up)w/o simulation.(Down)w/ simulation.

Fluid Layer Replacement

Using Surface-Based Layered Representation(SLR) you can edit fluid layer.

Replace Fluid Layer with 0.5xFluidLayer+0.5xSpaceVideo

——"As if the Silver River fell from azure sky."

——"疑似银河落九天"

BG Layer Replacement

Using Surface-Based Layered Representation(SLR) you can edit background layer.

Replace BG Layer with 0.25xBGLayer+0.75xSpaceVideo

BibTeX

@article{fan2022SLR,
  author    = {Siming Fan, Jingtan Piao, Chen Qian, Kwan-Yee Lin, Hongsheng Li},
  title     = {Simulating Fluids in Real-World Still Images},
  journal   = {arXiv preprint},
  volume    = {arXiv:2204.11335},
  year      = {2022},
}