Inverse Kinematics • What if animator knows position of “ end-effector ” ? 2 “ End-Effector ” l 2 X = (x,y) l 1 1 (0,0) 53
Inverse Kinematics • Animator specifies end-effector positions: X • Computer finds joint angles: 1 and 2 : 2 l 2 X = (x,y) l 1 1 (0,0) 54
Inverse Kinematics • End-effector postions can be specified by spline curves 2 l 2 l 1 X = (x,y) 1 (0,0) x y t 55
Inverse Kinematics • Problem for more complex structures • System of equations is usually under-constrained • Multiple solutions X = (x,y) 2 l 3 l 2 3 l 1 1 Three unknowns: 1 , 2 , 3 (0,0) Two equations: x, y 56
Inverse Kinematics • Solution for more complex structures: • Find best solution (e.g., minimize energy in motion) • Non-linear optimization X = (x,y) 2 l 3 l 2 3 l 1 1 (0,0) 57
Kinematics • Advantages • Simple to implement • Complete animator control • Disadvantages • Motions may not follow physical laws • Tedious for animator Lasseter `87 58
Kinematics • Advantages • Simple to implement • Complete animator control • Disadvantages • Motions may not follow physical laws • Tedious for animator Lasseter `87 59
Character Animation Methods • Modeling (manipulation) • Deformation • Blendshape rigging • Skeleton+Envelope rigging https://blenderartists.org/ • Interpolation • Key-framing • Kinematics • Motion Capture • Energy minimization • Physical simulation • Procedural 60 focus.gscept.com
Motion Capture • Measure motion of real characters and then simply “ play it back ” with kinematics Captured Motion 61
Motion Capture • Measure motion of real characters and then simply “ play it back ” with kinematics 62 https://www.youtube.com/watch?v=MVvDw15-3e8
Motion Capture • Could be applied on different parameters • Skeleton Transformations • Direct mesh deformation • Advantage: • Physical realism • Challenge: • Animator control 63
Character Animation Methods • Modeling (manipulation) • Deformation • Blendshape rigging • Skeleton+Envelope rigging https://blenderartists.org/ • Interpolation • Key-framing • Kinematics • Motion Capture • Energy minimization • Physical simulation 65 focus.gscept.com
Animation Techniques 66
Physically Based Simulation 67
PBS and Graphics Physically-based simulation • Computational Sciences • Reproduction of physical phenomena • Predictive capability (accuracy!) • Substitute for expensive experiments • Computer Graphics • Imitation of physical phenomena • Visually plausible behavior • Speed, stability, art-directability 68
Simulation in Graphics • Art-directability 69
Simulation in Graphics • Speed https://www.youtube.com/watch?v=-x9B_4qBAkk 70
Simulation in Graphics • Stability https://www.youtube.com/watch?v=tT81VPk_ukU 71
Applications in Graphics 72
Applications in Graphics 73
Mass – Spring Systems 74
Spatial Discretization 75
Forces 76
Forces 77
Forces 78
Example: Rope 79
Particle System Forces • Spring-mass mesh 80
Example: Cloth 81
Demo 82
Equations of Motion • Newton ’ s Law for a point mass • f = ma • Computing particle motion requires solving second-order differential equation • Add variable v to form coupled first-order differential equations: “ state-space form ” 83
Solving the Equations of Motion • Initial value problem • Know x(0), v(0) • Can compute force (and therefore acceleration) for any position / velocity / time • Compute x(t) by forward integration x(t) x(0) f 84
Solving the Equations of Motion • Forward (explicit) Euler integration 85
Solving the Equations of Motion • Forward (explicit) Euler integration • x(t+ Δ t) x(t) + Δ t v(t) • v(t+ Δ t) v(t) + Δ t f ( x(t), v(t), t ) / m 86
Solving the Equations of Motion • Forward (explicit) Euler integration • x(t+ Δ t) x(t) + Δ t v(t) • v(t+ Δ t) v(t) + Δ t f ( x(t), v(t), t ) / m • Problem: • Accuracy decreases as Δ t gets bigger 87
Single Particle Demo 88
Mass Spring Systems 89
Alternative 90
Continuum Mechanics https://www.youtube.com/watch?v=BOabEZXm9IE 91
1D Continuous Elasticity 1D elastic solid ← undeformed state t deformed state Given 𝑢 , how to determine deformed configuration? Principle of minimum potential energy A mechanical system in static equilibrium will assume a state of minimum potential energy. 92
1D Continuous Elasticity 1D elastic solid ← undeformed state t A deformed state 𝑔 𝑗𝑜𝑢 L Δ l Δ𝑚 • Strain: ( relative stretch ) 𝜁 = 𝑀 𝑔 𝑗𝑜𝑢 • Stress: ( internal force density ) 𝜏 = 𝐵 • Hooke ’ s law: ( 𝑙 material constant ) 𝜏 = 𝑙𝜁 1 𝜖Ψ • Strain energy density: Ψ = ( postulate via 𝜏 = 𝜖𝜁 ) 2 𝑙𝜁 2 93
1D Continuous Elasticity 𝑦 1 𝑦 2 𝑦 3 𝑦 𝑜 … undeformed state t … deformed state ′ ′ ′ ′ 𝑦 1 𝑦 2 𝑦 3 𝑦 𝑜 • Discretize domain into elements ′ −𝑀 𝑗 ′ 𝑦 𝑗+1 −𝑦 𝑗 • Element strain: with 𝑀 𝑗 = 𝑦 𝑗+1 − 𝑦 𝑗 𝜁 𝑗 = 𝑀 𝑗 2 ⋅ 𝑀 𝑗 1 • Element strain energy: 𝑋 𝑗 = Ψ 𝑗 ⋅ 𝑀 𝑗 = 2 𝑙𝜁 𝑗 • Total strain energy: 𝑋 = ∑𝑋 𝑗 94
1D Continuous Elasticity 𝑦 1 𝑦 2 𝑦 3 𝑦 𝑜 … undeformed state t … deformed state ′ ′ ′ ′ 𝑦 1 𝑦 2 𝑦 3 𝑦 𝑜 Minimum energy principle: at equilibrium • system assumes a state of minimum total energy • total forces vanish for all nodes ′ ′ −𝑀 𝑗 2 ⋅ 𝑀 𝑗 and 𝜁 𝑗 = 𝑦 𝑗+1 −𝑦 𝑗 1 𝜖𝑋 𝑗 𝜖𝑋 𝑗 𝜖𝜁 𝑗 • 𝑋 → 𝑗 = 2 𝑙𝜁 𝑗 ′ = ′ = −𝑙𝜁 𝑗 𝑀 𝑗 𝜖𝑦 𝑗 𝜖𝜁 𝑗 𝜖𝑦 𝑗 𝜖𝑋 𝜖𝑋 𝑗−1 𝜖𝑋 𝑗 ′ = −𝑙(𝜁 𝑗−1 − 𝜁 𝑗 ) for 𝑗 = 2 … 𝑜 − 1 • 𝑔 𝑗 = − ′ = − ′ − 𝜖𝑦 𝑗 𝜖𝑦 𝑗 𝜖𝑦 𝑗 1 = 𝑙𝜁 1 and 𝑔 • 𝑔 𝑜 = −𝑙𝜁 𝑜−1 95
1D Continuous Elasticity 𝑦 1 𝑦 2 𝑦 3 𝑦 𝑜 … undeformed state t … deformed state ′ ′ ′ ′ 𝑦 1 𝑦 2 𝑦 3 𝑦 𝑜 ∀𝑗 ∈ 2 … 𝑜 − 1 0 Equilibrium conditions 𝑔 𝑗 = 𝑢 𝑗 = 1 𝑗 = 𝑜 −𝑢 n-2 linear equations for n-2 unknowns 𝑦 𝑗 ′ → solve linear system of equations to obtain → deformed configuration. 96
Stress Strain Curve • What do these represent? A: Paper B: Fabric / unfilled plastic C: Rubber 97
Material Models – Linear 𝛀 = 𝟐 𝟑 𝝁𝐮𝐬(𝜻) 𝟑 +𝝂𝒖𝒔(𝜻 𝟑 ) 98
Material Models – Linear 99
Material Models – Linear 𝜈 = − Δ𝑧 Δ𝑦 = 0.5 100
Negative Poisson ’ s Ratio https://www.youtube.com/watch?v=5wpRszZZhYQ 101
Nonlinear Elasticity • Idea: replace Cauchy strain with Green strain → St. Venant-Kirchhoff material (StVK) 1 2 𝜇tr(𝐅) 2 +𝜈tr(𝐅 2 ) • Energy Ψ 𝑇𝑢𝑊𝐿 = 𝑓 𝜖𝑋 𝑓 𝜖𝑋 𝑓 𝜖𝐆 𝑗𝑘 𝑓 = − • Component 𝑚 of force on node 𝑙 is 𝐠 𝑙𝑚 𝜖𝐲 𝑙 = − ∑ 𝑗𝑘 𝑓 𝜖𝐆 𝑗𝑘 𝜖𝐲 𝑙𝑚 • Note: • Energy is quartic in 𝐲 , forces are cubic • Solve system of nonlinear equations 103
Nonlinear Elasticity 104
Limits • Real-world materials are not perfectly (hyper)elastic • Viscosity ( stress relaxation, creep ) • Plasticity ( irreversible deformation ) • Mullins effect ( stiffness depends on strain history ) • Fatigue, damage, … 105
Finite Elements What is a finite element? A finite element is a triplet consisting of • a closed subset Ω 𝑓 ⊂ 𝑺 𝑒 ( in 𝑒 dimensions ) 𝒚 𝑗 ∈ 𝑺 𝑒 describing the reference geometry • 𝑜 vectors of nodal variables ഥ • 𝑜 nodal basis functions, 𝑂 𝑗 : Ω 𝑓 → 𝑺 → 𝑜 vectors of degrees of freedom (e.g., deformed positions 𝒚 𝑗 ) 𝑣 𝑦−𝑦 𝑗 𝑦 𝑗+1 −𝑦 = 𝑣 𝑗+1 ⋅ 𝑦 𝑗+1 −𝑦 𝑗 + 𝑣 𝑗 ⋅ 𝑦 𝑗+1 −𝑦 𝑗 𝑦 ∈ 𝑦 𝑗 , 𝑦 𝑗+1 , 𝑗 = 0 … 𝑜 − 1 𝑣 𝑗 = 𝑣 𝑗 ⋅ 𝑂 𝑗 𝑦 106 𝑦 𝑗 𝑦 𝑗
Recommend
More recommend