animation - cornell university · the artistic process of animation ¥what are animators trying to...

12
© 2006 Steve Marschner • 1 Cornell CS465 Fall 2006 • Lecture 22 Animation CS 465 Lecture 22 © 2006 Steve Marschner • 2 Cornell CS465 Fall 2006 • Lecture 22 Animation Industry production process leading up to animation What animation is How animation works (very generally) Artistic process of animation Further topics in how it works © 2006 Steve Marschner • 3 Cornell CS465 Fall 2006 • Lecture 22 What is animation? Modeling = specifying shape Animation = specifying shape as a function of time Just modeling done once per frame? Need smooth, concerted movement Controlling shape = the technical problem Using shape controls = the artistic problem © 2006 Steve Marschner • 4 Cornell CS465 Fall 2006 • Lecture 22 Approaches to animation Straight ahead Draw/animate one frame at a time Can lead to spontaneity, but is hard to get exactly what you want • Pose-to-pose Top-down process: Plan shots using storyboards Plan key poses first Finally fill in the in-between frames

Upload: others

Post on 19-Apr-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 1Cornell CS465 Fall 2006 •!Lecture 22

Animation

CS 465 Lecture 22

© 2006 Steve Marschner • 2Cornell CS465 Fall 2006 •!Lecture 22

Animation

• Industry production process leading up to animation

• What animation is

• How animation works (very generally)

• Artistic process of animation

• Further topics in how it works

© 2006 Steve Marschner • 3Cornell CS465 Fall 2006 •!Lecture 22

What is animation?

• Modeling = specifying shape

• Animation = specifying shape as a function of time

– Just modeling done once per frame?

– Need smooth, concerted movement

• Controlling shape = the technical problem

• Using shape controls = the artistic problem

© 2006 Steve Marschner • 4Cornell CS465 Fall 2006 •!Lecture 22

Approaches to animation

• Straight ahead

– Draw/animate one frame at a time

– Can lead to spontaneity, but is hard to get exactly what youwant

• Pose-to-pose

– Top-down process:

• Plan shots using storyboards

• Plan key poses first

• Finally fill in the in-between frames

Page 2: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 5Cornell CS465 Fall 2006 •!Lecture 22

Pose-to-pose animation planning

– First work out poses that are key to the story

– Next fill in animation in between

© 2006 Steve Marschner • 6Cornell CS465 Fall 2006 •!Lecture 22

Keyframe animation

• Keyframing is the technique used for pose-to-poseanimation

– Head animator draws key poses—just enough to indicatewhat the motion is supposed to be

– Assistants do “in-betweening” and draws the rest of theframes

– In computer animation substitute “user” and “animationsoftware”

– Interpolation is the principal operation

© 2006 Steve Marschner • 7Cornell CS465 Fall 2006 •!Lecture 22

Keyframe animation

[Bry

ce T

uto

rial

htt

p://w

ww

.cad

tuto

r.net

/dd/b

ryce

/anim

/anim

.htm

l]

© 2006 Steve Marschner • 8Cornell CS465 Fall 2006 •!Lecture 22

Walk cycle

[Chri

stopher

Lutz

htt

p://w

ww

.anim

atio

nsn

ippet

s.co

m]

Page 3: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 9Cornell CS465 Fall 2006 •!Lecture 22

Controlling geometry conveniently

• Could animate by moving every control point at everykeyframe

– This would be labor intensive

– It would also be hard to get smooth, consistent motion

• Better way: animate using smaller set of meaningfuldegrees 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”

© 2006 Steve Marschner • 10Cornell CS465 Fall 2006 •!Lecture 22

Character with DOFs

[Gre

enber

g/Pel

laci

ni | C

IS 5

65]

© 2006 Steve Marschner • 11Cornell CS465 Fall 2006 •!Lecture 22

Rigged character

[CIS

565 s

taff]

• Surface is deformed by a setof bones

• Bones are in turn controlledby a smaller set of controls

• The controls are useful,intuitive DOFs for ananimator to use

© 2006 Steve Marschner • 12Cornell CS465 Fall 2006 •!Lecture 22

The artistic process of animation

• What are animators trying to do?

– Important to understand in thinking about what tools theyneed

• Basic principles are universal across media

– 2D hand-drawn animation

– 2D computer animation

– 3D computer animation

• (The following slides follow the examples fromMichael Comet’s very nice discussion on the page:

http://www.comet-cartoons.com/toons/3ddocs/charanim/

)

Page 4: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 13Cornell CS465 Fall 2006 •!Lecture 22

60 fr: looking around 30 fr: “no” 5 fr: just been hit

[Mic

hae

l B

. C

om

et]

Animation principles: timing

• Speed of an action is crucial to the impression it makes

– examples with same keyframes, different times:

© 2006 Steve Marschner • 14Cornell CS465 Fall 2006 •!Lecture 22

