Introduction to Modeling Of NonRigid Objects - PowerPoint PPT Presentation

1 / 62
About This Presentation
Title:

Introduction to Modeling Of NonRigid Objects

Description:

where L is the total strain energy (energy stored in the body) and W is the work ... an elastic system, the material strain () is related to the displacement u ... – PowerPoint PPT presentation

Number of Views:39
Avg rating:3.0/5.0
Slides: 63
Provided by: russel97
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Modeling Of NonRigid Objects


1
Introduction to Modeling Of Non-Rigid Objects
  • COMP 259 Physically Based Modeling
  • Russell Gayle

2
Lecture Outline
  • Why Use Deformable Objects?
  • Very Quick FFD Review
  • Spring-Mass Systems
  • Continuum Methods
  • FEM - Mathematical Background
  • FEM For Deformations
  • Skeleton Driven Deformations
  • Global Deformations
  • Quick Mention of other methods

3
Why Deformable Objects
  • Many things arent rigid!
  • In any cases, it is not sufficient to have rigid
    objects
  • Cloth, skin, etc
  • Comes into play even in image analysis for
    segmentation

4
Free-Form Deformation
  • For details, refer to Jeremys talk
  • Basic idea
  • Deform the space in which the object lies
  • Can fit the object into lattices of varying
    resolution and shape
  • Can use it to deform only specific areas or the
    entire object

5
FFD Pros and Cons
  • Advantages
  • Quick and simple to use
  • Disadvantages
  • Difficult for precise control
  • Or, you must have a LOT of patience
  • A geometric method, so not intrinsically
    physically accurate

6
Physical Methods
  • For realistic simulation, FFD can be too much
    work
  • It requires tedious moving of control points
  • We would like methods that will do all this for
    us
  • Thats where physical methods come in!

7
Spring-Mass Systems
  • Similar to the springs we modeled in homework 1
  • But, now we model an object as a collections of
    point masses connected by springs

8
Spring-Mass Math
  • Just like before, we can solve an ODE to update
    the system
  • Fortunately, this generalizes nicely into a
    matrix form
  • - Where M, C, K and 3Nx3N matrices of mass,
    damping, and stiffness, and x and v are position
    and velocity. Note that in general, each of these
    are very sparse.

9
Applications
  • Everywhere!
  • Skin and facial animation
  • Terzopolous and Waters, 90
  • State Transitions
  • Terzopolous et al, 89
  • Artificial Fish
  • Tu and Terzopolous, 94
  • Many, many, many more!

10
Advantages
  • Very simple and well understood from a dynamics
    standpoint
  • Easy to implement and construct
  • Can easily be rendered at interactive rates
  • Easy parallelizable

11
Disadvantages
  • Discrete model
  • Difficult to get good spring constants
  • Certain constraints are hard to express
  • Incompressible volumes, thin surfaces, complex
    objects
  • May be able to get around some of this with extra
    springs, but that increases computational cost
  • Angular springs can also help
  • Stiffness problems with large spring constants
  • These can cause a lot of numerical error, forcing
    a smaller time step

12
Movie!
  • A simple, real-time physically realistic
    spring-mass system

13
Continuum Methods
  • We would like to represent the object as an
    entire surface
  • This is more realistic, since most real objects
    are continuous surfaces
  • More formally, a solid body with mass and
    energies distributed throughout
  • Still must represent it as a discrete system,
    which takes this into account

14
Continuum Methods, contd
  • Under these methods, we wish to consider the
    equilibrium of a general body acted on by
    external forces
  • The object then deforms based on these forces and
    its material properties
  • The equilibrium is reached when the bodies
    potential energy is at a minimum

15
Potential Energy
  • We can express the potential energy of a
    deformable system as
  • where L is the total strain energy (energy stored
    in the body) and W is the work done by loads
    acting on the body (i.e. load at a specific
    point, loads distributed over the entire body,
    loads distributed over just the surface of the
    body)

16
Minimizing P
  • We must express L and W in terms of the object
    deformation, i.e. a function of material
    displacement
  • We can find the minimum by finding where the
    derivative of the displacement function is zero
  • Since it is likely that a closed form of this
    equation either cant be found or would be
    difficult to be found, various numerical methods
    could be applied

17
Numerical Methods
  • Believe it or not, mass-spring methods solve this
    by discretizing the equilibrium equation at the
    mesh points
  • Finite Element Methods divide the object onto a
    set of simple elements and approximate the
    continuous equation over each element
  • Boundary Element Methods is like FEM, but only
    discretizes the boundary (i.e. surface) of the
    object
  • Requires reformulating the governing equations
  • Many others (Ill mention some later on)

