smoothed particle: a new paradigm for animating highly deformable bodies 1996 eurographics workshop...

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

Upload: dulcie-reynolds

Post on 05-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

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

Smoothed Particle:Smoothed Particle:a new paradigm for a new paradigm for animating highly animating highly deformable bodiesdeformable bodies

1996 Eurographics Workshop1996 Eurographics WorkshopMathieu Desbrun, Mathieu Desbrun,

Marie-Paule GascuelMarie-Paule Gascuel

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

AbstractAbstract

Smoothed particleSmoothed particle– Sample pointsSample points– Approximation of the valueApproximation of the value– Derivatives of local physical quantitiesDerivatives of local physical quantities

GoalGoal– Animation of inelastic bodies with a wide Animation of inelastic bodies with a wide

range of stiffness and viscosityrange of stiffness and viscosity– Coherent definition of surfaceCoherent definition of surface– Efficient integration schemeEfficient integration scheme

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

1 Introduction1 Introduction

Mesh deformationMesh deformation– Finite-defference or finite-element methodsFinite-defference or finite-element methods– Doesn’t fit to large inelastic deformationsDoesn’t fit to large inelastic deformations

Particle systemParticle system– Interactions are not dependant to connectiInteractions are not dependant to connecti

ons but on distanceons but on distance– Good for large changes in shape and in toGood for large changes in shape and in to

pologypology

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

1.1 Previous 1.1 Previous approachesapproaches Particle systemParticle system

– Moving pointMoving point– Widely used for simulation inelastic deformation Widely used for simulation inelastic deformation

and even fluidsand even fluids– Most methods use same attraction-repulsion forcMost methods use same attraction-repulsion forc

e interactione interaction– Derives from the Lennard-Jones potentialDerives from the Lennard-Jones potential– O(nO(n22) calculation) calculation– Interaction forces are clamped Interaction forces are clamped

to zero at a cutoff radiousto zero at a cutoff radious

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

Variety problems of Variety problems of particle systemparticle system Lennard-Jones interaction forces are nLennard-Jones interaction forces are n

ot easy to manipulateot easy to manipulate– Finding values that will result in a desired Finding values that will result in a desired

global behavior is quite difficultglobal behavior is quite difficult Time integrationTime integration

– No stability criterion is providedNo stability criterion is provided Lack of definition of the surfaceLack of definition of the surface

– For collision and contactFor collision and contact

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

1.2 Overview1.2 Overview

Extend the Smoothed Particle Extend the Smoothed Particle Hydrodynamics (SPH) for fluid simulationHydrodynamics (SPH) for fluid simulation

Particles can be considered as matter Particles can be considered as matter elements, for sample pointselements, for sample points

Smoothed particles are used to Smoothed particles are used to approximate the values and derivatives approximate the values and derivatives of continuous physical quantitiesof continuous physical quantities

Smoothed particles ensure valid and Smoothed particles ensure valid and stable simulation of physical behaviorstable simulation of physical behavior

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

2 Smoothed Particle 2 Smoothed Particle HydrodynamicsHydrodynamics Simulating a fluid consists in computing the Simulating a fluid consists in computing the

variation of continuous functionsvariation of continuous functions– Mass density, speed, pressure, or temperature oMass density, speed, pressure, or temperature o

ver space and timever space and time Eulerian approachEulerian approach

– Dividing space into a fixed grid of voxelsDividing space into a fixed grid of voxels– Division of huge empty volumesDivision of huge empty volumes– Not intuitiveNot intuitive

Lagrangian approachLagrangian approach– Evolution of selected fluid elements over space aEvolution of selected fluid elements over space a

nd timend time

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

2.1 Discrete 2.1 Discrete formulation of formulation of continuous fieldscontinuous fields DenotationDenotation

– mmjj : mass, r : mass, rjj: position, v: position, v jj: velocity, : velocity, ρρ jj: density: density As a sample point, it can also carry physical As a sample point, it can also carry physical

fields valuesfields values– Ex: pressure or temperatureEx: pressure or temperature– Similar to Monte-Carlo techniquesSimilar to Monte-Carlo techniques

Fields and derivatives can be approximated by a discretFields and derivatives can be approximated by a discrete sume sum

Smoothed ParticleSmoothed Particle– Smeared out according to a smoothing kernel WSmeared out according to a smoothing kernel Whh

– h: distribution smoothing lengthh: distribution smoothing length

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

Basis equations of the Basis equations of the SPH formalismSPH formalism

– mmjj : mass, r : mass, rjj: position, v: position, vjj: velocity, : velocity, ρρ jj: density : density – f: a continuous field, ff: a continuous field, f jj: f(r: f(rjj) – value of f at particle j) – value of f at particle j

Mass densityMass density

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

