Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character...

33
Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman Patrick Coleman CSC 2529 Character Animation CSC 2529 Character Animation February 12, 2003 February 12, 2003

Transcript of Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character...

Page 1: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Sculpted Data Driven and Physically Based Character Deformation

Patrick ColemanPatrick Coleman

CSC 2529 Character AnimationCSC 2529 Character Animation

February 12, 2003February 12, 2003

Page 2: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Papers

““Pose Space Deformation: A Unified Approach to Pose Space Deformation: A Unified Approach to Shape and Interpolation and Skeleton-Driven Shape and Interpolation and Skeleton-Driven Deformation”Deformation”

J.P. Lewis, Matt Cordner, Nickson FongJ.P. Lewis, Matt Cordner, Nickson Fong

““DyRT: Dynamic Response Textures for Real Time DyRT: Dynamic Response Textures for Real Time Deformation Simulation with Graphics Hardware”Deformation Simulation with Graphics Hardware”

Doug L. James and Dinesh K. PaiDoug L. James and Dinesh K. Pai

““Interactive Skeleton-Driven Dynamic Deformations”Interactive Skeleton-Driven Dynamic Deformations”Capell, Green, Curless, Duchamp, PopovicCapell, Green, Curless, Duchamp, Popovic

Page 3: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Pose Space Deformation

Common Approaches to Character DeformationCommon Approaches to Character Deformation

•Skeletal driven deformation for articulated body Skeletal driven deformation for articulated body motionmotion

•Shape interpolation among a set of poses for facial Shape interpolation among a set of poses for facial animationanimation

Pose Space DeformationPose Space Deformation

•Combine these approaches and address their Combine these approaches and address their shortcomingsshortcomings

Page 4: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Skeletal Subspace Deformation

•Surface Points are tied to joints, linearly weightedSurface Points are tied to joints, linearly weighted

• User often tweaks weights to achieve desired responseUser often tweaks weights to achieve desired response

• Restrictive subspace not capable of achieving all desired Restrictive subspace not capable of achieving all desired posesposes

• Leads to unnatural deformations to certain posesLeads to unnatural deformations to certain poses

• Maya smooth skinningMaya smooth skinning

10 0k k kw L L L

Pp p

Page 5: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

SSD Problems

Elbow twistElbow twist

Collapsing ElbowCollapsing Elbow

……Maya Example…Maya Example…

Page 6: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Shape Interpolation

Linearly combine a number of key poses using slider Linearly combine a number of key poses using slider valuesvalues

Page 7: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Shape Interpolation

Linearly combine a number of key poses using slider Linearly combine a number of key poses using slider valuesvalues

• Allows user to explicitly sculpt posesAllows user to explicitly sculpt poses

• Positional interpolation is only CPositional interpolation is only C00 continuous continuous

• Poses can add up or cancel out unexpectedlyPoses can add up or cancel out unexpectedly

• Maya Blend ShapeMaya Blend Shape

kk

w k 0S S S

……Maya Example…Maya Example…

Page 8: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

PSD

Skeletal-driven deformation among a set of key posesSkeletal-driven deformation among a set of key poses

•User sculpts set of posesUser sculpts set of poses

•Scattered data interpolation to determine Scattered data interpolation to determine configuration driven deformationconfiguration driven deformation

Facial animation among a set of key posesFacial animation among a set of key poses

•Scattered data interpolation driven by relative key Scattered data interpolation driven by relative key pose weightspose weights

Page 9: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Scattered Data Interpolation

Locally weight nearby configurations using Locally weight nearby configurations using precomputed radial basis functions:precomputed radial basis functions:

•Allows smooth interpolation among configurations if Allows smooth interpolation among configurations if desireddesired

•Precomputation to achieve real-time deformationPrecomputation to achieve real-time deformation

•User must avoid very similar posesUser must avoid very similar poses

|| ||kk

w kx' x x

Page 10: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Suggested Facial Space

Adapted from psychological researchAdapted from psychological research

Sleepy

Aroused

PleasureDispleasure

delighted

serene

tired

frustrated

alarmed

Page 11: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

PSD Summary

•Data driven approach to dynamic deformationData driven approach to dynamic deformation

•Data supplied by user sculpting “important” posesData supplied by user sculpting “important” poses

•Scattered data interpolation among key poses to Scattered data interpolation among key poses to determine intermediate poses using radial basis determine intermediate poses using radial basis functionsfunctions

•Can be skeleton drivenCan be skeleton driven

•Can be blendShape’d* (sliders to distribute weight Can be blendShape’d* (sliders to distribute weight among poses)among poses)

