You are on page 1of 59

Graphics

Computer Animation

cgvr.korea.ac.kr

Graphics Lab @ Korea

Computer Animation

CGVR

What is Animation?

Make objects change over time according to scripted actions

What is Simulation?

Predict how objects change over time according to physical laws

cgvr.korea.ac.kr

Graphics Lab @ Korea

Outline

CGVR

Principles of Animation Keyframe Animation Articulated Figures

cgvr.korea.ac.kr

Graphics Lab @ Korea

Principle of Traditional Animation Disney


CGVR

Squash and Stretch Slow In and Out Anticipation Exaggeration Follow Through and Overlapping Action Timing Staging Straight Ahead Action and Pose-to-Pose Action Arcs Secondary Action Appeal
4

cgvr.korea.ac.kr

Graphics Lab @ Korea

Squash and Stretch

CGVR

Stretch Squash

cgvr.korea.ac.kr

Graphics Lab @ Korea

Slow In and Out

CGVR

cgvr.korea.ac.kr

Graphics Lab @ Korea

Anticipation

CGVR

cgvr.korea.ac.kr

Graphics Lab @ Korea

Computer Animation

CGVR

Animation Pipeline

3D modeling Motion specification Motion simulation Shading, lighting, & rendering Postprocessing

cgvr.korea.ac.kr

Graphics Lab @ Korea

Outline

CGVR

Principles of Animation Keyframe Animation Articulated Figures

cgvr.korea.ac.kr

Graphics Lab @ Korea

Keyframe Animation

CGVR

Define Character Poses at Specific Time Steps Called Keyframes

cgvr.korea.ac.kr

10

Graphics Lab @ Korea

Keyframe Animation

CGVR

Interpolate Variables Describing Keyframes to Determine Poses for Character in between

cgvr.korea.ac.kr

11

Graphics Lab @ Korea

Inbetweening

CGVR

Linear Interpolation

Usually not enough continuity

cgvr.korea.ac.kr

12

Graphics Lab @ Korea

Inbetweening

CGVR

Spline Interpolation

Maybe good enough

cgvr.korea.ac.kr

13

Graphics Lab @ Korea

Inbetweening

CGVR

Spline Interpolation

Maybe good enough

May not follow physical laws

cgvr.korea.ac.kr

14

Graphics Lab @ Korea

Inbetweening

CGVR

Spline Interpolation

Maybe good enough

May not follow physical laws

cgvr.korea.ac.kr

15

Graphics Lab @ Korea

Inbetweening

CGVR

Inverse Kinematics or Dynamics

cgvr.korea.ac.kr

16

Graphics Lab @ Korea

Outline

CGVR

Principles of Animation Keyframe Animation Articulated Figures

cgvr.korea.ac.kr

17

Graphics Lab @ Korea

Articulated Figures

CGVR

Character Poses Described by Set of Rigid Bodies Connected by Joints


Base Arm Hand Scene Graph

cgvr.korea.ac.kr

18

Graphics Lab @ Korea

Articulated Figures

CGVR

Well-Suited for Humanoid Characters

cgvr.korea.ac.kr

19

Graphics Lab @ Korea

Articulated Figures

CGVR

Joints Provide Handles for Moving Articulated Figure

cgvr.korea.ac.kr

20

Graphics Lab @ Korea

Inbetweening

CGVR

Compute Joint Angles between Keyframes

consider the length constancy

Right
cgvr.korea.ac.kr
21

Wrong
Graphics Lab @ Korea

Example: Walk Cycle

CGVR

Articulated Figure:
Hip Upper Leg Knee Lower Leg Ankle Foot Upper Leg (Hip Rotate) Hip Rotate Lower Leg (Knee Rotate) Hip Rotate + Knee Rotate Foot (Ankle Rotate)

cgvr.korea.ac.kr

22

Graphics Lab @ Korea

Example: Walk Cycle

CGVR

Hip Joint Orientation:

cgvr.korea.ac.kr

23

Graphics Lab @ Korea

Example: Walk Cycle

CGVR

Knee Joint Orientation:

cgvr.korea.ac.kr

24

Graphics Lab @ Korea

Example: Walk Cycle

CGVR

Ankle Joint Orientation:

