Intro to Physics-Based Deformable Body Modeling

advertisement
Intro to Physically-Based Deformable
Body Modeling
COMP 768 Physically-Based Modeling
Fall 2007 Course Lecture
Nick Dragan
November 6, 2007
UNC Department of Computer Science
Outline
• Motivation, Background
• Non-physically based (geometric) models
• Physically based models
– Continuum mechanics, strain, stress
– Lagrangian mesh based methods
•
•
•
•
Method of Finite Differences (1)
Finite Element Method (2)
Boundary Element Method (3)
Mass-spring System (4)
– Others
Motivation
• Quest for visually and physically plausible animation of deformable
objects and fluids
– > beautiful dynamic scenes
• Many proposed methods
– No one model is suited best for any given application
– Take the application’s scenario into account
•
•
•
•
•
Model representation
Range of physical parameters
Topological changes
Real-time or interactive
etc
Background
• Interdisciplinary field
– Newtonian dynamics, continuum mechanics,
numerical computation, differential geometry,
vector calculus, approximation theory
• Applications
– Medicine: surgical simulation
– Entertainment: digital art
• Movies and video games
– Character animation, hair and cloth modeling
– Physical simulation
– Elastic, plastic, melting objects, fluids, gases, interaction
between different media, tear and fracture
Eye Candy
• Videos
– Material fracture
• O'Brien, J. F., Hodgins, J. K., "Animating Fracture."
Communications of the ACM, July 2000, Vol. 43, No. 7,
pp. 68-75.
– http://www.cs.berkeley.edu/b-cam/Papers/obrien-2000-AF/
– Interplay between rigid bodies and fluids
• "Rigid Fluid: Animating the Interplay Between Rigid
Bodies and Fluid" Mark Carlson, Peter J. Mucha and
Greg Turk. To appear in ACM SIGGRAPH 2004.
– http://www.cc.gatech.edu/~carlson/
– Cloth simulation
• “Fast Collision Detection for Deformable Models using
Representative-Triangles” Sean Curtis, 2007.
Basic Definition
• Deformable object
– Defined by
• Undeformed shape (equilibrium configuration/rest
shape/initial shape)
• Set of material parameters that define how it
deforms under applied forces
• Deformation
– A mapping of the positions of every particle in
the original object to those in the deformed
body
Deformation
• Modify Geometry
• Space Transformation
(x,y,z)
(x,y,z)
Non-Physically-Based Methods
• Geometrically based
• Quick overview
– Splines & Patches (1)
– Free-Form Deformation (2)
– Subdivision Surfaces (3)
Splines & Patches (1)
• Curves & surfaces are represented by a set
of control points
• Adjust shape by moving/adding/deleting
control points or changing weights
• Precise specification & modification of curves
& surfaces can be laborious
Free-Form Deformation (2)
• FFD (space deformation) change the shape of an object by
deforming the space (lattice) in which the object lies within.
• Versatile: deformation is defined independent of the representation
of geometry
• Barr’s space warp defines deformation in terms of geometric
mapping (SIGGRAPH’84)
• Sederberg & Parry generalized space warp by embedding an
object in a lattice of grids.
• Manipulating the nodes of these grids (cubes) induces
deformation of the space inside of each grid and thus the
object itself.
Free-Form Deformation (2)
• Linear Combination of Node Positions
n
( x,y,z)   bI ( x, y, z ) X I
I 1
•
Thomas W. Sederberg, Scott R. Parry, Free-Form Deformation of
Solid Geometric Models, Computer Graphics (Proceedings of
SIGGRAPH 86). 20(4), pp. 151-160, 1986.
Generalized FFD (2)
• fi : Ui  R3 where {Ui } is the set of 3D cells defined
by the grid and fi mappings define how different
object representations are affected by deformation
• Lattices with different sizes, resolutions and
geometries (Coquillart, SIGGRAPH’90)
• Direct manipulation of curves & surfaces with
minimum least-square energy (Hsu et al,
SIGGRAPH’90)
• Lattices with arbitrary topology using a subdivision
scheme (M & J, SIGGRAPH’96)
Subdivision Surfaces (3)
• Subdivision produces a smooth curve or surface
as the limit of a sequence of successive
refinements
• We can repeat a simple operation and obtain a
smooth result after doing it an infinite number of
times
Two Approaches
• Interpolating
– At each step of subdivision, the points defining the
previous level remain undisturbed in all finer levels
– Can control the limit surface more intuitively
– Can simplify algorithms efficiently
• Approximating
– At each step of subdivision, all of the points are moved
(in general)
– Can provide higher quality surfaces
– Can result in faster convergence
Surface Rules
• For triangular meshes
– Loop, Modified Butterfly
• For quad meshes
– Doo-Sabin, Catmull-Clark, Kobbelt
• The only other possibility for regular
meshes are hexagonal but these are not
very common
Axioms of Continuum Mechanics
• A material continuum remains continuum under the action of
forces.
• Stress and strain can be defined everywhere in the body.
• Stress at a point is related to the strain and the rate of change of
strain with respect to time at the same point.
• Stress at any point in the body depends only on the deformation
in the immediate neighborhood of that point.
• The stress-strain relationship may be considered separately,
though it may be influenced by temperature, electric charge, ion
transport, etc.
Revisiting Deformation
– Deformable object
• Continuous connected subset M of R3 where m in M are
coordinates of points in the object
– Process of physically based deformation
• Force applied to object -> it deforms
• Point at location m moves to new location x(m,t) at time t
• Deformation of M specified by displacement vector field u(m)
= x(m) – m
– Elastic strain
• Measured in terms of spatial variations of displacement field
u = u(m) = (u,v,w)T
Strain
• Consider a 1D example: a string of an initial length L0
stretched to a length L
• The ratio  = L/L0 is called the stretch ratio
• The ratios (L - L0)/L0 or (L - L0 )/L are strain measures
• Popular choices in computer graphics:
– G is Green’s nonlinear strain tensor; C is its linearization, Cauchey’s
linear strain tensor; del of u is the gradient of the displacement field
Stress
• Internal stress tensor  for each material point m is based on
strain  at that point
– measured as a force per unit area
• Normal stress, say xx acts on a cross section normal to the xaxis and in the direction of the x-axis. Similarly for yy
y
y
xx
xy x
x
yy
yx
• Shear stress xy is a force per unit area acting in a plane cross
section  to the x-axis in the direction of y-axis. Similarly for yx
Hooke’s Law
• Use Hooke’s linear material
law
• For an infinitesimal strain in
uniaxial stretching, a relation
like  = E (where E is a
constant called Young’s
Modulus) is valid within a
certain range of stresses.
• For a Hookean material
subjected to an infinitesimal
shear strain is  = G tan 
where G is another constant
called the shear modulus or
modulus of rigidity.