*no, “blendShape’d” is not a real word.

Page 12: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Dynamic Response Textures

““Geometrically complex, interactive, physically-based, Geometrically complex, interactive, physically-based, volumetric, deformation models, with negligible main volumetric, deformation models, with negligible main CPU costs.”CPU costs.”

Modal Analysis to determine how modal deformation Modal Analysis to determine how modal deformation of surface pointsof surface points

Hardware vertex program to drive deformations based Hardware vertex program to drive deformations based on rigid body motionon rigid body motion

Page 13: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Modal Analysis

Reduce vibration to a set of frequency modesReduce vibration to a set of frequency modes

Overall Deformation is a superposition of deformation Overall Deformation is a superposition of deformation due to each modedue to each mode

u:u: displacementdisplacementM:M: mass matrixmass matrixD:D: dampening coefficient matrix (=sM)dampening coefficient matrix (=sM)K:K: stiffness coefficient matrixstiffness coefficient matrix

Mu Cu Ku F

Page 14: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Modal Analysis

Determine a set of vibration modes:Determine a set of vibration modes:

Natural frequency of vibration:Natural frequency of vibration:

Modal dampening:Modal dampening:

22 i i ii

wm

ii i i

Qq q q

ii

i

k

m

1

2 2i ii i i

c

m

Page 15: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Low Frequency Modes for Torso

Page 16: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Applying Modal Vibration

Assume system is a rest at time tAssume system is a rest at time t00

Integrate solution to modal ODE to time tIntegrate solution to modal ODE to time tSolution is dependent on force matrix, Solution is dependent on force matrix, modal vibration frequency, and modal dampeningmodal vibration frequency, and modal dampeningfactorfactor

Throw away high frequency modesThrow away high frequency modesNot very noticeableNot very noticeableCan cause temporal aliasingCan cause temporal aliasing

Page 17: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Rigid Motion Excitement

Allows use of skeletal motion to drive local modal deformationAllows use of skeletal motion to drive local modal deformation

Consider both linear and angular velocityConsider both linear and angular velocity

Euler discretization of accelerationEuler discretization of acceleration

Digital filter for efficient integrationDigital filter for efficient integration

Assumes modal vibration is not dependent on skeletal deformationAssumes modal vibration is not dependent on skeletal deformation

• This allows pre-computation of all deformation parameters This allows pre-computation of all deformation parameters

Interpolate deformation with base pose across affected regionInterpolate deformation with base pose across affected region

Page 18: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Hardware Acceleration

NVIDIA GeForce3 vertex programNVIDIA GeForce3 vertex program

Page 19: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

DyRT Video

Page 20: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

DyRT Summary

•Fast application of tissue response to dynamic Fast application of tissue response to dynamic movementmovement

•Modal analysis to reduce deformation to discrete Modal analysis to reduce deformation to discrete modesmodes

•Precomputation of response functionsPrecomputation of response functions

•Part of the rendering pipeline (hardware program)Part of the rendering pipeline (hardware program)

•Models wearing tight red shorts with SIGGRAPH logos Models wearing tight red shorts with SIGGRAPH logos embedded in a Texan theme are kind of scary…embedded in a Texan theme are kind of scary…

Page 21: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Interactive Skeleton Driven Dynamic Deformations

Simulation of secondary motion of deformable objects Simulation of secondary motion of deformable objects in real timein real time

Framework:Framework:

• Embed object in volumetric grid with bone constraintsEmbed object in volumetric grid with bone constraints

• Constrain grid to lie along bones for efficient computationConstrain grid to lie along bones for efficient computation

• Superpose locally linear simulations driven by single boneSuperpose locally linear simulations driven by single bone

• Hierarchical basis on grid to adapt to level of detailHierarchical basis on grid to adapt to level of detail

Page 22: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Problem Formulation

Rest state of object:Rest state of object:

Deformation:Deformation:

Overall system state:Overall system state:

( ) ( ) ( )a a

a

a ar x r x r x x

( , ) ( ) ( )at t ad x q x

( , ) ( ( )) ( )at t aap x r q x

Page 23: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Hierarchical grid basis

Subdivide grid over detail of objectSubdivide grid over detail of object

Trilinear basis functions:Trilinear basis functions:

falls off from one to zero along lines of control falls off from one to zero along lines of control meshmesh

a

( , ) ( ( )) ( )a

a S

t t

s a ap x r q x

Page 24: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Equations of Motion

Euler-Lagrange equations:Euler-Lagrange equations:

