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