Animating Sand as a Fluid Yongning Zhu Robert
Animating Sand as a Fluid Yongning Zhu Robert Bridson Presented by KKt
Abstract l Physics-based simulation method for animating sand l Existing water simulator can be turned into a sand simulator l Alternative method for simulating fluids l Issue of reconstructing a surface from particle
Introduction l We wanted to animating granular materials l l sand, gravel, grains, soil, rubble, flour, sugar We think sand as a continuous material l How should it respond to force? The purposes of plausible animation we simplify the exist models l We combine grids and particles l We reconstruct a smooth surface l
Related Work l Miller and Pearce[1989] l l Later Luciani et al. [1995] l l Dynamic height-field simulation of soil with Mohr. Coulomb constitutive model Sumner et al. [1998] l l Particle system model specifically for granular materials Li and Moshell[1993] l l Simple particle system model Height-field approach with simple displacement and erosion rules Onoue and Nishita[2003] l multi-valued height-fields
Particles for water simulation l Desbrun l Smooth Particle Hydrodynamics l Müller l et al. [2003] SPH further for water simulation l Premoze l and Cani[1996] et al. [2003] Used variation on SPH with an approximate projection l Takeshita l For fire et al. [2003]
Grids for water simulation l Foster and Metaxas[1996] l l Stam[1999] l l Level set and marker particles Losasso et al. [2004] l l Semi-Lagrangian advection method for faster simulation Foster and Fedkiw[2001] l l Grid-based fully 3 D water simulation in graphics Adapted octree grids Hong and Kim[2003] l Volume-of-fluid algorithms
Plastic flow l Terzopoulos and Fleischer[1988] l l O’Brien et al. [2002] l l Fracture-capable tetrahedral-mesh finite element simulation Müller and Gross [2004] l l First introduced plasticity to physics-based animation Real-time elastic simulation Jaeger et al. [1996] l l Scientific description of the physics of granular materials Elasto-plastic finite element formulation with Mohr. Coulomb or Drucker-Prager yield conditions
PIC and FLIP l Harlow[1963] l Particle-in-cell(PIC) for compressible flow l Harlow l and Welch[1965] Marker-and-cell for incompressible flow l Brackbill l and Ruppel[1986] Fluid-Implicit-Particle (FLIP)
Sand Modeling l Frictional Plasticity Mohr-Coulomb law l Material will not yield l l |. . |F is Frobenius norm l l l φ is friction angle If l cf. l is big enough, do not shear
Basic mathematics l Trace l Frobenius norm σ is the singular values of A
Stress l. A measure of the average amount of force exerted per unit area l σ is the average stress P is the force, A is area l Stress is consisted of Normal stress σ l Shearing stress τ l
Tensor l l
Terminologies <Stress energy tensor> <Von Mises stress in 2 D> <Von Mises and Tresca Yield surfaces in principle stress coordinates>
Yielding sand flow direction l l That the shearing force is pushing l Nonassociated to gradient of yielding l Normal ways are not proper here l Because of lack of dilation A little when it begins to flow l Stops as soon as the sand is freely flowing l
A Simplified Model Ignore the nearly imperceptible elastic deformation l Tiny volume changes l Decompose regions two l l Rigid moving incompressible shearing flow Pressure required to make entire velocity field incompressible l Certainly false but for plausible results
Frictional stress l Neglecting elastic effects l At sand is flowing area l l l At l Strain rate : the yield surface that most directly resists the sliding
Strain l ε은 측정방향으로의 strain l lo은 물질의 기본 길이, l은 현재 길이 l l Shear strain l Strain tensor
Yield condition l Without elastic stress and strain l Stop all sliding motion in a time step l l : Newton’s law l l Divide with area
Simulation algorithm l l Advection Usual water solver l l l Evaluate the strain rate tensor D, according to yield condition l l l Gravity, boundary condition, pressure Subtract for incompressible If < Else rigid store solid store According to regions l l Project connected rigid groups Others velocity
Frictional Boundary Conditions l l Important behavior Don’t sliding at vertical surfaces l Always allow sliding never be stable l u·n n u u. T Boundary
Friction comparison
Cohesion l l c > 0 is the cohesion coefficient Appropriate for soil or sticky materials l Improving results l l With very small amount of cohesion
Fluid Simulation Revisited l l Grids and Particles Grid-based methods (Eulerian grids) l Store on a fixed grid l l Particle-based methods l l l velocity, pressure, some sort of indicator Where the fluid is or isn’t Staggered “MAC” grid is used SPH(Smoothed Particle Hydrodynamics) Actual chunks and motion of fluid are achieved by moving the particles themselves Navier-Stokes equations l Governing equation
Grid-based methods l Primary strength l l l Simplicity of the discretization Incompressibility condition Weakness l Difficult to advection l l Semi-Lagrangian Excessive numerical dissipation Interpolation error Levelset and VOF(volume-of-fluid) l Advection and time consuming
Particle-based methods l Strong point l l l Weak point l l l Advection with excellent accuracy With Ordinary Differential Equation (ODE) Pressure and incompressibility condition Time step Particle-level set method l l Highest fidelity water animations Particles can be exploited even further l Simplifying and accelerating, affording new benefits
Particle-in-Cell Methods l PIC Simulating compressible flow l Handled advection with particles l But everything else on a grid l l FLIP l (Fluid Implicit Particle) Correct numerical dissipation
PIC vs FLIP Save difference & Correct ERROR!
PIC steps Initialize particle positions & velocities l For each time step: l l l l Interpolate particle velocity to grid Do all non-advection steps of water simulation Interpolate the new grid velocity to the particles Move particles with ODE, and satisfy boundary Output the particle position There is no grid-based advection, or vorticity confinement and particle-level
FLIP steps Initialize particle positions & velocities l For each time step: l l l l Interpolate particle velocity to grid Save the grid velocities Do all non-advection steps of water simulation Subtract new grid vel. from saved vel. , then add the Interpolated difference to each particle Move particles with ODE, and satisfy boundary Output the particle position
Initializing Particles l Every l grid cell 8 particles Jittered at 2 x 2 x 2 sub-grid position l Avoid aliasing l For no gaps l l For surface reconstruction l Reposition particles half a grid cell away at surface
Transferring to the Grid l Weighted l average of nearby particles Near : twice the grid cell with l Trilinear weighting l Future optimization Second-order accurate free surface l Adaptive grid l
Solving on the Grid l First, add gravity to grid velocities l Construct a distance field φ(x) in nonfluid and extend with PDE ∇u ·∇φ = 0 l Enforce boundary conditions and incompressibility l Extend the new velocity field again using fast sweeping
Updating Particle Velocities l Trilinearly l interpolate The velocity (PIC) or change (FLIP) l PIC for viscosity flow such as sand l FLIP for inviscid flow such as water <FLIP VS PIC>
Moving Particles l Move particles through velocity fields l Use a simple RK 2 ODE solver Limited by the CFL condition l RK 2 : Euler's half step method l l Detect l when particles penetrated solid Move them just outside
Surface Reconstruction from Particles l Fully particle-based reconstruction l Blobbies [Blinn 1982] Works well with only a few particles l Bad for flat plane, a cone, a large sphere l Large quantity of irregularly spaced particles l
Surface Reconstruction r 0 r x 0 x xx R : radius of neighborhood Sand asspacing) a Fluid” (twice the“Animating average particle Yongning Zhu et. al. 2005
Surface problem l Artifacts in concave regions l l Radii to be accurate estimates of distance to the surface l l But this is very small Sampling φ(x) on a higher resolution Simple smoothing pass Fix all the particle radii to the constant average particle spacing Adjust initial partial position like that Additional grid smoothing reduces bump artifacts Surface reconstruction l Cost is low : full 2503 grid 40 -50 seconds a frame
Examples l Rendering l l Textured sand shading l l Blended a volumetric texture around particle Figure 1 and 2 Simulation l l pbrt[Pharr and Humphreys 2004] 269, 322 particles on a 1003 grid 6 sec/frame on 2 Ghz G 5 workstation Surface reconstruction on a 2503 grid 40– 50 sec Figures 5 and 6 l 433, 479 particles on a 100× 60 grid : 12 sec
Figure 1
Figure 5 6
Conclusion l Converting an existing fluid solver into granular materials l Combines the strength of both particles and grids l A new method for reconstructing implicit surfaces from particles
- Slides: 41