Verification of Verification of equation (2)equation (2)

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

2.2 Pressure forces2.2 Pressure forces

Symmetric expression of the pressure fSymmetric expression of the pressure force on particle iorce on particle i

– If the PIf the Pii is known at each particle i is known at each particle i

– ∇iWhij : Wh(ri – rj)

– P is computed from PV = k

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

Verification of Verification of equation (4)equation (4)

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

2.3 Viscosity2.3 Viscosity

Express by adding a damping force termExpress by adding a damping force term

– C :C : sound of speedsound of speed Fastest velocityFastest velocity Speed of deformation will be transmitted to the whole materiaSpeed of deformation will be transmitted to the whole materia

ll– ΠΠijij : :

11stst - shear and bulk viscosity - shear and bulk viscosity 22ndnd - prevents particle interpenetration at high speed - prevents particle interpenetration at high speed

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

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

robust and reliable tool for fluid robust and reliable tool for fluid simulationsimulation

But SPH does not directly apply to But SPH does not directly apply to Computer GraphicsComputer Graphics– Several additions and modificationsSeveral additions and modifications

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

3.1 Interaction Force 3.1 Interaction Force DesignDesign Pressure and cohesion forcesPressure and cohesion forces

– We would like to animate materials with cWe would like to animate materials with constant density at restonstant density at rest Needs some internal cohesionNeeds some internal cohesion Resulting in attraction-repulsion forces like LJResulting in attraction-repulsion forces like LJ

– (P+P(P+P00)V = k, V = 1/)V = k, V = 1/ρρ, P, P00 = k = kρρ00

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

Advantage & Force Advantage & Force equationequation Advantage :Advantage :

– If same mass, evenly distributedIf same mass, evenly distributed Good for sample point approximatingGood for sample point approximating

– If constant density, constant volumeIf constant density, constant volume Force equationForce equation

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

InterpretationInterpretation

First termFirst term– Density gradient descentDensity gradient descent

Minimize the difference between current and Minimize the difference between current and desired densitiesdesired densities

Second termSecond term– Symmetry termSymmetry term

Ensures the action-reaction principleEnsures the action-reaction principle

K determines the strength of the K determines the strength of the density recoverydensity recovery– Large : stiff material, small : soft materialLarge : stiff material, small : soft material

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

3.2 Choice of a 3.2 Choice of a smoothing kernelsmoothing kernel Smoothing kernel WSmoothing kernel Whh

– Very importantVery important– Sample pointSample point

Approximate values and derivatives of various functionsApproximate values and derivatives of various functions

– Small matter elementsSmall matter elements Extent of a particle in spaceExtent of a particle in space

– h: radius of influence of interaction forcesh: radius of influence of interaction forces– Kernel’s support is related to the computational cKernel’s support is related to the computational c

omplexity of the simulationomplexity of the simulation

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

Spline Gaussian kernelSpline Gaussian kernel

– Most researches usedMost researches used– Finite radius of influenceFinite radius of influence– Simpler computationSimpler computation– Difficult to evaluate interaction forcesDifficult to evaluate interaction forces– Getting closer, repulsive forces are attenuatedGetting closer, repulsive forces are attenuated

Because of Because of ∇Wh

Results clustering

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

New kernelNew kernel

– Designed to handle nearby particlesDesigned to handle nearby particles– Attraction/repulsion force looks very similar to LeAttraction/repulsion force looks very similar to Le

nnard-Jones attraction/repulsion forcennard-Jones attraction/repulsion force

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

3.3 Results3.3 Results

– Density values are displayed in shades of grayDensity values are displayed in shades of gray– 80 smoothed particles80 smoothed particles– Parameters : k = 10, c = 2, h is constrained by Parameters : k = 10, c = 2, h is constrained by ρρ

00

– c represents viscosity, k represents stiffnessc represents viscosity, k represents stiffness

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

DiscussionDiscussion

Parallels and differences between smoothed Parallels and differences between smoothed and standard particle systemand standard particle system– Cohesion/pressure forcesCohesion/pressure forces

similar to Lennard Jones forcessimilar to Lennard Jones forces Different to microscopic observation, derived from a gloDifferent to microscopic observation, derived from a glo

bal equationbal equation Easy to generalize to other materialsEasy to generalize to other materials

– ViscosityViscosity Very close to previous ad-hoc modelsVery close to previous ad-hoc models Computed from relative speeds and proximitiesComputed from relative speeds and proximities

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

Discussion (cont’)Discussion (cont’)

– Symmetric pairwise forcesSymmetric pairwise forces Smoothed particles ensure both stability and Smoothed particles ensure both stability and

accuracyaccuracy Because of Monte Carlo approachesBecause of Monte Carlo approaches

Naturally defines a surface around a deNaturally defines a surface around a deformable bodyformable body

