Smoothed Particle a new paradigm for animating highly

  • Slides: 35
Download presentation
Smoothed Particle: a new paradigm for animating highly deformable bodies 1996 Eurographics Workshop Mathieu

Smoothed Particle: a new paradigm for animating highly deformable bodies 1996 Eurographics Workshop Mathieu Desbrun, Marie-Paule Gascuel

Abstract n Smoothed particle – Sample points – Approximation of the value – Derivatives

Abstract n Smoothed particle – Sample points – Approximation of the value – Derivatives of local physical quantities n Goal – Animation of inelastic bodies with a wide range of stiffness and viscosity – Coherent definition of surface – Efficient integration scheme

1 Introduction n Mesh deformation – Finite-defference or finite-element methods – Doesn’t fit to

1 Introduction n Mesh deformation – Finite-defference or finite-element methods – Doesn’t fit to large inelastic deformations n Particle system – Interactions are not dependant to connections but on distance – Good for large changes in shape and in topology

1. 1 Previous approaches n Particle system – Moving point – Widely used for

1. 1 Previous approaches n Particle system – Moving point – Widely used for simulation inelastic deformation and even fluids – Most methods use same attraction-repulsion force interaction – Derives from the Lennard-Jones potential – O(n 2) calculation – Interaction forces are clamped to zero at a cutoff radious

Variety problems of particle system n Lennard-Jones interaction forces are not easy to manipulate

Variety problems of particle system n Lennard-Jones interaction forces are not easy to manipulate – Finding values that will result in a desired global behavior is quite difficult n Time integration – No stability criterion is provided n Lack of definition of the surface – For collision and contact

1. 2 Overview n n Extend the Smoothed Particle Hydrodynamics (SPH) for fluid simulation

1. 2 Overview n n Extend the Smoothed Particle Hydrodynamics (SPH) for fluid simulation Particles can be considered as matter elements, for sample points Smoothed particles are used to approximate the values and derivatives of continuous physical quantities Smoothed particles ensure valid and stable simulation of physical behavior

2 Smoothed Particle Hydrodynamics n Simulating a fluid consists in computing the variation of

2 Smoothed Particle Hydrodynamics n Simulating a fluid consists in computing the variation of continuous functions – Mass density, speed, pressure, or temperature over space and time n Eulerian approach – Dividing space into a fixed grid of voxels – Division of huge empty volumes – Not intuitive n Lagrangian approach – Evolution of selected fluid elements over space and time

2. 1 Discrete formulation of continuous fields n Denotation – mj : mass, rj:

2. 1 Discrete formulation of continuous fields n Denotation – mj : mass, rj: position, vj: velocity, ρj: density n As a sample point, it can also carry physical fields values – Ex: pressure or temperature – Similar to Monte-Carlo techniques n n Fields and derivatives can be approximated by a discrete sum Smoothed Particle – Smeared out according to a smoothing kernel Wh – h: distribution smoothing length

Basis equations of the SPH formalism n – mj : mass, rj: position, vj:

Basis equations of the SPH formalism n – mj : mass, rj: position, vj: velocity, ρj: density – f: a continuous field, fj: f(rj) – value of f at particle j n Mass density

Verification of equation (2)

Verification of equation (2)

2. 2 Pressure forces n Symmetric expression of the pressure force on particle i

2. 2 Pressure forces n Symmetric expression of the pressure force on particle i – If the Pi is known at each particle i – ∇i. Whij : Wh(ri – rj) – P is computed from PV = k

Verification of equation (4)

Verification of equation (4)

2. 3 Viscosity n Express by adding a damping force term – C: n

2. 3 Viscosity n Express by adding a damping force term – C: n n n – Πij : n n sound of speed Fastest velocity Speed of deformation will be transmitted to the whole material 1 st - shear and bulk viscosity 2 nd - prevents particle interpenetration at high speed

3 Simulating highly deformable bodies with smoothed particles The SPH approach provides a robust

3 Simulating highly deformable bodies with smoothed particles The SPH approach provides a robust and reliable tool for fluid simulation n But SPH does not directly apply to Computer Graphics n – Several additions and modifications

3. 1 Interaction Force Design n Pressure and cohesion forces – We would like

3. 1 Interaction Force Design n Pressure and cohesion forces – We would like to animaterials with constant density at rest n Needs some internal cohesion n Resulting in attraction-repulsion forces like LJ n – (P+P 0)V = k, V = 1/ρ, P 0 = kρ0

Advantage & Force equation n Advantage : – If same mass, evenly distributed n

Advantage & Force equation n Advantage : – If same mass, evenly distributed n Good for sample point approximating – If constant density, constant volume n Force equation

Interpretation n First term – Density gradient descent n n Minimize the difference between

Interpretation n First term – Density gradient descent n n Minimize the difference between current and desired densities Second term – Symmetry term n n Ensures the action-reaction principle K determines the strength of the density recovery – Large : stiff material, small : soft material

