interactive skeleton-driven dynamic deformation adaptive space deformations based on rigid cells...

35
Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Upload: randell-bryan

Post on 18-Dec-2015

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Interactive Skeleton-Driven Dynamic Deformation

Adaptive Space Deformations Based on Rigid Cells

Catalin Constantin

Page 2: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Interactive Skeleton-Driven Dynamic Deformation

1. Overview and Facts

2. Formulation Basics

3. Hierarchical Basis

4. Equations of Motion

5. Numerical Integration

6. Implicit Solution

7. Imposing Bone Constraints

8. Linear Subspace Constraints

9. Blended Local Linearization

10. Twist Constraints

11. Simulation Step Example

Page 3: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Overview and Facts

creating realistic character animations that support physically based secondary motions. Plain-old key framing doesn’t go too far

shape movement/deformation controlled by line segment based skeletons

supports line constraints (along with bone constraints), multiresolution, and bended local linearization for non-linear constraints

Page 4: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Formulation Basics (1)

instrument each object with a skeletal complex S (with joints and bones) interior to the object

objects represented as a domain in space

motion of the object is a time dependent mapping function p, such that:

are mappings of a generic point in the object and, respectively, of a special point of the skeletal structure.

Page 5: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

• p(x,t) results from a PDE system subject to the bone constraints• rigidity of the bones implies piecewise linear constraints• for numerical integration we apply FEM and separate the mapping

p(x,t) into a rest state r(x), and a dynamic displacement, time dependent, d(x,t).

Formulation Basics (2)given the mapping functions:

* whenever a term contains the same index as both a subscript and a superscript it is assumed to represent a finite sum of that domain.

Page 6: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Hierarchical Basis

• used to allow simulation to adapt to local conditions (increase resolution where needed)

• basis B defined in terms of repeated subdivisions of the control lattice K

• Edges of S (bones) are edges of cells of K, and their basis coefficients reduce to unity. This means that representation of transformed vertices of S are simplified as:

Page 7: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Hierarchical Basis (complex objects) Model instrumented

with a skeleton and local coordinate systems at joints

Model embedded in (half) control lattice

Skeleton coincides with lattice edges and vertices

Regions for local linearization; notice color blending where regions overlap (near joints)

Page 8: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Equations of Motion (1)• based on representation in equation (1), we can express kinetic energy

T and potential elastic energy V as functions of q and its time derivative.

gradient of T in respect to the time derivative of q

gradient of V in respect to q

generalized external force, such as gravity

generalized dissipative force to simulate friction

Next we’ll see how we can actually use each of these

• Equations of motion are the Euler-Lagrange equations:

Page 9: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Equations of Motion (2)

I. Kinetic Energy Formulation:

the Kinetic Energy of a moving body is a generalization of the very familiar scalar form:

which is the first term of the Euler-Lagrange equation of motion

after further differentiation and simplification:

Page 10: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Equations of Motion (3)

II. Potential Energy Formulation (a):

the Elastic Potential Energy captures the amount of work required to deform the body from the rest shape to its current shape, and it depends on:

where G is called shear modulus or modulus of gravity, and ʋ is called Poisson ratio (the extent to which strains in one direction are related to those perpendicular to it)

the strain tensor (degree of metric distortion, Green’s strain tensor is a standard measure of strain)

the stress tensor (defined in terms of stress)

Page 11: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Equations of Motion (4)

II. Potential Energy Formulation (b):

eluding some derivation steps which are not essential to our lecture, the final form of the Elastic Potential Energy in terms of stress and strain:

a more meaningful relation used in the integration step is the relationship between V and a matrix based on the strain and stress tensors, called stiffness matrix S:

whose representation in derivative form can be substituted in the numerical integration step

Page 12: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Equations of Motion (5)

III. External force (such as gravity)

treat gravity as a constant acceleration field and compute the potential energy it produces on the body. It will be a value in terms of g and (sometimes) q

The friction simulation effect is already a measure in terms of the time derivative of q and can be used directly in the numerical integration step

IV. Dissipative force (friction)

