Computer Animation: CGVR - Korea.ac - KR

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 59

Graphics

Computer Animation

고려대학교 컴퓨터 그래픽스 연구실

cgvr.korea.ac.kr 1 Graphics Lab @ Korea University


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 2 Graphics Lab @ Korea University


Outline
CGVR

 Principles of Animation
 Keyframe Animation
 Articulated Figures

cgvr.korea.ac.kr 3 Graphics Lab @ Korea University


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

cgvr.korea.ac.kr 4 Graphics Lab @ Korea University


Squash and Stretch
CGVR

Stretch

Squash

cgvr.korea.ac.kr 5 Graphics Lab @ Korea University


Slow In and Out
CGVR

cgvr.korea.ac.kr 6 Graphics Lab @ Korea University


Anticipation
CGVR

cgvr.korea.ac.kr 7 Graphics Lab @ Korea University


Computer Animation
CGVR

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

cgvr.korea.ac.kr 8 Graphics Lab @ Korea University


Outline
CGVR

 Principles of Animation
 Keyframe Animation
 Articulated Figures

cgvr.korea.ac.kr 9 Graphics Lab @ Korea University


Keyframe Animation
CGVR

 Define Character Poses at Specific Time


Steps Called “Keyframes”

cgvr.korea.ac.kr 10 Graphics Lab @ Korea University


Keyframe Animation
CGVR

 Interpolate Variables Describing Keyframes


to Determine Poses for Character in between

cgvr.korea.ac.kr 11 Graphics Lab @ Korea University


Inbetweening
CGVR

 Linear Interpolation
 Usually not enough continuity

cgvr.korea.ac.kr 12 Graphics Lab @ Korea University


Inbetweening
CGVR

 Spline Interpolation
 Maybe good enough

cgvr.korea.ac.kr 13 Graphics Lab @ Korea University


Inbetweening
CGVR

 Spline Interpolation
 Maybe good enough
 May not follow physical laws

cgvr.korea.ac.kr 14 Graphics Lab @ Korea University


Inbetweening
CGVR

 Spline Interpolation
 Maybe good enough
 May not follow physical laws

cgvr.korea.ac.kr 15 Graphics Lab @ Korea University


Inbetweening
CGVR

 Inverse Kinematics or Dynamics

cgvr.korea.ac.kr 16 Graphics Lab @ Korea University


Outline
CGVR

 Principles of Animation
 Keyframe Animation
 Articulated Figures

cgvr.korea.ac.kr 17 Graphics Lab @ Korea University


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 University


Articulated Figures
CGVR

 Well-Suited for Humanoid Characters

cgvr.korea.ac.kr 19 Graphics Lab @ Korea University


Articulated Figures
CGVR

 Joints Provide Handles for Moving


Articulated Figure

cgvr.korea.ac.kr 20 Graphics Lab @ Korea University


Inbetweening
CGVR

 Compute Joint Angles between Keyframes


 consider the length constancy

Right Wrong

cgvr.korea.ac.kr 21 Graphics Lab @ Korea University


Example: Walk Cycle
CGVR

 Articulated Figure:

Hip Upper Leg (Hip Rotate)

Upper Leg Hip Rotate


Knee
Lower Leg (Knee Rotate)

Lower Leg Hip Rotate + Knee Rotate

Ankle Foot (Ankle Rotate)


Foot

cgvr.korea.ac.kr 22 Graphics Lab @ Korea University


Example: Walk Cycle
CGVR

 Hip Joint Orientation:

cgvr.korea.ac.kr 23 Graphics Lab @ Korea University


Example: Walk Cycle
CGVR

 Knee Joint Orientation:

cgvr.korea.ac.kr 24 Graphics Lab @ Korea University


Example: Walk Cycle
CGVR

 Ankle Joint Orientation:

cgvr.korea.ac.kr 25 Graphics Lab @ Korea University


Challenge of Animation
CGVR

 Temporal Aliasing
 Motion blur

cgvr.korea.ac.kr 26 Graphics Lab @ Korea University


Temporal Ailasing
CGVR

 Artifacts due to Limited Temporal Resolution


 Strobing
 Flickering

cgvr.korea.ac.kr 27 Graphics Lab @ Korea University


Temporal Ailasing
CGVR

 Artifacts due to Limited Temporal Resolution


 Strobing
 Flickering

cgvr.korea.ac.kr 28 Graphics Lab @ Korea University


Temporal Ailasing
CGVR

 Artifacts due to Limited Temporal Resolution


 Strobing
 Flickering

cgvr.korea.ac.kr 29 Graphics Lab @ Korea University


Temporal Ailasing
CGVR

 Artifacts due to Limited Temporal Resolution


 Strobing
 Flickering

cgvr.korea.ac.kr 30 Graphics Lab @ Korea University


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 University


