Special Section on SIBGRAPI 2019Boundary particle resampling for surface reconstruction in liquid animation
Graphical abstract
Introduction
An interface between a liquid and a gas (e.g., water and air) is known as a free-surface. The deformation and fragmentation of the free-surface caused by a liquid splashing is a ubiquitous phenomenon which generates not only an intricate surface but also important fluid features, such as thin sheets, liquid streams or ligaments, and small droplets. The numerical discretization imposes several limitations in the representation of these features, mainly for fluid details on a scale smaller than the numerical resolution. A plausible representation of these details is essential in fluid animation, demanding an intense research activity in the field of computer animation.
In the context of particle-based fluids, rendering of the free-surface usually involves the employment of a surface reconstruction technique which transforms particles into a polygonal mesh. Several surface reconstruction methods have been proposed in the Computer Graphics literature, not only for particle-based fluids but also for point clouds in general. The main concern of surface reconstruction techniques [2] is to create a watertight surface from oriented point cloud (i.e., a subset of 3D points and normals that sample the surface) typically acquired with 3D range scanners. On the other hand, in particle-based fluids, such as Smoothed Particle Hydrodynamics (SPH) [3] and Fluid-Implicit-Particle (FLIP) [4], the primary purpose is to extract a high-quality smooth free-surface from the particle positions. In this case, the free-surface is represented implicitly by a blobby-like model, i.e., the zero level-set of a signed distance field computed from a weighted sum of kernel evaluations over the distances between the particle positions [4], [5], [6]. For simplicity, we call this category of methods as volumetric surface reconstruction, because the smoothed signed distance function provided by these methods involve all particles of the system, i.e., without distinguishing whether a particle belongs to the free-surface or not.
The main drawback of the volumetric surface reconstruction methods is the difficulty in providing a representation of fluid features due to irregular and sparse distribution of the particles or by the numerical discretization. For this reason, many articles in the literature address the low particle resolution on the free-surface by using adaptive sampling methods [7], [8], [9], [10].
Recently, Marrone et al. [11] and Sandim et al. [1] proposed alternative frameworks for surface reconstruction. These frameworks rely on a level-set definition using only the particles on the free-surface, these particles are known as boundary particles (or surface particles). Firstly, these methods transform the volumetric shape defined by the fluid particles into a point cloud formed by surface particles through an accurate boundary detection method. Then, the surface reconstruction can be obtained efficiently from a level-set function which fits the boundary particles and its normals. The level-set is given by a closed formula [11] or by robust surface fitting algorithms [1], such as Radial Basis Functions (RBF) implicits [12], Multi-level Partition of Unity (MPU) implicits [13], and Screened Poisson surface reconstruction [14]. Despite reconstructing a watertight surface resilient to blobby artifacts (e.g., bumps or indentations), these methods also suffer from the problem of particle sampling with the disadvantage of lacking some adaptive resampling method tailored for free-surface fitting.
In this paper, we present a novel particle resampling method for surface reconstruction of a point cloud which represents the free-surface of a liquid, providing a significant improvement over the surface reconstruction methods based on a level-set definition from the boundary particles [1], [11]. Our approach is based on adaptive particle refinement of the free-surface according to its small and thin fluid features, preserving small droplets, streams, and thin sheets due to the insertion of new particles in poorly sampled regions. The detection of the fluid features and the positioning of the new sampled particles are provided by the Principal Component Analysis (PCA) [15] of the particle positions. Fig. 1 depicts our method in action.
In contrast to the previous adaptive sampling methods, our method is tailored to level-sets defined by the boundary particles. Besides being computationally efficient, simple and easy to implement, our resampling is independent of the boundary detection method used, allowing users to choose the detection method that better suit their needs. Moreover, we propose a quality metric in order to evaluate the effectiveness of our method against the state-of-the-art techniques in particle resampling by a set of experiments and comparisons.
The remainder of the paper is organized as follows. Section 2 presents a brief review of related methods existing in the literature. The proposed method is described in Section 3. Sections 4 and 5 provide the results and a discussion about our method, respectively. Section 6 concludes the paper, giving a glimpse of future work.
Section snippets
Related work
In order to better contextualize our method and highlight its properties, we focused on reviewing previous works closely related to particle resampling methods in liquid animation.
Adams et al. [16] proposed an adaptive sampling method for SPH fluids based on geometric local feature size, computed using a particle approximation of the medial axis of the free-surface. Their approach allows increasing the number of particles in geometrically complex regions near the free-surface while reducing the
Boundary particle resampling
In this section, given a particle-based simulation (e.g., SPH or FLIP), we describe in details the proposed particle resampling method. Fig. 2 shows how we insert our resampling method in the surface reconstruction pipeline. This pipeline comprises four main stages: boundary detection, feature classification, particle refinement, and surface reconstruction. For each time-step of the simulation, since we are focused on rendering the free-surface, firstly the free-surface is captured through a
Results
We implemented our method in C++ using OpenMP multithreading API. The particle-based fluid simulations were generated using a weakly compressible SPH implementation provided by DualSPHysics [31]. For each simulation, the value of the parameter ρ is defined as the SPH smoothing length, as suggested by Sandim et al. [1]. All experiments have been performed on a 4-core 2.8 GHz Intel i7-4980HQ with 16 GB of RAM. The effectiveness of our approach is attested through quantitative and qualitative
About the parameter α
We chose in Eq. (2) empirically which was supported by the quality of the results obtained with the experiments reported in Section 4. However, one alternative to eliminate such a parameter could be interpreting the covariance matrix Ci as a diffusion tensor, a traditional tool in medical image analysis [35]. Among the diffusion measures, in particular, the Westin measures [36] capture the shape “DNA” of the PCA ellipsoid from Ci, i.e., there is a diffusion tensor basis {B1, B2, B3}
Conclusion and future work
We have presented a novel adaptive particle resampling method for free-surface reconstruction of zero level-sets defined by boundary particles from particle-based fluid simulations. Given a particle set which discretizes a liquid, firstly our method relies on Sandim et al. [1] to accurately identify the boundary particles. Each boundary particle is then classified and labeled regarding the local features of the fluid, where this classification is based on deformation of the free-surface and the
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
We want to thank the anonymous reviewers for their suggestions. We also thank Cristin Barghiel from SideFX for their kind donation of the Houdini software. This study was financed in part by the Coordenação de Aperfeiçcoamento de Pessoal de Nível Superior – Brasil (CAPES), National Council for Scientific and Technological Development – Brasil (CNPq) under grant #301642/2017-6, and São Paulo Research Foundation (FAPESP) under grants #2013/07375-0 and #2014/09546-9.
References (41)
- et al.
Fast free-surface detection and level-set function definition in SPH solvers
J Comput Phys
(2010) - et al.
DualSPHysics: open-source parallel CFD solver based on smoothed particle hydrodynamics (SPH)
Comput Phys Commun
(2015) - et al.
A hybrid particle level set method for improved interface capturing
J Comput Phys
(2002) - et al.
Processing and visualization for diffusion tensor MRI
Med Image Anal
(2002) - et al.
GPU accelerated convex hull computation
Comput Graph
(2012) - et al.
Boundary detection in particle-based fluids
Comput Graph Forum
(2016) - et al.
State of the art in surface reconstruction from point clouds
Proceedings of the Eurographics 2014 - state of the art reports
(2014) - et al.
SPH fluids in computer graphics
Proceedings of the Eurographics 2014 - state of the art reports
(2014) - et al.
Animating sand as a fluid
ACM Trans Graph
(2005) - et al.
Particle-based fluid simulation for interactive applications
Proceedings of the symposium on computer animation (SCA’03)
(2003)