• Industry production process leading up to animation • What animation is • How animation works (very generally) Animation • Artistic process of animation • Further topics in how it works CS 4620 Lecture 20

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 1 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 2

What is animation? Approaches to animation

• Modeling = specifying shape • Straight ahead • Animation = specifying shape as a function of time – Draw/animate one frame at a time – Just modeling done once per frame? – Can lead to spontaneity, but is hard to get exactly what you – Need smooth, concerted movement want • Controlling shape = the technical problem • Pose-to-pose • Using shape controls = the artistic problem – Top-down process: • Plan shots using storyboards • Plan key poses first • Finally fill in the in-between frames

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 3 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 4 Pose-to-pose animation planning Keyframe animation

• Keyframing is the technique used for pose-to-pose animation – Head draws key poses—just enough to indicate what the motion is supposed to be – Assistants do “in-betweening” and draws the rest of the frames – In substitute “user” and “animation software” – Interpolation is the principal operation

– First work out poses that are key to the story – Next fill in animation in between

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 5 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 6

Keyframe animation [Christopher Lutz http://www.animationsnippets.com] [Bryce [Bryce Tutorial http://www.cadtutor.net/dd/bryce/anim/anim.html]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 7 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 8 Controlling geometry conveniently Character with DOFs

• Could animate by moving every control point at every keyframe – This would be labor intensive – It would also be hard to get smooth, consistent motion • Better way: animate using smaller set of meaningful degrees of freedom (DOFs) – Modeling DOFs are inappropriate for animation • E.g. “move one square inch of left forearm” – Animation DOFs need to be higher level • E.g. “bend the elbow” [Greenberg/Pellacini | CIS 565]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 9 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 10

Rigged character The artistic process of animation

• Surface is deformed by a set • What are trying to do? of bones – Important to understand in thinking about what tools they • Bones are in turn controlled need by a smaller set of controls • Basic principles are universal across media • The controls are useful, – 2D hand-drawn animation intuitive DOFs for an animator to use – 2D computer animation – 3D computer animation • (The following slides follow the examples from Michael Comet’s very nice discussion on the page: " http://www.comet-cartoons.com/toons/3ddocs/charanim/ ) [CIS 565 staff]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 11 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 12 Animation principles: timing Animation principles: ease in/out

• Speed of an action is crucial to the impression it makes • Real objects do not start and stop suddenly – examples with same keyframes, different times: – animation parameters shouldn’t either [Michael B. Comet] [Michael B. Comet]

60 fr: looking around 30 fr: “no” 5 fr: just been hit straight linear interp. ease in/out – a little goes a long way (just a few frames acceleration or deceleration for “snappy” motions)

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 13 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 14

Animation principles: moving in arcs Animation principles: anticipation

• Real objects also don’t move in straight lines • Most actions are preceded by some kind of “wind-up” – generally curves are more graceful and realistic [Michael B. Comet] [Michael B. Comet] [Michael B. Comet]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 15 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 16 Animation principles: exaggeration Animation principles: squash & stretch

• Animation is not about exactly modeling reality • Objects do not remain perfectly rigid as they move • Exaggeration is very often used for emphasis • Adding stretch with motion and squash with impact: – models deformation of soft objects – indicates motion by simulating exaggerated “motion blur” [Michael B. Comet] [Michael B. Comet]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 17 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 18

Animation principles: follow through Anim. principles: overlapping action

• We’ve seen that objects don’t start suddenly • Usually many actions are happening at once • They also don’t stop on a dime [Michael B. Comet] [Michael B. Comet] [Michael B. Comet]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 19 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 20 Animation principles: staging Principles at work: weight [Michael B. Comet]

• Want to produce clear, good-looking 2D images – need good camera angles, set design, and character positions [Michael B. Comet]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 21 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 22

Computer-generated Extended example: Luxo, Jr. motion • Interesting aside: many principles of follow indirectly from physics • Anticipation, follow-through, and many other effects can be produced by simply minimizing physical energy • Seminal paper: “Spacetime Constraints” by Witkin and Kass in SIGGRAPH 1988

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 23 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 24 Controlling shape for animation Rigid motion: the simplest deformation

• Start with modeling DOFs (control points) • Move a set of points by applying an affine transformation • Deformations control those DOFs at a higher level • How to animate the transformation over time? – Example: move first joint of second finger on left hand – Interpolate the matrix entries from keyframe to keyframe? • Animation controls control those DOFs at a higher level • This is fine for translations but bad for rotations – Example: open/close left hand • Both cases can be handled by the same kinds of deformers

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 25 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 26

Parameterizing rotations Hierarchies and articulated figures

• Euler angles • Robot assignment as an example – Rotate around x, then y, then z – Small number of animation controls control many – Problem: gimbal lock transformations • If two axes coincide, you – Constraint: the joints hold together lose one DOF • Robotics as source of math. Methods • Unit quaternions – Forward kinematics – A 4D representation (like 3D unit vectors for 2D sphere) – Inverse kinematics – Good choice for interpolating rotations • These are first examples of motion control – Matrix = deformation – Angles/quaternion = animation controls

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 27 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 28 Articulation in robotics

• A method for creating complex motion quickly: measure it from the real world

a. rectangular or cartesian b. cylindrical or post-type c. spherical or polar d. joint-arm or articulated e. SCARA (selective compliance assembly robot arm) [thanks to Zoran Popovi! for many visuals]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 29 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 30

Motion capture in movies Motion capture in movies | New Line Productions] The Two Towers [ [Final Fanatsy]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 31 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 32 Motion capture in games Magnetic motion capture

• Tethered • Nearby metal objects cause distortions • Low freq. (60Hz)

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 33 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 34

Mechanical motion capture Optical motion capture

• Passive markers on subject • Measures joint angles directly • Works in any environment • Restricts motion

Cameras with IR illuminators • Markers observed by cameras – Positions via triangulation Retroreflective markers Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 35 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 36 Optical motion capture From marker data to usable motion

• Motion capture system gives inconvenient raw data – Optical is “least information” case: accurate position but: • 8 or more cameras • Which marker is which? • Restricted volume • Where are the markers are relative to the skeleton? • High frequency (240Hz) • Occlusions are troublesome

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 37 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 38

Motion capture data processing Motion capture in context

• Marker identification: which marker is which • Mocap data is very realistic – Start with standard rest pose – Timing matches performance exactly – Track forward through time (but watch for markers dropping – Dimensions are exact out due to occlusion!) • But it is not enough for good character animation • Calibration: match skeleton, find offsets to markers – Too few DOFs – Use a short sequence that exercises all DOFs of the subject – Noise, errors from nonrigid marker mounting – A nonlinear minimization problem – Contains no exaggeration • Computing joint angles: explain data using skeleton DOFs – Only applies to human-shaped characters – A inverse kinematics problem per frame! • Therefore mocap data is generally a starting point for skilled animators to create the final product

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 39 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 40 Basic surface deformation methods Mesh skinning

• Mesh skinning: deform a mesh based on an underlying • A simple way to deform a surface to follow a skeleton skeleton • Blend shapes: make a mesh by combining several meshes • Both use simple linear algebra – Easy to implement—first thing to try – Fast to run—used in games • The simplest tools in the offline animation toolbox [Sébastien Dominé | NVIDIA]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 41 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 42

Mesh skinning math: setup Mesh skinning math

• Deformed position of a point is a weighted sum • Surface has control points pi – of the positions determined by each bone’s transform alone – Triangle vertices, spline control points, subdiv base vertices – weighted by that vertex’s weight for that bone • Each bone has a transformation matrix Mj – Normally a rigid motion

• Every point–bone pair has a weight wij – In practice only nonzero for small # of nearby bones – The weights are provided by the user [Lewis et al. SIGGRAPH 2000]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 43 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 44 Mesh skinning Mesh skinning: classic problems

• Simple and fast to compute • Surface collapses on the inside of bends and in the – Can even compute in the vertex stage of a graphics pipeline presence of strong twists • Used heavily in games – Average of two rotations is not a rotation! • One piece of the toolbox for offline animation – Add more bones to keep adjacent bones from being too different, or change the blending rules. – Many other deformers also available [Lewis et al. SIGGRAPH 2000]

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 45 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 46

Blend shapes Blend shapes math

• Another very simple surface control scheme • Simple setup • Based on interpolating among several key poses – User provides key shapes—that is, a position for every – Aka. blend shapes or morph targets control point in every shape: pij for point i, shape j

– Per frame: user provides a weight wj for each key shape • Must sum to 1.0 • Computation of deformed shape

• Works well for relatively small motions

[3D Studio Max example] – Often used for for facial animation – Runs in real time; popular for games

Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 47 Cornell CS4620 Fall 2008 •!Lecture 20 © 2008 Steve Marschner • 48