Presentation is loading. Please wait.

Presentation is loading. Please wait.

Animating Sand as a Fluid Yongning Zhu Robert Bridson Presented by KKt.

Similar presentations


Presentation on theme: "Animating Sand as a Fluid Yongning Zhu Robert Bridson Presented by KKt."— Presentation transcript:

1 Animating Sand as a Fluid Yongning Zhu Robert Bridson Presented by KKt

2 Abstract Physics-based simulation method for animating sand Existing water simulator can be turned into a sand simulator Alternative method for simulating fluids Issue of reconstructing a surface from particle

3 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

4 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 constitutive model Sumner et al.[1998] Height-field approach with simple displacement and erosion rules Onoue and Nishita[2003] multi-valued height-fields

5 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 projection Takeshita et al.[2003] For fire

6 Grids for water simulation Foster and Metaxas[1996] Grid-based fully 3D water simulation in graphics Stam[1999] Semi-Lagrangian advection method for faster simulation Foster and Fedkiw[2001] Level set and marker particles Losasso et al.[2004] Adapted octree grids Hong and Kim[2003] Volume-of-fluid algorithms

7 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

8 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)

9 Sand Modeling Frictional Plasticity Mohr-Coulomb law Material will not yield |..| F is Frobenius norm φ is friction angle If is big enough, do not shear cf.

10 Basic mathematics Trace Frobenius norm σ is the singular values of A

11 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 of Normal stress σ Shearing stress τ

12 Tensor

13 Terminologies

14 Yielding sand flow direction That the shearing force is pushing Nonassociated to gradient of yielding Normal ways are not proper here Because of lack of dilation A little when it begins to flow Stops as soon as the sand is freely flowing

15 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

16 Frictional stress Neglecting elastic effects At sand is flowing area Strain rate : At the yield surface that most directly resists the sliding

17 Strain ε 은 측정방향으로의 strain l o 은 물질의 기본 길이, l 은 현재 길이 Shear strain Strain tensor

18 Yield condition Without elastic stress and strain Stop all sliding motion in a time step : Newton’s law Divide with area

19 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

20 Boundary Frictional Boundary Conditions Important behavior Don’t sliding at vertical surfaces Always allow sliding never be stable u n u·n uTuT

21 Friction comparison

22 Cohesion c > 0 is the cohesion coefficient Appropriate for soil or sticky materials Improving results With very small amount of cohesion

23 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

24 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

25 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

26 Particle-in-Cell Methods PIC Simulating compressible flow Handled advection with particles But everything else on a grid FLIP (Fluid Implicit Particle) Correct numerical dissipation

27 PIC vs FLIP Save difference & Correct ERROR!

28 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

29 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

30 Initializing Particles Every grid cell 8 particles Jittered at 2x2x2 sub-grid position Avoid aliasing For no gaps For surface reconstruction Reposition particles half a grid cell away at surface

31 Transferring to the Grid Weighted average of nearby particles Near : twice the grid cell with Trilinear weighting Future optimization Second-order accurate free surface Adaptive grid

32 Solving on the Grid First, add gravity to grid velocities Construct a distance field φ(x) in non- fluid and extend with PDE ∇ u · ∇ φ = 0 Enforce boundary conditions and incompressibility Extend the new velocity field again using fast sweeping

33 Updating Particle Velocities Trilinearly interpolate The velocity (PIC) or change (FLIP) PIC for viscosity flow such as sand FLIP for inviscid flow such as water

34 Moving Particles Move particles through velocity fields Use a simple RK2 ODE solver Limited by the CFL condition RK2 : Euler's half step method Detect when particles penetrated solid Move them just outside

35 Surface Reconstruction from Particles Fully particle-based reconstruction Blobbies [Blinn 1982] Works well with only a few particles Bad for flat plane, a cone, a large sphere Large quantity of irregularly spaced particles

36 Surface Reconstruction r0 x0 x x x r “Animating Sand as a Fluid” Yongning Zhu et.al. 2005 R : radius of neighborhood (twice the average particle spacing)

37 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 spacing Adjust initial partial position like that Additional grid smoothing reduces bump artifacts Surface reconstruction Cost is low : full 250 3 grid 40-50 seconds a frame

38 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 100 3 grid 6 sec/frame on 2Ghz G5 workstation Surface reconstruction on a 250 3 grid 40–50sec Figures 5 and 6 433,479 particles on a 100×60×60 grid : 12 sec

39 Figure 1

40 Figure 5 6

41 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


Download ppt "Animating Sand as a Fluid Yongning Zhu Robert Bridson Presented by KKt."

Similar presentations


Ads by Google