Page 13: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Numerical Integration

subdivide K to the desired level for numerical integration

compute the value of the basis function at each vertex

tetrahedralize the domain. After the first subdivision we have a hexahedral domain. After another subdivision we get tetrahedral cells

compute the integrals over each domain cell using piecewise approximations to the basis functions. When all four vertices of a tetrahedron fall outside, its contribution is neglected

solving the system? – linearize the equations of motion at the beginning of each timestep and apply an implicit solver to the equations of motion

Next, a quick review of the Second Order Implicit Solution

Page 14: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Implicit Solution (1) general form of second-order dynamics equation is:

introduce v and solve as a system:

based on Euler step express change as:

Page 15: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Implicit Solution (2) using Taylor expansion of a function of two variables:

substitute (f) and (d) into (e) and we get:

regrouping, we obtain the following solution (the second variant is for the case when we have dependency of f on time):

Page 16: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Implicit Solution (3)

starting from the previous solution pair:

apply the strategy to our equations of motion

Now let’s work some details that may look scary …

Page 17: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Implicit Solution (4)

… and here is the solution

all quantities are evaluated at the beginning of the timestep

the last equation is a sparse linear system that can be solved using a CG (Conjugate Gradients) solver

∆v is then substituted in the first equation to get ∆q

Page 18: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Imposing the Bone Constraints in this framework the skeleton is controlled by keyframe data,

or by some external control from simulation point of view, the skeleton is simply a

complicated constraint because bones lie along the lattice, their equations are easy to

handle algebraically. A simplified version of the last equation is: A ∆v = b, and ∆v contains both known values (from the control points) and unknown values (from all other points).

Adding skeletal constraints actually reduces the computational cost by shrinking the system

Page 19: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Linear Subspace Constraints

caused by interaction with other objects. We can impose position constraints at any point in a continuous body

the displacement at certain points conforms to a known function d. Evaluating the fist equation of the solution pair we obtain an expression which can be computed at the beginning of each timestep:

Page 20: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Blended Local Linearization

The bottleneck of this model is computation of the stiffness matrix at the beginning of each time step

solution? Linearize the strain tensor (drop last term) which yields a constant stiffness matrix and works fine for small deformations. Why is that satisfactory? What about big deformations?

to successfully apply this on articulated characters, we note that they only undergo large deformations around joints. We subdivide in regions, and assign weights to the control vertices. Each region has an associated function space whose weight coefficients produce most impact to the points in that region

Page 21: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Twisting Constraints flesh can rotate about a line constraint if no special measure is

applied yielding unnatural free movement

solution? Introduce constraint to penalize all displacement within certain fixed radius of the bones

Page 22: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

One Simulation Step1. extract regional variables

from global system2. convert q to the displacement

from the transformed rest shape (T is the transform of the bone associated to region)

3. builds the linear system4. solve the linear system5. CG solver solution merged

from each region according to weights assigned by the user/external

6. update global state 17. update global state 2

Qi is a rectangular matrix to select basis functions that have nonzero restrictions on region i

Page 23: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Adaptive Space Deformations Based on Rigid Cells

1. Overview and Facts

2. Formulation Basics

3. Nonlinear Optimization

4. Adaptive Space Discretization

5. Space Deformation

6. Results, Limitations, and To Do’s

Page 24: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Overview and facts

contrasted with surface-based deformations which, even though computationally less intensive, tend to alter certain features such as local/global volume.

physically inspired volumetric shape deformation based on simplified elastic energy formulation

works with any kind of convex cells. Fast discretization update supported by underlying data structure (octree)

support for arbitrary sample based surface representations (meshes, triangle soups, point clouds, etc.)

Page 25: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Formulation Basics (1)

elastic strain energy for deformable objects is typically defined in terms of the gradient of the displacement function

in contrast with FEM based models where individual cells are deformed, this approach wants to preserve cells rigid for the sake of numerical robustness and to model deformation energy based on an elastic glue that couples adjacent cells.

Page 26: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Formulation Basics (2)