First three terms reduce to numerical integrationFirst three terms reduce to numerical integration

Integration:Integration:Subdivide control mesh to desired levelSubdivide control mesh to desired levelCompute basis function values at each vertexCompute basis function values at each vertexTetrahedralize domain (allows piecewise linear Tetrahedralize domain (allows piecewise linear approximation of functions)approximation of functions)Integrate over each tetrahedron using linear approximationsIntegrate over each tetrahedron using linear approximations

of basis functionsof basis functions

( ) ( )0

d T V

dt

q qQ q

q q

Page 25: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

System setup

Manual definition of Manual definition of skeleton, control mesh, skeleton, control mesh, regions of local regions of local linearizationlinearization

Page 26: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Solving the System

Linearize equations at each time step (Baraff/Witkin Linearize equations at each time step (Baraff/Witkin 98)98)

Conjugate Gradient solver applied to sparse linear Conjugate Gradient solver applied to sparse linear system of second equation, direct solution of first system of second equation, direct solution of first equation followsequation follows

2

( )

( ) ( )

h

Vh h h h

Δq q Δv

M I S Δv q Q Sqq

Page 27: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Bone Constraints

Some velocities are knownSome velocities are known

Second equation reduces to:Second equation reduces to:

Same form, lower complexitySame form, lower complexity

22 u k 21 kA Δv b A Δv

Page 28: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Position Constraints

Allow for interaction with other objects, userAllow for interaction with other objects, user

Velocity enforced in CG solver by projecting constraint onto Velocity enforced in CG solver by projecting constraint onto simulation space velocity components (Barraff/Witkin 98)simulation space velocity components (Barraff/Witkin 98)

Introduction of Introduction of new detail new detail coefficients in coefficients in basisbasis

Page 29: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Local Linearization

Locally linearize influence of nearby bonesLocally linearize influence of nearby bones

Use manually assigned vertex weights to blend among Use manually assigned vertex weights to blend among regionsregions

Independently solve each regionIndependently solve each region

Composite regional solutions:Composite regional solutions:

i

i

i iTΔv W Q Δv

Page 30: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Other details

•Twisting motion is penalized with stiffness dependent Twisting motion is penalized with stiffness dependent on potential gradient along deformationon potential gradient along deformation

•Adaptive addition and removal of basis functions in Adaptive addition and removal of basis functions in hierarchyhierarchy

Page 31: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

ISDDD Video

Page 32: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

ISDDD Summary

•Real-time dynamic response for elastically deformable Real-time dynamic response for elastically deformable modelsmodels

•Objects are embedded in a hierarchical control mesh to Objects are embedded in a hierarchical control mesh to which the finite element method is appliedwhich the finite element method is applied

•Alignment of control grid to skeleton simplifies solutionAlignment of control grid to skeleton simplifies solution

•Locally linearized regions of influence to reduce Locally linearized regions of influence to reduce complexitycomplexity

•Point constraints allow interactionPoint constraints allow interaction

Page 33: Sculpted Data Driven and Physically Based Character Deformation Patrick Coleman CSC 2529 Character Animation February 12, 2003.

Useful References(if you really want to understand what’s going on)

Dynamic Response TexturesDynamic Response Textures

• ““Good Vibrations: Modal Dynamics for Graphics and Animation” Pentland and Good Vibrations: Modal Dynamics for Graphics and Animation” Pentland and Williams, SIGGRAPH 1989Williams, SIGGRAPH 1989

• ““A User-Programmable Vertex Engine” Lindholm, Kilgard, Moreton, SIGGRAPH 2001A User-Programmable Vertex Engine” Lindholm, Kilgard, Moreton, SIGGRAPH 2001

Interactive Skeleton Driven Dynamic DeformationsInteractive Skeleton Driven Dynamic Deformations

• ““Large Steps in Cloth Simulation” Baraff & Witkin, SIGGRAPH 1998Large Steps in Cloth Simulation” Baraff & Witkin, SIGGRAPH 1998

• ““Physically Based Modeling” Baraff & Witkin, SIGGRAPH 2001 Course notes, Physically Based Modeling” Baraff & Witkin, SIGGRAPH 2001 Course notes, available from Pixar’s web siteavailable from Pixar’s web site

• ““An Introduction to the Conjugate Gradient Method Without the Agonizing Pain” An Introduction to the Conjugate Gradient Method Without the Agonizing Pain” Shewchuk, 1994. See citation in Baraff/Witkin 1998Shewchuk, 1994. See citation in Baraff/Witkin 1998