cgvr.korea.ac.kr

25

Graphics Lab @ Korea

Challenge of Animation

CGVR

Temporal Aliasing

Motion blur

cgvr.korea.ac.kr

26

Graphics Lab @ Korea

Temporal Ailasing

CGVR

Artifacts due to Limited Temporal Resolution


Strobing Flickering

cgvr.korea.ac.kr

27

Graphics Lab @ Korea

Temporal Ailasing

CGVR

Artifacts due to Limited Temporal Resolution


Strobing Flickering

cgvr.korea.ac.kr

28

Graphics Lab @ Korea

Temporal Ailasing

CGVR

Artifacts due to Limited Temporal Resolution


Strobing Flickering

cgvr.korea.ac.kr

29

Graphics Lab @ Korea

Temporal Ailasing

CGVR

Artifacts due to Limited Temporal Resolution


Strobing Flickering

cgvr.korea.ac.kr

30

Graphics Lab @ Korea

Motion Blur

CGVR

Composite Weighted Images of Adjacent Frames

Remove parts of signal under-sampled in time

cgvr.korea.ac.kr

31

Graphics Lab @ Korea

Summary

CGVR

Animation Requires ...


Modeling Scripting Inbetweening Lighting, shading Rendering Image processing

cgvr.korea.ac.kr

32

Graphics Lab @ Korea

Graphics

Kinematics & Dynamics


cgvr.korea.ac.kr

33

Graphics Lab @ Korea

Overview

CGVR

Kinematics

Consider only motion Determined by positions, velocities, accelerations

Dynamics

Consider underlying forces Compute motion from initial conditions and physics

cgvr.korea.ac.kr

34

Graphics Lab @ Korea

Example: 2-Link Structure

CGVR

Two Links Connected by Rotational Joints

End-Effector X=(x, y) (0, 0)

cgvr.korea.ac.kr

35

Graphics Lab @ Korea

Forward Kinematics

CGVR

Animator Specifies Joint Angles: 1 and 2 Computer Finds Positions of End-Effector: X

X=(x, y) (0, 0) X=(l1cos1+ l2cos(1+2), l1sin1+ l2sin(1+2 ))


cgvr.korea.ac.kr
36

Graphics Lab @ Korea

Forward Kinematics

CGVR

Joint Motions can be Specified by Spline Curves

X=(x, y) (0, 0)

cgvr.korea.ac.kr

37

Graphics Lab @ Korea

Forward Kinematics

CGVR

Joint Motions can be Specified by Initial Conditions and Velocities

X=(x, y) (0, 0)
1 ( 0 ) = 60 2 ( 0 ) = 250 d1 = 1.2 dt
cgvr.korea.ac.kr
38

d 2 = 0.1 dt
Graphics Lab @ Korea

Example: 2-Link Structure

CGVR

What If Animator Knows Position of EndEffector


End-Effector X=(x, y) (0, 0)

cgvr.korea.ac.kr

39

Graphics Lab @ Korea

Inverse Kinematics

CGVR

Animator Specifies End-Effector Positions: X Computer Finds Joint Angles: 1 and 2

X=(x, y) (0, 0)
2 x 2 + y 2 l12 l2 2 = cos 2l1l2 ( l2 sin 2 ) x + ( l1 + l2 cos 2 ) y 1 = ( l2 sin 2 ) y + ( l1 + l2 cos 2 ) x 1
Graphics Lab @ Korea

cgvr.korea.ac.kr

40

Inverse Kinematics

CGVR

End-Effector Postions can be Specified by Spline Curves

X=(x, y) (0, 0)

cgvr.korea.ac.kr

41

Graphics Lab @ Korea

Inverse Kinematics

CGVR

Problem for More Complex Structures


System of equations is usually under-defined Multiple solutions X=(x, y)

(0, 0)

Three unknowns: 1, 2 , 3 Two equations: x, y


42

cgvr.korea.ac.kr

Graphics Lab @ Korea

Inverse Kinematics

CGVR

Solution for More Complex Structures


Find best solution (e.g., minimize energy in motion) Non-linear optimization X=(x, y)

(0, 0)

cgvr.korea.ac.kr

43

Graphics Lab @ Korea

Summary