Continuum Model
• The full continuum model of a deformable object considers the
equilibrium of a general buoy acted on by external forces. The
object reaches equilibrium when its potential energy is at a
minimum.
• The total potential energy of a deformable system is
=-W
where  is the total strain energy of the deformable object, and
W is the work done by external loads on the deformable object.
• In order to determine the shape of the object at equilibrium, both
are expressed in terms of the object deformation, which is
represented by a function of the material displacement over the
object. The system potential reaches a minimum when d w.r.t.
displacement function is zero.
Time Integration
• To simulate a dynamic deformable object, need to know
x(m,t) of all points in M
• Given x(m,t), we can display current state of the object
at fixed time steps ∆t in the simulation
– x(t0) -> x(∆t) -> x(2∆t) … = animated deformable object
• Calculate x(t) implicitly from the differential equations
representing by Newton’s 2nd law of motion
• Integrating this system of equations will give the
unknown vector field x and thus allow us to display the
deformable object on the screen
Physically-Based Methods
• Different numerical methods and models
can be used for solving the problem of
physical deformation
•
•
•
•
Method of Finite Differences
Finite Element Method
Boundary Element Method
Mass-spring System
Physically-Based Method 1
• Method of Finite Differences
• Finite Element Method
• Boundary Element Method
• Mass-spring System
Method of Finite Differences
• One of the earliest proposed methods
– Terzopolous D., Platt J., Fleischer K.: Elastically Deformable
Models (SIGGRAPH ‘87)
• Extended to plasticity and fracture
– Terzopolous D., Fleischer K.: Modeling inelastic deformation:
viscoelasticity, plasticity, fracture (SIGGRAPH ‘88)
• Advantage
– Easier to implement that FEM
• Disadvantage
– Requires a regular mesh grid (constrains choices of
geometric representations)
• Difficult to approximate an arbitrary object with a regular mesh
• No local adaptation
Method of Finite Differences
(continued)
• Algorithm
– Potential energy stored in elastically deformable
body dictates its dynamics
– Deformation energy = weighted matrix norm of the
difference between the metric tensors of the
deformed and original shape, integrated over the
entire continuum
– Continuous directional derivative of the elastic
force is discretized using the Method of Finite
Differences
Physically-Based Method 2
• Method of Finite Differences
• Finite Element Method
• Boundary Element Method
• Mass-spring System
Finite Element Methods
• One of the most popular methods to solve PDE’s on
irregular grids
• General, versatile and accurate
• But, computationally expensive and mathematically
sophisticated
• Explicit FEM: simpler to understand and implement
– O’Brien J. F., Hodgins J. K.: Graphical modeling and
animation of brittle fracture (SIGGRAPH ‘99)
– DEBUNNE G., DESBRUN M., CANI M.-P., BARR A.:
Dynamic real-time deformations using space & time adaptive
sampling (SIGGRAPH ‘01)
– M. Müller, J. Dorsey, L. McMillan, R. Jagnow, and B. Cutler,
Stable Real-Time Deformations (SIGGRAPH ’02)
Finite Element Methods (continued)
• FEM is used to find an approximation for a continuous function that
satisfies some equilibrium expression due to deformation.
• In FEM, the continuum, or object, is divided into a finite number of
disjoint elements and we approximate the continuous equilibrium
equation over each element.
• The solution is subject to the constraints at the node points and the
element boundaries, so that continuity between elements is
achieved.
• PDE governing dynamic elastic
materials
• p is density of material
• f is externally applied
forces (gravity, collision)
General FEM
• The system is discretized by representing the desired
function within each element as a finite sum of elementspecific interpolation, or shape, functions.
• For example, in the case when the desired function is a
scalar function (x,y,z), the value of  at the point (x,y,z)
is approximated by:
(x,y,z)   hi(x,y,z) i
where the hi are the interpolation functions for the
elements containing (x,y,z), and the i are the values of
(x,y,z) at the element’s node points.
• Solving the equilibrium equation becomes a matter of
determining the finite set of node values i that minimize
the total potential energy in the body.
Basic Steps of Solving FEM
1.
Derive an equilibrium equation from the potential energy
equation in terms of material displacement.
2.
Select the appropriate finite elements and corresponding
interpolation functions. Subdivide the object into elements.
3.
For each element, reexpress the components of the
equilibrium equation in terms of interpolation functions and
the element’s node displacements.
4.
Combine the set of equilibrium equations for all the
elements into a single system and solve the system for the
node displacements for the whole object.
5.
Use the node displacements and the interpolation functions
of a particular element to calculate displacements (or other
quantities) for points within the element.
Physically-Based Method 3
• Method of Finite Differences
• Finite Element Method
• Boundary Element Method
• Mass-spring System
Boundary Element Method
• Alternative to FEM
– Good introduction: Hunter P.: FEM/BEM Notes. University of
Oakland, New Zealand, 2005.
• All computations done on the surface nodes of the
elastic body instead of on its volume (interior)
– Substantial speedup: 3D problem essentially reduced to 2D
– Real-time deformation achieved
• D. James and D. Pai, Art Defo - Accurate Real Time Deformable
Objects (SIGGRAPH ‘99)
• Limited to objects with linear elastic bodies, i.e.
homogeneous interior
• Topological changes (fractures) more difficult to
handle
Boundary Element Method
• Algorithm
– Integral form of the equation of motion is transformed into a
surface integral by applying the Green-Gauss theorem
• More work
– James D. L., Pai D. K.: Real time simulation of multizone
elastokinematic models (Intl. Conference on Robotics and
Automation ‘02)
– JAMES D. L., PAI D. K.: Multiresolution Green’s function
methods for interactive simulation of large-scale elastostatic
objects. ACM Transactions on Graphics 22, 1 (2003)
Physically-Based Method 4
• Method of Finite Differences
• Finite Element Method
• Boundary Element Method
• Mass-spring System
Mass-spring System
• Simplest and most intuitive model
• Discrete point masses (~particle system)
connected together by a network of massless
springs
• Has been used to model skin, fat, muscle, cloth,
snakes
Mass-Spring System
• Algorithm
– There are N particles in the system and X
represents a 3N x 1 position vector:
M (d2X/dt2) + C (dX/dt) + K X = F
– M, C, K are 3N x 3N mass, damping and
stiffness matrices. M and C are diagonal and K
is banded. F is a 3N-dimensional force vector.
– The system is evolved by solving:
dV/dt = M–1 ( - CV - KX + F)
dX/dt = V
Mass-Spring System (continued)
• Advantages
– Computationally efficient and handles large deformations
with ease
• Disadvantages
– Not convergent; instead dependent on the mesh
resolution and topology
– Not necessarily accurate: not built upon elasticity theory
like FEM and FDM
• Spring constants chosen arbitrarily
– Difficult to model continuum properties
– Do not generalize easily to triangular or tetrahedral
meshes
• Works
– D. Baraff, A. P. Witkin, Large Steps in Cloth Simulation,
(SIGGRAPH ’98)
Other Physically-Based Methods
• Mesh-based
– Finite Volume Method
• Mesh Free
– Point-based Animations
– Shape Matching
– Modal Analysis
• Eulerian and Semi-Lagrangian
Open Research Issues
• Validation of physically accurate deformation
– tissue, fabrics, material properties
• Achieving realistic & real-time deformation of
complex objects
– exploiting hardware & parallelism, hierarchical
methods, dynamics simplification, etc.
• Integrating deformable modeling with
interesting “real” applications
– various constraints & contacts, collision detection
References
[1] A. Nealen, M. Müller, R. Keiser, E. Boxerman, M.
Carlson, Physically Based Deformable Models in
Computer Graphics, Computer Graphics Forum,
Vol. 25, issue 4, pages 809-836, previously
appeared as EG STAR 2005.
[2] Dr. Ming Lin’s Slides “Introduction to Non-Rigid
Body Dynamics”, COMP 768: Physically Based
Modeling, Simulation and Animation, University of
North Carolina at Chapel Hill.
Download