Gives stability criteria that help efficienGives stability criteria that help efficiencycy

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

4 Associating a surface 4 Associating a surface to smoothed particlesto smoothed particles Computer Graphics needs continuous rComputer Graphics needs continuous r

epresentation for discretized modelepresentation for discretized model Particle systems have often been coatParticle systems have often been coat

ed with implicit functionsed with implicit functions For tight and constant volume, coherenFor tight and constant volume, coheren

t definition are requiredt definition are required SPH has natural way of defining a surfaSPH has natural way of defining a surfa

cece

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

4.1 Level Set of Mass 4.1 Level Set of Mass DensityDensity Density Density ρρ

– Continuous functionContinuous function– Indicates where and how mass is distributIndicates where and how mass is distribut

ed in spaceed in space– Isovalues of density define implicit surfacIsovalues of density define implicit surfac

eses– The choice of adequate isovalue should leThe choice of adequate isovalue should le

ad to volume preservation at no extra costad to volume preservation at no extra cost

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

4.2 Coherent choice of Iso-De4.2 Coherent choice of Iso-Densitynsity Iso-contour valueIso-contour value

– Distance of 2h apDistance of 2h apart has no interactart has no interactionion

– Surface should be Surface should be located at a distanlocated at a distance hce h

Display using Iso-vDisplay using Iso-value of densityalue of density

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

Volume variationVolume variation

– variations of maximum ten percentvariations of maximum ten percent– Preserving its surface areaPreserving its surface area– Resulting in smooth and realistic shapesResulting in smooth and realistic shapes

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

5 Implementation 5 Implementation issuesissues O(nO(n22))

– Large number of particlesLarge number of particles Very short time stepVery short time step

– To avoid divergences or oscillationsTo avoid divergences or oscillations Smoothed particles linear time Smoothed particles linear time

simulationsimulation Time step & adaptive integrationTime step & adaptive integration

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

5.1 Neighbor search 5.1 Neighbor search AccelerationAcceleration BottleneckBottleneck

– Force evaluationForce evaluation Nearest neighbor search must be perfoNearest neighbor search must be perfo

rmedrmed– Grid of voxels of size 2hGrid of voxels of size 2h– Evaluation of forces on particles : O(n)Evaluation of forces on particles : O(n)– Creating the grid of voxels and finding partCreating the grid of voxels and finding part

icles lying in each voxel : O(n)icles lying in each voxel : O(n)

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

5.2 Locally adaptive 5.2 Locally adaptive integrationintegration Time stepTime step

– Avoids divergence and ensures Avoids divergence and ensures efficiencyefficiency

– Local stability criteriaLocal stability criteria Greatly reduce the computationGreatly reduce the computation

– Use adapted integration time stepsUse adapted integration time steps Reduce computationReduce computation Automatically avoid divergenceAutomatically avoid divergence

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

Time SteppingTime Stepping

Courant conditionCourant condition– vδt/δx ≤ 1vδt/δx ≤ 1

δt : the time step used for integrationδt : the time step used for integration v : velocityv : velocity δx : grid sizeδx : grid size Some grid point do not leapedSome grid point do not leaped

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

Translate into Translate into smoothed particlesmoothed particle Each particle i must not be passed byEach particle i must not be passed by δtδtii ≤ h/c ≤ h/c

– h : smoothing lengthh : smoothing length– c : sound speedc : sound speed

Using viscosityUsing viscosity

– αα : Courant number, (approx. 0.3) : Courant number, (approx. 0.3)– Our implementationOur implementation

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

Adaptive Time Adaptive Time IntegrationIntegration Global adapted time step : δt = minGlobal adapted time step : δt = min i i δtδtii Only a few particles needs a precise integratiOnly a few particles needs a precise integrati

onon– Use individual particle time stepsUse individual particle time steps

– Δt :Δt :

User-defined simulation rateUser-defined simulation rate Power of two subdivisionsPower of two subdivisions

Position are advanced at every smallest time Position are advanced at every smallest time stepstep

Force evaluations are performed at each indiForce evaluations are performed at each individual time stepvidual time step

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

Integration schemeIntegration scheme

Leapfrog integratorLeapfrog integrator

Position correctionPosition correction

Time step is totally managed by physical Time step is totally managed by physical and numerical stability criterionand numerical stability criterion

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

6 Conclusion6 Conclusion

Smoothed particles as samples of mass Smoothed particles as samples of mass smeared out in spacesmeared out in space

Each particles is integrated at individual Each particles is integrated at individual time stepstime steps

Coherent implicit representation from Coherent implicit representation from the spatial densitythe spatial density

Efficient complexityEfficient complexity Intuitive parameters for viscous Intuitive parameters for viscous

materialmaterial