CS-378: Game Technology Lecture #13: Animation Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica Hodgins V
2 Announcements Homework Send me the zip file Must compile/work with Visual Studio.NET 2005 Projects Third deliverable Project web pages
3 Introduction to Animation Key-frame animation Specification by hand Motion capture Recording motion Procedural / simulation Automatically generated Combinations e.g. mocap + simulation Jeff Lew
4 Key-framing (manual) From Learning Maya 2.0 Requires a highly skilled user Poorly suited for interactive applications High quality / high expense Limited applicability
5 Motion Capture (recorded) Markers/sensors placed on subject Time-consuming clean-up Reasonable quality / reasonable price Manipulation algorithms an active research area MotionAnalysis / Performance Capture StudioOkan Arikan
6 Simulation Generate motion of objects using numerical simulation methods
7 Simulation Perceptual accuracy required Stability, easy of use, speed, robustness all important Predictive accuracy less so Control desirable IGG
8 Simulation Feldman, Arikan, O’Brien, Siggraph 2003
Animation Active CharactersPassive Objects SimulationKeyframingMotion Capture
Character Animation Key Frame or Motion Capture Usually skeletal animation based Two Components: Skeleton motion Skin move Jeff Lew
Character Animation Upper Arm Lower Arm
Character Animation x y y x x y Global Bone 2
Character Animation x y x y Global Bone 2 y x Bone 1 Coordinate system transformations
Character Animation Skin motion Represent vertices in bone coordinate systems Move bone coordinate systems Skeleton motion Parameterized by the joint angles Jeff Lew
Character Animation Skeletal motion is a function of time Representing this function t
Character Animation Moving the character: Always maintain position/orientation of the root Global character Local character
Character Animation Moving the character: Always maintain position/orientation of the root To Rotate: Rotation around vertical axis
Character Animation Moving the character: Always maintain position/orientation of the root To Rotate: To Advance frame Local to global transformation for frame f+1
19 Forward Kinematics Articulated skeleton Topology (what’s connected to what) Geometric relations from joints Independent of display geometry Tree structure Loop joints break “tree-ness”
20 Forward Kinematics Root body Position set by “global” transformation Root joint Position Rotation Other bodies relative to root Inboard toward the root Outboard away from root
21 Forward Kinematics A joint Joint’s inboard body Joint’s outboard body
22 Forward Kinematics A body Body’s inboard joint Body’s outboard joint May have several outboard joints
23 Forward Kinematics A body Body’s inboard joint Body’s outboard joint May have several outboard joints Body’s parent Body’s child May have several children
24 Forward Kinematics Interior joints Typically not 6 DOF joints Pin - rotate about one axis Ball - arbitrary rotation Prism - translation along one axis
25 Forward Kinematics Composite transformations up the hierarchy
26 Forward Kinematics Composite transformations up the hierarchy
27 Forward Kinematics Composite transformations up the hierarchy
28 Forward Kinematics Composite transformations up the hierarchy
29 Forward Kinematics Composite transformations up the hierarchy
30 Inverse Kinematics Given Root transformation Initial configuration Desired end point location Find Interior parameter settings
31 Inverse Kinematics A simple two segment arm in 2D
32 Inverse Kinematics Direct IK: solve for the parameters
33 Inverse Kinematics Why is the problem hard? Multiple solutions separated in configuration space
34 Inverse Kinematics Why is the problem hard? Multiple solutions connected in configuration space
35 Inverse Kinematics Why is the problem hard? Solutions may not always exist
36 Inverse Kinematics Numerical Solution Start in some initial configuration Define an error metric (e.g. goal pos - current pos) Compute Jacobian of error w.r.t. inputs Apply Newton’s method (or other procedure) Iterate...
37 Inverse Kinematics Recall simple two segment arm:
38 Inverse Kinematics We can write of the derivatives
39 Inverse Kinematics
40 Inverse Kinematics
41 Inverse Kinematics
42 Inverse Kinematics
43 Inverse Kinematics
44 Inverse Kinematics Problems Jacobian may (will!) not always be invertible Use pseudo inverse (SVD) Robust iterative method Jacobian is not constant Nonlinear optimization, but problem is (mostly) well behaved
45 Inverse Kinematics More complex systems More complex joints (prism and ball) More links Other criteria (COM or height) Hard constraints (joint limits) Multiple criteria and multiple chains Doom 3