Summary
CGVR

 Animation Requires ...


 Modeling
 Scripting
 Inbetweening
 Lighting, shading
 Rendering
 Image processing

cgvr.korea.ac.kr 32 Graphics Lab @ Korea University


Graphics

Kinematics &
Dynamics

고려대학교 컴퓨터 그래픽스 연구실

cgvr.korea.ac.kr 33 Graphics Lab @ Korea University


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 University


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 University


Forward Kinematics
CGVR

 Animator Specifies Joint Angles: 1 and 2


 Computer Finds Positions of End-Effector: X

X=(x, y)

(0, 0)

X=(l1cos1l2cos(1), l1sin1l2sin(1))

cgvr.korea.ac.kr 36 Graphics Lab @ Korea University


Forward Kinematics
CGVR

 Joint Motions can be Specified by Spline


Curves

X=(x, y)

(0, 0)

cgvr.korea.ac.kr 37 Graphics Lab @ Korea University


Forward Kinematics
CGVR

 Joint Motions can be Specified by Initial


Conditions and Velocities

X=(x, y)

(0, 0) 1  00 60


60 22 00 250
250
1

dd1 dd2
1  1.2 2  0.1
 1.2  0.1
dtdt dtdt

cgvr.korea.ac.kr 38 Graphics Lab @ Korea University


Example: 2-Link Structure
CGVR

 What If Animator Knows Position of “End-


Effector”

“End-Effector”

X=(x, y)

(0, 0)

cgvr.korea.ac.kr 39 Graphics Lab @ Korea University


Inverse Kinematics
CGVR

 Animator Specifies End-Effector Positions: X


 Computer Finds Joint Angles: 1 and 2

X=(x, y)

(0, 0)  x 2  y 2  l12  l22 


 2  cos  1

 2l1l2 
  l2 sin  2  x   l1  l2 cos  2  y
1 
 l2 sin  2  y   l1  l2 cos  2  x
cgvr.korea.ac.kr 40 Graphics Lab @ Korea University
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 University


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3
Two equations: x, y

cgvr.korea.ac.kr 42 Graphics Lab @ Korea University


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 University


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
Inverse kinematics
kinematics provides
provides easier
easier
specification
specification for for many
many animation
animation tasks,
tasks,
but
but itit isis computationally
computationally more
more difficult
difficult
cgvr.korea.ac.kr 44 Graphics Lab @ Korea University
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 University


Dynamics
CGVR

 Simulation of Physics Insures Realism of


Motion

cgvr.korea.ac.kr 46 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Animator Specifies Constraints


 What the character’s physical structure is
 e.g., articulated figure
 What the character has to do
 e.g., jump from here to there within time t
 What other physical structures are present
 e.g., floor to push off and land
 How the motion should be performed
 e.g., minimize energy

cgvr.korea.ac.kr 47 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Computer Finds the “Best” Physical Motion


 Satisfying constraints
 Example: Particle with Jet Propulsion
 x(t) is position of particle at time t
 f(t) is force of jet propulsion at time t
 Particle’s equation of motion is:
mx  f  mg  0
 Suppose we want to move from a to b within t0 to t1
with minimum jet fuel:
Minimize  f  t  dt subject to x t0   a and x t1   b
t1 2
t0

cgvr.korea.ac.kr 48 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Discretize Time Steps


xi  xi 1
x 
h
xi 1  2 xi  xi 1

x 
h2
 xi 1  2 xi  xi 1 
m x  2   f i  mg  0
 h 
Minimize h f i subject to x0  a and x1  b
2

cgvr.korea.ac.kr 49 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Solve with Iterative Optimization Methods

cgvr.korea.ac.kr 50 Graphics Lab @ Korea University


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 University


Space Time Constraints
CGVR

 Adapting Motion

Original Jump

Heavier Base

cgvr.korea.ac.kr 52 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Adapting Motion

Hurdle

cgvr.korea.ac.kr 53 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Adapting Motion

Ski Jump

cgvr.korea.ac.kr 54 Graphics Lab @ Korea University


Space Time Constraints
CGVR

 Editing Motion

Original Adapted
cgvr.korea.ac.kr 55 Graphics Lab @ Korea University
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 University


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 University


Dynamics
CGVR

 Other Physical Simulations


 Rigid bodies
 Soft bodies
 Cloth
 Liquids
 Gases
 etc.
Cloth

Hot Gases
cgvr.korea.ac.kr 58 Graphics Lab @ Korea University
Summary
CGVR

 Kinematics
 Forward kinematics
 Animator specifies joints (hard)
 Compute end-effectors (easy)
 Inverse kinematics
 Animator specifies end-effectors (easier)
 Solve for joints (harder)
 Dynamics
 Space-time constraints
 Animator specifies structures & constraints (easiest)
 Solve for motion (hardest)
 Also other physical simulations

cgvr.korea.ac.kr 59 Graphics Lab @ Korea University

You might also like