• Real objects do not start and stop suddenly

– animation parameters shouldn’t either

– a little goes a long way (just a few frames acceleration ordeceleration for “snappy” motions)

Animation principles: ease in/out

[Mic

hae

l B

. C

om

et]

straight linear interp. ease in/out

© 2006 Steve Marschner • 15Cornell CS465 Fall 2006 •!Lecture 22

• Real objects also don’t move in straight lines

– generally curves are more graceful and realistic

Animation principles: moving in arcs

[Mic

hae

l B

. C

om

et]

© 2006 Steve Marschner • 16Cornell CS465 Fall 2006 •!Lecture 22

Animation principles: anticipation

[Mic

hae

l B

. C

om

et]

[Mic

hae

l B

. C

om

et]

• Most actions are preceded by some kind of “wind-up”

Page 5: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 17Cornell CS465 Fall 2006 •!Lecture 22

Animation principles: exaggeration

[Mic

hae

l B

. C

om

et]

• Animation is not about exactly modeling reality

• Exaggeration is very often used for emphasis

© 2006 Steve Marschner • 18Cornell CS465 Fall 2006 •!Lecture 22

Animation principles: squash & stretch

[Mic

hae

l B

. C

om

et]

• Objects do not remain perfectly rigid as they move

• Adding stretch with motion and squash with impact:

– models deformation of soft objects

– indicates motion by simulating exaggerated “motion blur”

© 2006 Steve Marschner • 19Cornell CS465 Fall 2006 •!Lecture 22

Animation principles: follow through

[Mic

hae

l B

. C

om

et]

[Mic

hae

l B

. C

om

et]

• We’ve seen that objects don’t start suddenly

• They also don’t stop on a dime

© 2006 Steve Marschner • 20Cornell CS465 Fall 2006 •!Lecture 22

Anim. principles: overlapping action

[Mic

hae

l B

. C

om

et]

• Usually many actions are happening at once

Page 6: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 21Cornell CS465 Fall 2006 •!Lecture 22

Animation principles: staging

[Mic

hae

l B

. C

om

et]

• Want to produce clear, good-looking 2D images

– need good camera angles, set design, and character positions

© 2006 Steve Marschner • 22Cornell CS465 Fall 2006 •!Lecture 22

Principles at work: weight

[Mic

hae

l B

. C

om

et]

© 2006 Steve Marschner • 23Cornell CS465 Fall 2006 •!Lecture 22

Extended example: Luxo, Jr.

© 2006 Steve Marschner • 24Cornell CS465 Fall 2006 •!Lecture 22

Computer-generatedmotion

• Interesting aside: manyprinciples of characteranimation follow indirectlyfrom physics

• Anticipation, follow-through,and many other effectscan be produced by simplyminimizing physical energy

• Seminal paper: “SpacetimeConstraints” by Witkin andKass in SIGGRAPH 1988

Page 7: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 25Cornell CS465 Fall 2006 •!Lecture 22

Controlling shape for animation

• Start with modeling DOFs (control points)

• Deformations control those DOFs at a higher level

– Example: move first joint of second finger on left hand

• Animation controls control those DOFs at a higher level

– Example: open/close left hand

• Both cases can be handled by the same kinds ofdeformers

© 2006 Steve Marschner • 26Cornell CS465 Fall 2006 •!Lecture 22

Rigid motion: the simplest deformation

• Move a set of points by applying an affinetransformation

• How to animate the transformation over time?

– Interpolate the matrix entries from keyframe to keyframe?

• This is fine for translations but bad for rotations

© 2006 Steve Marschner • 27Cornell CS465 Fall 2006 •!Lecture 22

Parameterizing rotations

• Euler angles

– Rotate around x, then y, then z

– Problem: gimbal lock

• If two axes coincide, youlose one DOF

• Unit quaternions

– A 4D representation (like 3D unit vectors for 2D sphere)

– Good choice for interpolating rotations

• These are first examples of motion control

– Matrix = deformation

– Angles/quaternion = animation controls

© 2006 Steve Marschner • 28Cornell CS465 Fall 2006 •!Lecture 22

Hierarchies and articulated figures

• Robot assignment as an example

– Small number of animation controls control manytransformations

– Constraint: the joints hold together

• Robotics as source of math. Methods

– Forward kinematics

– Inverse kinematics

Page 8: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 29Cornell CS465 Fall 2006 •!Lecture 22

Articulation in robotics

a. rectangular or cartesianb. cylindrical or post-typec. spherical or polard. joint-arm or articulatede. SCARA (selective compliance assembly robot arm)

© 2006 Steve Marschner • 30Cornell CS465 Fall 2006 •!Lecture 22

Motion capture

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

[thanks to Zoran Popovi! for many visuals]

© 2006 Steve Marschner • 31Cornell CS465 Fall 2006 •!Lecture 22