CGVR

Forward Kinematics

Specify conditions (joint angles) Compute positions of end-effectors

Inverse Kinematics

Goal-directed motion Specify goal positions of end effectors Compute conditions required to achieve goals Inverse kinematics provides easier Inverse kinematics provides easier specification for many animation tasks, specification for many animation tasks, but it is computationally more difficult but it is computationally more difficult

cgvr.korea.ac.kr

44

Graphics Lab @ Korea

Overview

CGVR

Kinematics

Consider only motion Determined by positions, velocities, accelerations

Dynamics

Consider underlying forces Compute motion from initial conditions and physics

cgvr.korea.ac.kr

45

Graphics Lab @ Korea

Dynamics

CGVR

Simulation of Physics Insures Realism of Motion

cgvr.korea.ac.kr

46

Graphics Lab @ Korea

Space Time Constraints

CGVR

Animator Specifies Constraints


What the characters physical structure is

e.g., articulated figure e.g., jump from here to there within time t e.g., floor to push off and land e.g., minimize energy

What the character has to do

What other physical structures are present

How the motion should be performed

cgvr.korea.ac.kr

47

Graphics Lab @ Korea

Space Time Constraints


CGVR

Computer Finds the Best Physical Motion

Satisfying constraints x(t) is position of particle at time t f(t) is force of jet propulsion at time t Particles equation of motion is:

Example: Particle with Jet Propulsion


mx f mg = 0

Suppose we want to move from a to b within t0 to t1

with minimum jet fuel:


t1 2 t0

Minimize f ( t ) dt subject to x( t0 ) = a and x( t1 ) = b


48

cgvr.korea.ac.kr

Graphics Lab @ Korea

Space Time Constraints

CGVR

Discretize Time Steps


xi xi 1 x = h x 2 xi + xi 1 = i +1 x h2 xi +1 2 xi + xi 1 m x = f i mg = 0 2 h Minimize h f i subject to x0 = a and x1 = b
2 i

cgvr.korea.ac.kr

49

Graphics Lab @ Korea

Space Time Constraints

CGVR

Solve with Iterative Optimization Methods

cgvr.korea.ac.kr

50

Graphics Lab @ Korea

Space Time Constraints

CGVR

Advantages

Free animator from having to specify details of physically realistic motion with spline curves Easy to vary motions due to new parameters and/or new constraints

Challenges

Specifying constraints and objective functions Avoiding local minima during optimization

cgvr.korea.ac.kr

51

Graphics Lab @ Korea

Space Time Constraints

CGVR

Adapting Motion

Original Jump

Heavier Base
cgvr.korea.ac.kr
52

Graphics Lab @ Korea

Space Time Constraints

CGVR

Adapting Motion

Hurdle
cgvr.korea.ac.kr
53

Graphics Lab @ Korea

Space Time Constraints

CGVR

Adapting Motion

Ski Jump
cgvr.korea.ac.kr
54

Graphics Lab @ Korea

Space Time Constraints

CGVR

Editing Motion

Original
cgvr.korea.ac.kr
55

Adapted
Graphics Lab @ Korea

Space Time Constraints

CGVR

Morphing Motion

The female character morphs into a smaller character during her spine

cgvr.korea.ac.kr

56

Graphics Lab @ Korea

Space Time Constraints

CGVR

Advantages

Free animator from having to specify details of physically realistic motion with spline curves Easy to vary motions due to new parameters and/or new constraints

Challenges

Specifying constraints and objective functions Avoiding local minima during optimization

cgvr.korea.ac.kr

57

Graphics Lab @ Korea

Dynamics

CGVR

Other Physical Simulations


Rigid bodies Soft bodies Cloth Liquids Gases etc.

Cloth

Hot Gases
cgvr.korea.ac.kr
58

Graphics Lab @ Korea

Summary

CGVR

Kinematics

Forward kinematics

Animator specifies joints (hard) Compute end-effectors (easy) Animator specifies end-effectors (easier) Solve for joints (harder)

Inverse kinematics

Dynamics

Space-time constraints

Animator specifies structures & constraints (easiest) Solve for motion (hardest)

Also other physical simulations


59

cgvr.korea.ac.kr

Graphics Lab @ Korea