ZHANG ET AL. 3of14
2.3 Surface construction with particles
Extracting the fluid surface from particles is an essential step in the Lagrangian approach. However, such extraction is challenging owing to sev-
eral limitations, such as increased memory consumption and computational cost. Given a particle set, general methods often build a scalar field
and extract surface mesh from the scalar field using the marching cubes algorithm.
13
To alleviate the bumpiness of the constructed surface mesh,
Zhu and Bridson
14
compute the scalar field with a signed distance function and extract the zero iso-surface to represent the liquid surface.
Onderik et al
16
and Solenthaler et al
29
improve the method to reduce artifacts in a concave region of the liquid surface. In the work of Williams,
30
smooth surface construction is regarded as an optimization problem. However, the ignorance of temporal continuity yields oscillation during sim-
ulation. Bargteil et al
31
combine the level set method with the Laplacian operation to smooth out the surface. The smoothing step may filter out
high-resolution details. Yu and Turk
15
obtain smooth fluid surface using anisotropic kernel function, which is costly in simulation. Akinci et al
17,32,33
execute surface extraction with two steps: surface decimation and surface subdivision; such extraction produces smooth surface with high effi-
ciency. However, expressing multi-resolution details computed from the adaptive SPH model is difficult. In addition, constructing highly accurate
fluid surface requires a smaller grid size and a larger influence radiusof each particle. As a result, the computational cost and memory consumption is
dramatically increased.
17
Considering the multi-scale features of the fluid surface, we use a multi-resolution method to construct the fluid surface. The method is inspired
by the surface construction methods
34
in multi-view stereo area. This method facilitates the processing of the particles with different radii and
non-uniform distribution in the adaptive SPH model. Our method can effectively produce fluid simulation with fine resolution details because of
combining fluid computation and fluid surface construction in a single framework.
3 METHODS
Figure 1 shows the framework of the proposed method. The method involves three main steps: multi-resolution local adaptive fluid computation,
data acquisition and pre-processing, and multi-resolution surface construction.In the first step, the physical fluid model is solved with our novel
adaptive SPH method given initial and boundary condition to obtain the multi-resolution particle set. In the second step, sample points are obtained
from the multi-resolution particle set, and the attributes (eg, footprint size and confidence value) of these sample points are computed. In the third
step, multi-resolution fluid surface is built iteratively by a graph cut algorithm on a weighted graph formulated from the global confidence map on a
crust of fluid computational domain. We employ the photo-realistic rendering algorithm
3
to obtain the fluid simulation results.
3.1 Local adaptive multi-resolution fluid computation model
Let P be the particle set of the SPH model. To express multi-resolution features, particles in P are initialized with different levels l = 0, 1, 2, … , where
a particle at level l = 0 has the smallest mass m and radius r. Then, the mass m
i
and radius r
i
of particle p
i
at level l can be written as m
i
= 2
l
m and
r
i
=
3
2
l
r. The average of the initial inter-particle spacing is set as r
i
∕h, where h is a control parameter and is set as h = 2.5 in our experiment. If the
distance between two particles p
i
and p
j
satisfies
x
i
− x
j
≤ max(r
i
, r
j
),thenp
i
and p
j
are neighbors. A k-dimensional (KD) tree is built to store the
particle set P, such that the neighbor particles can be queried efficiently.
35
3.1.1 Fluid computation based on SPH model
Let u
i
and x
i
be the velocity and position of the particle p
i
at time step n. Our goal is to compute u
n+1
i
and x
n+1
i
at the next time step n+1 by solving the
physically based fluid model.
(1) Particle-based fluid model
To compute particle velocity at time step n+1, the Naiver-Stokes equation must be solved first, as follows:
𝜕𝜌
𝜕t
+∇·
(
𝜌
u
)
= 0,
(1)
𝜌
𝜕
u
𝜕t
+
u ·(∇u)
=−∇p + 𝜌g + 𝜇∇
2
u, (2)
FIGURE 1 The framework of our method