when two adjacent cells are displaced from their initial positions by rigid motions (transforms) Ti and Tj, we can define the elastic energy in terms of square distances of a set of representative sample points between the two transforms.

which sample points are best? If possible … all! For simple shapes that are easy to integrate analytically it works quite well.

Page 27: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Formulation Basics (3) global energy for the cell complex is defined as a weighted

average of the piecewise energies (1) for all pairs of adjacent cells.

weights depend on the area of the (partially) shared face and perpendicular distanced to the face from the centers of mass.

* in case of an adaptive hexahedral face the perpendicular is half the voxel size, and face area uses the min of the two voxel sizes

Page 28: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Nonlinear Optimization (1) Interaction with the model is done by selecting

a deformable region (blue in the first image) a fixed region (gray in the first image) one or several handles (yellow in the first image)

Handles can then be transformed using any existing modeling interface.

Each cell stores a rigid motion. It can either be prescribed both rotation and translation, or be fixed at a point and allowed to rotate only.

Elastic energy minimized by finding optimal rigid motions for the remaining, unconstrained cells. Equivalent to a geometric shape matching problem – good for Newton-type solver

Page 29: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Nonlinear Optimization (2)

in each iteration of the Newton solver we linearize the rigid motions by linear and angular velocities which yield affine approximations, resulting in an energy function quadratic in the linear and angular velocities:

minimizing this energy by solving a sparse linear system yields optimal affine motions Ai corresponding to tangent vectors on the manifold of rigid motions that yield a descent direction. The resulting Ai affine motions must be projected on their closest rigid motions amounting to a local shape matching.

Page 30: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Adaptive Space Discretization

regular grids are an obvious choice, they are capable of sustaining smooth, large scale deformations, but they do not scale well

octree-like refinement based on hexahedral cells with an initial coarse, regular grid, and with the ability to subdivide in areas of high deformation were used. Adaptive threshold – dynamic refinement scheme based on geometric error

elastic energy provide strain measure and helps calculate local response based on global information of the surrounding cells (through pairwise elastic energy measure)

Page 31: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Space Deformation every cell of the space decomposition defines a local transform that

maps the cell center from its original position ci to the deformed position T(ci).

build a continuous space deformation function by interpolating the point transforms

choose an advanced interpolation scheme (i.e. triharmonic RBF), which can give fairly efficient non uniform node placement

To maintain interactive response during real time simulation (user drags the mouse to produce deformation), use a simpler blending function (i.e. averaging the transforms of the four closest cells), and then perform the in-depth corrections once the real time responsiveness is not necessary anymore (mouse release)

Page 32: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Results, Limitations, and To Do’s (1)

simplified editing model, in depth analysis once the general shape was agreed upon.

more natural deformations that FEM with explicit volume control

limitation on aliasing handle a modest number of cells at interactive rate compared to the linear approach, this one requires considerably more

resources

octree decomposition directly supports hierarchical solvers, could map well on GPUs for better performance

Page 33: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Results, Limitations, and To Do’s (2)

Page 34: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

Results, Limitations, and To Do’s (3)

Page 35: Interactive Skeleton-Driven Dynamic Deformation Adaptive Space Deformations Based on Rigid Cells Catalin Constantin

References

[1] Botsch M., Pauly M., Wicke M., Gross M.: Adaptive Space Deformations Based on Rigid Cells. Eurographics 2007.

[2] Capell S., Green S., Curless B., Duchamp T., Popovic Z.: Interactive Skeleton-Driven Dynamic Deformations. Proc. of SIGGRAPH 2002.

[3] Capell S., Green S., Curless B., Duchamp T., Popovic Z.: A Multiresolution Framework for Dynamic Deformations. University of Washington, department of computer Science and Engineering, Technical Report 02-04-02.

[4] Baraff D., and Witkin A.: Large Steps in Cloth Simulation. Computer Graphics. (Proc. SIGGRAPH), 1998

[5] Weber O., Sorkine O., Lipman Y., and Gotsman C.: Context-Aware Skeletal Shape Deformation. (Proc. EUROGRAPHICS), 2007