3. 2 Choice of a smoothing kernel n Smoothing kernel Wh – Very important

3. 2 Choice of a smoothing kernel n Smoothing kernel Wh – Very important – Sample point n Approximate values and derivatives of various functions – Small matter elements n Extent of a particle in space – h: radius of influence of interaction forces – Kernel’s support is related to the computational complexity of the simulation

Spline Gaussian kernel n – Most researches used – Finite radius of influence –

Spline Gaussian kernel n – Most researches used – Finite radius of influence – Simpler computation – Difficult to evaluate interaction forces – Getting closer, repulsive forces are attenuated n n Because of ∇Wh Results clustering

New kernel n – Designed to handle nearby particles – Attraction/repulsion force looks very

New kernel n – Designed to handle nearby particles – Attraction/repulsion force looks very similar to Lennard-Jones attraction/repulsion force

3. 3 Results – Density values are displayed in shades of gray – 80

3. 3 Results – Density values are displayed in shades of gray – 80 smoothed particles – Parameters : k = 10, c = 2, h is constrained by ρ0 – c represents viscosity, k represents stiffness

Discussion n Parallels and differences between smoothed and standard particle system – Cohesion/pressure forces

Discussion n Parallels and differences between smoothed and standard particle system – Cohesion/pressure forces n n n similar to Lennard Jones forces Different to microscopic observation, derived from a global equation Easy to generalize to other materials – Viscosity n n Very close to previous ad-hoc models Computed from relative speeds and proximities

Discussion (cont’) – Symmetric pairwise forces n Smoothed particles ensure both stability and accuracy

Discussion (cont’) – Symmetric pairwise forces n Smoothed particles ensure both stability and accuracy n Because of Monte Carlo approaches Naturally defines a surface around a deformable body n Gives stability criteria that help efficiency n

4 Associating a surface to smoothed particles Computer Graphics needs continuous representation for discretized

4 Associating a surface to smoothed particles Computer Graphics needs continuous representation for discretized model n Particle systems have often been coated with implicit functions n For tight and constant volume, coherent definition are required n SPH has natural way of defining a surface n

4. 1 Level Set of Mass Density n Density ρ – Continuous function –

4. 1 Level Set of Mass Density n Density ρ – Continuous function – Indicates where and how mass is distributed in space – Isovalues of density define implicit surfaces – The choice of adequate isovalue should lead to volume preservation at no extra cost

4. 2 Coherent choice of Iso. Density n Iso-contour value – Distance of 2

4. 2 Coherent choice of Iso. Density n Iso-contour value – Distance of 2 h apart has no interaction – Surface should be located at a distance h n Display using Isovalue of density

Volume variation n – variations of maximum ten percent – Preserving its surface area

Volume variation n – variations of maximum ten percent – Preserving its surface area – Resulting in smooth and realistic shapes

5 Implementation issues n O(n 2) – Large number of particles n Very short

5 Implementation issues n O(n 2) – Large number of particles n Very short time step – To avoid divergences or oscillations Smoothed particles linear time simulation n Time step & adaptive integration n

5. 1 Neighbor search Acceleration n Bottleneck – Force evaluation n Nearest neighbor search

5. 1 Neighbor search Acceleration n Bottleneck – Force evaluation n Nearest neighbor search must be performed – Grid of voxels of size 2 h – Evaluation of forces on particles : O(n) – Creating the grid of voxels and finding particles lying in each voxel : O(n)

5. 2 Locally adaptive integration n Time step – Avoids divergence and ensures efficiency

5. 2 Locally adaptive integration n Time step – Avoids divergence and ensures efficiency – Local stability criteria n Greatly reduce the computation – Use adapted integration time steps n Reduce computation n Automatically avoid divergence

Time Stepping n Courant condition – vδt/δx ≤ 1 n δt : the time

Time Stepping n Courant condition – vδt/δx ≤ 1 n δt : the time step used for integration n v : velocity n δx : grid size n Some grid point do not leaped

Translate into smoothed particle n n Each particle i must not be passed by

Translate into smoothed particle n n Each particle i must not be passed by δti ≤ h/c – h : smoothing length – c : sound speed n Using viscosity – α : Courant number, (approx. 0. 3) – Our implementation

Adaptive Time Integration n n Global adapted time step : δt = mini δti

Adaptive Time Integration n n Global adapted time step : δt = mini δti Only a few particles needs a precise integration – Use individual particle time steps n – Δt : n n User-defined simulation rate Power of two subdivisions Position are advanced at every smallest time step Force evaluations are performed at each individual time step

Integration scheme n Leapfrog integrator n Position correction n Time step is totally managed

Integration scheme n Leapfrog integrator n Position correction n Time step is totally managed by physical and numerical stability criterion

6 Conclusion n n Smoothed particles as samples of mass smeared out in space

6 Conclusion n n Smoothed particles as samples of mass smeared out in space Each particles is integrated at individual time steps Coherent implicit representation from the spatial density Efficient complexity Intuitive parameters for viscous material