Motion capture in movies

[Fin

al Fanats

y]

© 2006 Steve Marschner • 32Cornell CS465 Fall 2006 •!Lecture 22

Motion capture in movies

[The T

wo T

ow

ers |

New

Lin

e P

roductions]

Page 9: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 33Cornell CS465 Fall 2006 •!Lecture 22

Motion capture in games

© 2006 Steve Marschner • 34Cornell CS465 Fall 2006 •!Lecture 22

Magnetic motion capture

• Tethered

• Nearby metal objectscause distortions

• Low freq. (60Hz)

© 2006 Steve Marschner • 35Cornell CS465 Fall 2006 •!Lecture 22

Mechanical motion capture

• Measures joint anglesdirectly

• Works in any environment

• Restricts motion

© 2006 Steve Marschner • 36Cornell CS465 Fall 2006 •!Lecture 22

Optical motion capture

• Passive markers onsubject

Retroreflective markers

Cameras with IR illuminators

• Markers observed bycameras

– Positions via triangulation

Page 10: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 37Cornell CS465 Fall 2006 •!Lecture 22

Optical motion capture

• 8 or more cameras

• Restricted volume

• High frequency (240Hz)

• Occlusions aretroublesome

© 2006 Steve Marschner • 38Cornell CS465 Fall 2006 •!Lecture 22

From marker data to usable motion

• Motion capture system gives inconvenient raw data

– Optical is “least information” case: accurate position but:

• Which marker is which?

• Where are the markers are relative to the skeleton?

© 2006 Steve Marschner • 39Cornell CS465 Fall 2006 •!Lecture 22

Motion capture data processing

• Marker identification: which marker is which

– Start with standard rest pose

– Track forward through time (but watch for markersdropping out due to occlusion!)

• Calibration: match skeleton, find offsets to markers

– Use a short sequence that exercises all DOFs of the subject

– A nonlinear minimization problem

• Computing joint angles: explain data using skeletonDOFs

– A inverse kinematics problem per frame!

© 2006 Steve Marschner • 40Cornell CS465 Fall 2006 •!Lecture 22

Motion capture in context

• Mocap data is very realistic

– Timing matches performance exactly

– Dimensions are exact

• But it is not enough for good character animation

– Too few DOFs

– Noise, errors from nonrigid marker mounting

– Contains no exaggeration

– Only applies to human-shaped characters

• Therefore mocap data is generally a starting point forskilled animators to create the final product

Page 11: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 41Cornell CS465 Fall 2006 •!Lecture 22

Basic surface deformation methods

• Mesh skinning: deform a mesh based on an underlyingskeleton

• Blend shapes: make a mesh by combining severalmeshes

• 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

© 2006 Steve Marschner • 42Cornell CS465 Fall 2006 •!Lecture 22

Mesh skinning

• A simple way to deform a surface to follow a skeleton

[Sébastien D

om

iné |

NVID

IA]

© 2006 Steve Marschner • 43Cornell CS465 Fall 2006 •!Lecture 22

Mesh skinning math: setup

• Surface has control points pi– Triangle vertices, spline control points, subdiv base vertices

• 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

© 2006 Steve Marschner • 44Cornell CS465 Fall 2006 •!Lecture 22

Mesh skinning math

• Deformed position of a point is a weighted sum

– of the positions determined by each bone’s transform alone

– weighted by that vertex’s weight for that bone

[Lew

is e

t al. S

IGG

RAPH

2000]

Page 12: Animation - Cornell University · The artistic process of animation ¥What are animators trying to do? ÐImportant to understand in thinking about what tools they need ¥Basic principles

© 2006 Steve Marschner • 45Cornell CS465 Fall 2006 •!Lecture 22

Mesh skinning

• Simple and fast to compute

– Can even compute in the vertex stage of a graphics pipeline

• Used heavily in games

• One piece of the toolbox for offline animation

– Many other deformers also available

© 2006 Steve Marschner • 46Cornell CS465 Fall 2006 •!Lecture 22

Mesh skinning: classic problems

• Surface collapses on the inside of bends and in thepresence of strong twists

– Average of two rotations is not a rotation!

– Add more bones to keep adjacent bones from being toodifferent, or change the blending rules.

[Lew

is e

t al. S

IGG

RAPH

2000]

© 2006 Steve Marschner • 47Cornell CS465 Fall 2006 •!Lecture 22

Blend shapes

• Another very simple surface control scheme

• Based on interpolating among several key poses

– Aka. blend shapes or morph targets

[3D

Stu

dio

Max e

xam

ple

]

© 2006 Steve Marschner • 48Cornell CS465 Fall 2006 •!Lecture 22

Blend shapes math

• Simple setup

– User provides key shapes—that is, a position for everycontrol 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

– Often used for for facial animation

– Runs in real time; popular for games