18
Finite Element Methods (FEM)
  • FEM is a technique for approximating a continuous
    function that satisfies some equilibrium equation
  • As mentioned in the last slide, we divide the
    object with elements that join at discrete node
    points.
  • We then find a function that solves the
    appropriate equilibrium equation for each element
  • This function has boundary conditions at the node
    points and along the boundaries, which ensures
    continuity between elements

19
More FEM
  • On a higher level, this effectively discretizes
    the system by representing the continuous
    function in each element as a finite sum of our
    element interpolation (also called shape)
    functions
  • For example, if our equilibrium function is
    scalar function F(x,y,z), then we can approximate
    F as

20
FEM Math Contd
  • Where hi are the interpolating (shape) functions
    for the point (x,y,z) and Fi are the values of
    F(x,y,z) at the ith node point.
  • From this, solving our equilibrium equation
    reduces to determining the set of node points Fi
    that minimize the total potential energy (P)

21
FEM for Deformations
  • Although other uses of FEMs for deformable
    objects exist, a common one is displacement-based
    FEM.
  • As built up, we wish to minimize P from before
    with respect to the material properties of the
    object
  • Note Since our object is in 3D, the displacement
    function returns a 3D vector

22
FEM Steps
  • We can compute object deformations as follows
  • Based on material properties, derive the
    potential energy function, P, in terms of
    material displacement
  • Select appropriate finite elements and their
    corresponding interpolation (shape) function, and
    subdivide the object into these elements
  • Note We can think of the spring-mass system as a
    finite element method in which each element is a
    spring, with the spring equation being the
    interpolating function. But, this does not take
    the entire surface into consideration so it isnt
    a great approximation.

23
FEM Steps
  • For each element, convert the components of the
    equilibrium equations into a sum of the
    interpolating functions and the elements node
    displacements
  • Combine all of these equations into a single
    system, and solve this system for node
    displacements.
  • Using the interpolating function for an element
    and these new node displacements, calculate
    displacements for points within that element.
  • Using these values, other quantities about the
    body, such as internal stress, can be computed

24
Step 1 Explained!
  • Step 1 Based on material properties, derive the
    potential energy function, P, in terms of
    material displacement
  • We need to determine what L and W are in these
    terms
  • Strain energy (L), given material stress and
    strain components (s and e, respectively), over a
    volume V is

25
Step 1 Contd
  • Where D is a linear matrix relating stress and
    strain for an elastic system, using the
    Generalized Hookes Law
  • Each of these are vectors of stress and strain
    components for an elastic system

26
More Step 1
  • For an elastic system, the material strain () is
    related to the displacement u(u,v,w) is
    ?
  • By putting these into the integral equation, we
    get strain energy in terms of material
    displacement

27
Even more Step 1.
  • Fortunately, work W is simpler. We can find the
    work done by an external force f at a point as
    the dot product of the force and the material
    displacement u, integrated over the volume.
  • For each external force, we can sum integrate
    over the region they effect and add them together
    for the total work. For instance, forces from
    drag or pressure are applied only to the surface
    instead of the entire volume.
  • (We made it through Step 1!)

28
Onto Step 2
  • Step 2 Select appropriate finite elements and
    their corresponding interpolation (shape)
    function, and subdivide the object into these
    elements
  • Many options are available, each differ in
    accuracy and computational complexity, different
    situations require differetn elements
  • Common elements in 2D and 3D

29
Step 2, without too much Math!
  • Fortunately, interpolation functions for these
    elements are known, and can be found in many FEM
    texts.
  • But, to get an intuitive idea of what it takes
  • It is useful to make these functions polynomials.
    So since we must have the correct node values, if
    the element has N nodes, our polynomial must have
    at least N coefficients. We can choose the
    polynomial to be the one of lowest degree which
    fits these constraints.

30
A little more Step 2
  • Interpolation function properties
  • Only applied to given element, and are zero
    outside the element
  • Has a value of one at its corresponding node, the
    function vanishes at the other nodes in the
    element
  • The sum of the functions within an element sum to
    one
  • They have the same order or form as the
    interpolation equation

31
Interp Fcn Vs. Interp Eqn
  • The interpolation equation gives us an
    approximation from which we derive the
    interpolation functions.
  • In other words, we use the interpolation equation
    with some constraints to solve for the
    interpolation functions. We use this functions to
    determine how to approximate the values given an
    (x,y,z)

