19 Keyframing PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

Animation

Traditional
Traditional Animation
Animation
Keyframe
Keyframe Animation
Animation
Interpolating
Interpolating Rotation
Rotation
Forward/Inverse
Forward/Inverse Kinematics
Kinematics
Overview

• Animation techniques
–Performance-based (motion capture)
–Traditional animation (frame-by-frame)
–Keyframing
–Physically based (dynamics)

• Modeling issues
–Rotations
–Inverse kinematics
Overview

• Animation techniques
last class
–Performance-based (motion capture)
–Traditional animation (frame-by-frame)
today
–Keyframing
–Physically based (dynamics) next class

• Modeling issues
–Rotations today

–Forward / Inverse kinematics


Traditional Cel Animation
• Each frame is drawn by hand

• Film runs at 24 frames per second (fps)


– That’s 1440 pictures to draw per minute
• Artistic issues:
– Artistic vision has to be converted into a sequence of still frames
– Not enough to get the stills right--must look right at full speed
» Hard to “see” the motion given the stills
» Hard to “see” the motion at the wrong frame rate
Traditional Animation: The Process
• Story board
– Sequence of drawings with descriptions
– Story-based description

• Voice Recording
– Preliminary soundtrack or "scratch track" is recorded
– To synchronize animation later

• Animatic or Story Reel


– Pictures of the storyboard synchronized with the soundtrack
– To work out timing issues

• Design
– Design and draw characters from different angles
– Statues and maquettes can be produced

• Animation
Traditional Animation: The Process

• Turtle Hill Example


– Story board
– Animatic
– Final Animation
Traditional Animation: The Process
• Key Frames
– Draw a few important frames in pencil
» beginning of jump, end of jump and a frame in the air

• Inbetweens
– Draw the rest of the frames

• Painting
– Redraw onto clear sheet of plastic called a cel, color them in

- Use one layer for background, one for object


- Draw each separately
- Stack them together on a copy stand
- Transfer onto film by taking a photograph of the stack

- Can have multiple animators working simultaneously


on different layers, avoid re-drawing and flickering
Principles of Traditional Animation
[Lasseter, SIGGRAPH 1987]

• Stylistic conventions followed by Disney’s animators and


others

• From experience built up over many years


– Squash and stretch -- use distortions to convey flexibility
– Timing -- speed conveys mass, personality
– Anticipation -- prepare the audience for an action
– Followthrough and overlapping action -- continuity with next action
– Slow in and out -- speed of transitions conveys subtleties
– Arcs -- motion is usually curved
– Exaggeration -- emphasize emotional content
– Secondary Action -- motion occurring as a consequence
– Appeal -- audience must enjoy watching it
Principles of Traditional Animation
Squash and Stretch
Use distortions to convey flexibility

Defines the rigidity of the material

Gives the sense that the object is made out


of a soft, pliable material.

Elongating the drawings before and after


the bounce increases the sense of speed,
makes it easier to follow and gives
more snap to the action.
Squash and Stretch
Use distortions to convey flexibility
Timing & Motion
Speed conveys mass, personality
A heavier object takes a greater force and a longer time to accelerate and decelerate

A larger object moves more slowly than a smaller object and has greater inertia

Motion also can give the illusion of weight


For example, consider a ball hitting a box
http://www.siggraph.org/education/materials/HyperGraph/animation/character_animation/principles/timing.htm
Timing & Motion

Timing can also indicate an emotional state

Consider a scenario with a head looking first over the right shoulder
and then over the left shoulder

No in-betweens - the character has been hit by a strong force and its head almost snappedd off
One in-betweens - the character has been hit by something substantial, .e.g., frying pan
Two in-betweens - the character has a nervous twitch
Three in-betweens - the character is dodging a flying object
Four in-betweens - the character is giving a crisp order
Six in-betweens - the character sees something inviting
Nine in-betweens - the character is thinking about something
Ten in-betweens - the character is stretching a sore muscle
Anticipation
Prepare the audience for an action

Don’t surprise the audience


Direct their attention to what’s important
Follow Through and Overlapping Action

The termination of an action and establishing its relationship to the next action

Audience likes to see resolution of action


Discontinuities are unsettling
Slow in and out
Speed of transitions conveys subtleties

http://www.siggraph.org/education/materials/HyperGraph/animation/character_animation/principles/bouncing_ball_example_of_slow_in_out.htm

The ball on the left moves at a constant speed with no squash/stretch.


The ball in the center does slow in and out with a squash/stretch.
The ball on the right moves at a constant speed with squash/stretch.
Secondary Action
Motion occurring as a consequence
Computer Assisted Animation

• Computerized Cel painting


– Digitize the line drawing, color it using digital paint
– Widely used in production (little hand painting any more)
– e.g. Lion King

