Graphics Computer Animation 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr Graphics Lab @ Korea University Computer Animation What is Animation? CGVR Make objects change over time according to scripted actions What.
Download
Report
Transcript Graphics Computer Animation 고려대학교 컴퓨터 그래픽스 연구실 cgvr.korea.ac.kr Graphics Lab @ Korea University Computer Animation What is Animation? CGVR Make objects change over time according to scripted actions What.
Graphics
Computer Animation
고려대학교 컴퓨터 그래픽스 연구실
cgvr.korea.ac.kr
1
Graphics Lab @ Korea University
Computer Animation
What is Animation?
CGVR
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.korea.ac.kr
6
CGVR
Graphics Lab @ Korea University
Anticipation
cgvr.korea.ac.kr
7
CGVR
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
cgvr.korea.ac.kr
21
Wrong
Graphics Lab @ Korea University
Example: Walk Cycle
CGVR
Articulated Figure:
Hip
Upper Leg (Hip Rotate)
Upper Leg
Hip Rotate
Knee
Lower Leg
Ankle
Foot
cgvr.korea.ac.kr
22
Lower Leg (Knee Rotate)
Hip Rotate + Knee Rotate
Foot (Ankle Rotate)
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
Kinematics
CGVR
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: Q1 and Q2
Computer Finds Positions of End-Effector: X
X=(x, y)
(0, 0)
X=(l1cosQ1+ l2cos(Q1+Q2), l1sinQ1+ l2sin(Q1+Q2))
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)
Q1 0 60 Q 2 0 250
dQ1
1.2
dt
cgvr.korea.ac.kr
38
dQ 2
0.1
dt
Graphics Lab @ Korea University
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 University
Inverse Kinematics
CGVR
Animator Specifies End-Effector Positions: X
Computer Finds Joint Angles: Q1 and Q2
X=(x, y)
(0, 0)
cgvr.korea.ac.kr
40
x 2 + y 2 l12 l22
Q 2 cos
2l1l2
l2 sin Q 2 x + l1 + l2 cos Q 2 y
Q1
l2 sin Q 2 y + l1 + l2 cos Q 2 x
1
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)
cgvr.korea.ac.kr
Three unknowns: Q1, Q2, Q3
Two equations: x, y
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
Forward Kinematics
CGVR
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
specification for many animation tasks,
but it is computationally more difficult
cgvr.korea.ac.kr
44
Graphics Lab @ Korea University
Overview
Kinematics
CGVR
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
What the character has to do
e.g., jump from here to there within time t
What other physical structures are present
e.g., articulated figure
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
Computer Finds the “Best” Physical Motion
CGVR
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:
f t
t1
Minimize
cgvr.korea.ac.kr
t0
48
2
dt subject to xt0 a and xt1 b
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
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 University
Space Time Constraints
CGVR
Solve with Iterative Optimization Methods
cgvr.korea.ac.kr
50
Graphics Lab @ Korea University
Space Time Constraints
Advantages
CGVR
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
cgvr.korea.ac.kr
55
Adapted
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
Advantages
CGVR
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
Kinematics
Forward kinematics
Animator specifies joints (hard)
Compute end-effectors (easy)
Inverse kinematics
CGVR
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