32
Example functions
33
Hooray! Step 3
  • Step 3 For each element, convert the components
    of the equilibrium equations into a sum of the
    interpolating functions and the elements node
    displacements
  • From our choice of interpolation functions and
    elements, we can express the displacement vector
    as a linear combination of interpolation fcns
    applied to node displacements

34
Step 3 Math
  • The linear combination
  • Where
  • and H is a 3 x 3N matrix, whose form depends on
    the choice of element and interpolation fcn.
  • Similarly, we can express the strain e at a point
    in a similar manner, by e BU
  • Where B is a 6 x 3N matrix, with the first row
    obtained from differentiating u with respect to x
    and so on, from the equations for e earlier.

35
Step 3 Strain and Work
  • By using these in our Strain (L) equation, we can
    get
  • And, by using the full Work (W) equation which
    includes forces over the volume, surface, and on
    concentrated places
  • The F matrices and P are 3N x 1, and were solved
    by integrating over the entire body or surface as
    needed. These integrals are computed via
    numerical integration techniques.

36
Step 3 Final Energy
  • By putting these both into our potential energy
    function, we get
  • Which is our potential energy function in terms
    of node displacements!

37
Phew! Step 4 (Easy!)
  • Step 4 Combine all of these equations into a
    single system, and solve this system for node
    displacements.
  • For each of the results from 3, we can combine
    them into a very, very large linear system
    (though it may be a little tricky)
  • We can then solve this system by any linear
    system solver, such as Gaussian Elimination, but
    a sparse matrix solver will probably be
    beneficial

38
Step 5 (Also easy!)
  • Step 5 Using the interpolating function for an
    element and these new node displacements,
    calculate displacements for points within that
    element.
  • For cases in which the node points are vertices,
    we can displace each of these vertices by that
    amount. Otherwise, well need to have move some
    points that are not on vertices.
  • These node displacements can also be used to
    compute other properties, such as internal
    stress.

39
FEM Comments
  • All of the integrations can be approximated via
    numerical integrators. However, choice of this is
    important in that bad integrators can introduce a
    lot of error into the computations.
  • It may be more intuitive to compute this FEM as
    2,1,3,4,5. This is because step 2 does not depend
    on step 1, but step 3 does depend on step 1.

40
FEM Dynamic Deformation Systems
  • These 5 steps mentioned before are to compute the
    minimal energy state through a static analysis.
    However, in many cases we wish to see the object
    actually deform to this state. In this case we
    need to take inertial body forces and
    dampening-like forces into account. We can
    generalize this into a second-order differential
    equation
  • Note that this is similar to our equation for
    spring-mass systems.

41
Dynamic Deformations
  • In,
  • M, C, and K are mass, dampening, and stiffness
    matrices for the entire object
  • F is a vector of applied forces, and U is a
    vector of node displacements.
  • We get K by taking partial derivatives of P and
    setting these to zero, which yields a linear
    system of the form KUF
  • We get M by assembling mass matrices for the
    individual elements, and C assembling dampening
    parameters

42
FEM Pros and Cons
  • Advantages
  • Much more physically realistic simulation
  • In general, requires fewer node points than
    spring-mass systems which leads to solving a
    small system
  • Disadvantages
  • Very computationally expensive
  • Mass and Stiffness matrices can be computed ahead
    of time, but due to size it may mean a large
    preprocessing step
  • Large changes require re-evaluation of various
    matrices, but large changes are less likely to
    happen

43
Movie!
  • ArtDefo movie (D. James and D. Pai, 99)
  • This is a BEM method, but it is similar to FEM
  • It requires a change in the equilibrium equation,
    but the process is similar

44
Interactive Skeleton-Driven Dynamic Deformations
  • Goal To create a framework for skeleton-driven
    animation of elastically deformation characters.
  • Uses a control lattice for which to apply FEM on
  • Embeds a bone structure for skeletal controls

45
Notation/Problem Formulation
  • The object, W
  • The skeleton defines a graph, S (Note S is a
    proper subset of W)
  • Motion as a time-dependent fcn
  • Goal To solve for the dynamic motion of the
    object given the motion of the skeleton

46
More background
  • Since an elastic model is given, p(x,t) is a
    solution of a system of partial differential
    equations, which can be solved via FEM.
  • p(x,t) is separated into a rest state r(x), and a
    displacement d(x,t)qa(t)fa(x), giving us
  • where fa(x) are elements of a finite basis B
  • So, the state at time t is a column vector q
    q(t)