• Graphics Tablet
– For outline drawing

• Cartoon Inbetweening
– Automatically interpolate between two drawings to produce
inbetweens (a la morphing)
– Hard to get right
» inbetweens often don’t look natural
» what are the parameters to interpolate? Not clear...
» not used very often
3D Computer Animation
• Generate the images by rendering a 3-D model

• Vary the parameters to produce the animation

• Brute force
– Manually set the parameters for each and every frame
– For an n parameter model: 60 x 24 x n = 1440n values per minute

• Traditional keyframing
– Lead animators draw the important frames
– Assistant animators draw the inbetweens

• Computer keyframing
– Lead animators create the important frames with 3-D computer models
– Computers draw the inbetweens
Interpolation
• Hard to interpolate hand-drawn keyframes
– Computers don’t help much

• The situation is different in 3D computer animation:


– Each keyframe is a defined by a bunch of parameters (state)
– Sequence of keyframes = points in high-dimensional state space

• Computer inbetweening interpolates these points

• How? splines
Keyframing Basics
Keyframing Basics
Keyframing Basics
Keyframing Basics

• For each variable, specify its value at the “important”


frames. Not all variables need agree about which frames
are important.
• Hence, key values rather than key frames
• Create path for each parameter by interpolating key values

frames
params

key values interpolated values


Keyframing: Issues

• What should the key values be?


• When should the key values occur?
• How can the key values be specified?
• How are the key values interpolated?
• What kinds of BAD THINGS can occur from interpolation?
– Invalid configurations (pass through objects)
– Unnatural motions (painful twists/bends)
– Jerky motion
How Do You Interpolate Between Keys?
• What kind of spline might we want to use?

Hermite is good

• What kind of continuity do we want?


How Do You Interpolate Between Keys?
Maya Demo

Maya Demo - Ball


Problems with Interpolation

• Splines don’t always do the right thing


• Classic problems
–Important constraints may break between keyframes
» feet sink through the floor
» hands pass through walls
–3D rotations
» Euler angles don’t always interpolate in a natural way

• Classic solutions:
–More keyframes!
–Quaternions help fix rotation problems
Interpolating Rotations

Euler angles

Q: What kind of compound Euler Angles


rotation do you get by • Good for single-axis
successively turning about rotations
each of the 3 axes at a
constant rate? • Awkward for other
rotations
A: Not the one you want
Gimbal Lock

(0, 90, 0)

(+/-e, 90, 0) (0, 90, +/-e)


Gimbal Lock
Quaternion Rotation

• A quaternion is a 4-D unit vector q = [x y z w] v


• It lies on the unit hypersphere x2+y2+z2+w2=1

• For rotation about (unit) axis v by angle θ θ


– vector part (sin θ/2) v = [x y z]
– scalar part cos θ/2 =w

• The rotation matrix corresponding to a quaternion is


1-2y2-2z2 2xy+2wz 2xz-2wy
2xy-2wz 1-2x2-2z2 2yz+2wx
2xz+2wy 2yz-2wx 1-2x2-2y2
Quaternion Rotation
• We can think of rotations as lying on an n-D unit sphere

• Interpolating rotations means moving on 4-D sphere


Quaternion Interpolation
• Interpolating quaternions produces better results
than Euler angles

• Quaternion Interpolation
– represent rotation as quaternion
– SLERP: move with constant angular velocity along the
great circle between the two points
– convert to rotation matrix to apply the rotation

• Any rotation is given by 2 quaternions


– pick the shortest SLERP

• Further information: Ken Shoemake in the Siggraph '85 proceedings


(Computer Graphics, V. 19, No. 3, P.245)
Character Animation
Kinematics & Inverse Kinematics
• We need help in positioning joints

Forward: A = f (α,β) Backward: α, β = f -1(A)


Kinematics & Inverse Kinematics
• We need help in positioning joints
• Forward Kinematics
– animator controls all joint angles
Kinematics & Inverse Kinematics
• We need help in positioning joints
• Forward Kinematics
– animator controls all joint angles
Kinematics & Inverse Kinematics
• Inverse kinematics
–determine joint angles from positions
–e.g. “calculate the hip, knee and foot parameters in
order to put the foot here”
–better for interaction
–sometimes underdetermined (i.e. many combinations of
joint angles to achieve a given end result)
Kinematics & Inverse Kinematics
• Inverse kinematics
–determine joint angles from positions
–e.g. “calculate the hip, knee and foot parameters in
order to put the foot here”
–better for interaction
–sometimes underdetermined (i.e. many combinations of
joint angles to achieve a given end result)
Kinematics & Inverse Kinematics
• Inverse kinematics
–Closed form only for fairly simple mechanisms

P
β
α

α
Maya Demo

Maya Demo - Human

You might also like