47
The Hierarchical Basis
  • Want the simulation to be able to adapt to local
    conditions
  • The control lattice is then subdivided several
    times to give a hierarchical basis B
  • Note that the lattice should be unstructured, to
    fit the geometry nicely
  • Create a linearly independent set of functions as
    the basis, similarly to wavelet decomposition
    (using the lazy wavelet)

48
Control Lattice
  • The control lattice is setup as follows
  • For all i,j, with i not equal to j, the
    intersection of convex cell i and convex cell j
    is either empty or a face, edge, or vertex shared
    by both
  • The edges of the skeleton are edges of cells
  • The object domain is contained in the interior of
    the lattice
  • Each vertex has valence at least 3
  • These conditions allow for a variety of cell
    shapes while maintaining the necessary structure

49
Equations of Motion
  • With a separation of p, we can express kinetic
    energy (T) and elastic potential energy (V) as
    functions of q and its time-derivative, given
    by
  • where the d terms are gradients with respect to
    qdot and q. Qext is a generalized force, which
    includes external forces such as gravity. The
    last term is a dampening, like friction.

50
More Motion Equations
  • To save time, the derivations of some of these
    are omitted. If youd like to see them, ask me
    afterwards.
  • But, from generalizations of basic physics
    equations, they found that
  • where M is the mass matrix (each element of which
    is an integral over the object of its density at
    that point and each pair of basis functions)
  • The other gradient term in the motion equation is
    given in the paper, but is quite long so also
    omitted here. Its very similar to the stiffness
    derivations from the FEM section

51
Numerical Integration
  • Many of the terms can be pre-computed, such as
    gravity (in Qext), mass, and stiffness matrices.
  • This requires numerical integration.
  • They approximate this by subdividing the control
    lattice to a specified level, computing the
    values of the basis functions at each vertex,
    creating another, more regular tetrahedral
    subdivision, and then using these and the new
    values for integration

52
Adding a skeleton and control lattice
  • Although some automatic methods are available,
    the authors chose to have the user setup both the
    skeleton and control lattice.

53
Solving the system
  • Once the Motion Equation has been updated with
    the derived values, we can solve it
  • Nonlinear techniques exist, but are very
    computationally expensive
  • Like Baraff and Witkin 98, the authors try to
    linearize the motion equations. This gave great
    results, as long as the time step was not too
    large.

54
Linearizing Motion
  • By linearizing the equations like Baraff and
    Witkin 98, they get
  • By solving implicitly, they first get (delta)v
    from a Conjugate-Gradient solver, and then
    substitute it in the first equation to get
    (delta)q

55
Adding bone constraints
  • In their setup, the skeleton is controlled
    directly by keyframes or some other external
    source
  • So, the skeleton is just a complicated
    constraint. Since the control lattice has edges
    on the skeleton and the basis is interpolating,
    new constraints can easily be computed
    algebraically.
  • The new constraints cause some values to become
    unknown (certain cases of second formula from
    above)
  • This results in

56
Blended Local Linearization
  • A big problem for this method (and many others)
    is solving for the stiffness matrix
  • They a technique that linearizes the strain
    model, as discusses in many texts (they cite
    Shabana, 98)
  • This method makes the computation much faster
    while providing accurate results
  • The main drawback is that large deformations will
    cause massive distortions in the object
  • By noting that relative to the bones only small
    deformations will occur, they divide the object
    into regions

57
Blended Local Linearization
  • This must be done by the user, but it works by
    assigning weights to control vertices
  • This lets objects belong to more than one region,
    depending on which control points describe the
    region
  • (Refer to Kangaroo image from before)

58
Twist Constraint
  • In natural creatures, flesh cannot rotate around
    the axis of the bone without causing the flesh to
    deform with it
  • The elastic constraints make this very difficult,
    causing flesh to rotate without deforming
  • They solve this by adding a soft constraint to
    penalize all displacements with some radius of
    the bones
  • Note This includes more than just deformations!

59
Adaptation
  • For easing large deformations, they want to make
    the mesh add detail where needed
  • They apply a simple heuristic that they want more
    detail in areas of large deformation
  • By tracking the amount of deformation over a
    basis function, then all the basis in the next
    finest level that overlaps with the original
    basis are added
  • Similarly, these are also removed when there is
    little deformation
  • (This can be seen in the movie, which is next!)

60
Results! Movie!
  • Put all of this together and what do we get
  • Interactive Skeleton-Driven Dynamic Deformations!

61
Other Methods
  • Many other methods exist. Just to name a few,
  • Greens Functions
  • Hybrid systems
  • Snake method
  • Global deformation

62
Reference Papers
  • Survey of
  • Skeleton
Write a Comment
User Comments (0)
About PowerShow.com