computer animation - korea universitykucg.korea.ac.kr/.../cnce340/tutor/11computeranimation.pdf ·...

Post on 18-Sep-2020

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Graphics

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 1

Computer Animation

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 2

Computer Animation

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 3

Outline

Principles of Animation

Keyframe Animation

Articulated Figures

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 4

Principle of Traditional

Animation – Disney –

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 5

Squash and Stretch

Squash

Stretch

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 6

Slow In and Out

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 7

Anticipation

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 8

Computer Animation

Animation Pipeline

3D modeling

Motion specification

Motion simulation

Shading, lighting, & rendering

Postprocessing

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 9

Outline

Principles of Animation

Keyframe Animation

Articulated Figures

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 10

Keyframe Animation

Define Character Poses at Specific Time

Steps Called “Keyframes”

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 11

Keyframe Animation

Interpolate Variables Describing Keyframes

to Determine Poses for Character in between

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 12

Inbetweening

Linear Interpolation

Usually not enough continuity

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 13

Inbetweening

Spline Interpolation

Maybe good enough

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 14

Inbetweening

Spline Interpolation

Maybe good enough

May not follow physical laws

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 15

Inbetweening

Spline Interpolation

Maybe good enough

May not follow physical laws

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 16

Inbetweening

Inverse Kinematics or Dynamics

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 17

Outline

Principles of Animation

Keyframe Animation

Articulated Figures

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 18

Articulated Figures

Character Poses Described by Set of Rigid

Bodies Connected by “Joints”

Base

Arm

Hand

Scene Graph

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 19

Articulated Figures

Well-Suited for Humanoid Characters

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 20

Articulated Figures

Joints Provide Handles for Moving

Articulated Figure

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 21

Summary

Animation Requires ...

Modeling

Scripting

Inbetweening

Lighting, shading

Rendering

Image processing

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 22

Motion Capture

Motion capture = Motion tracking = Mocap

Process of recording movement and translating

the movement onto a digital model

To animate digital character models in 3D animation

Records actions of human actors, and use the

information gathered

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 23

Motion Capture

Motion of an actor can be captured with various

methods

Markers

Without Markers (Optical)

Mechanical motion

Magnetic system

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Motion Capture

Application

Military training

simulations

Video games

Films

Sports

Medical applications

kucg.korea.ac.kr 24

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Motion Capture

Advantages

Can replace key-frame based animation with

smoother animation with much less efforts

Recording various test animations can be performed

without much concern

Complex, and physically accurate animation

kucg.korea.ac.kr 25

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Motion Capture

Disadvantages

Special hardware & software are required

Required software, hardware and personnel can be

expensive

Motions which are not physically correct cannot be or

are hard to be captured

kucg.korea.ac.kr 26

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Motion Capture

kucg.korea.ac.kr 27

King Kong, 2005

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Motion Capture

kucg.korea.ac.kr 28

The Lord of The Rings,

2001 ~ 2003The Mummy, 1999

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 29

Overview of Kinematics &

Dynamics

Kinematics

Consider only motion

Determined by positions, velocities, accelerations

Dynamics

Consider underlying forces

Compute motion from initial conditions and physics

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 30

Example: 2-Link Structure

Two Links Connected by Rotational Joints

“End-Effector”

X=(x, y)

(0, 0)

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 31

Forward Kinematics

Animator Specifies Joint Angles: Q1 and Q2

Computer Finds Positions of End-Effector: X

X=(x, y)

(0, 0)

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 32

Inverse Kinematics

What If Animator Knows Position of “End-

Effector”

Animator Specifies End-Effector Positions: X

Computer Finds Joint Angles: Q1 and Q2

“End-Effector”

X=(x, y)

(0, 0)

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 33

Inverse Kinematics

Problem for More Complex Structures

System of equations is usually under-defined

Multiple solutions

X=(x, y)

(0, 0)Three unknowns: Q1, Q2, Q3

Two equations: x, y

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 34

Summary

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 specification for many animation tasks, but it is computationally more difficult

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 35

Overview

Kinematics

Consider only motion

Determined by positions, velocities, accelerations

Dynamics

Consider underlying forces

Compute motion from initial conditions and physics

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 36

Dynamics

Simulation of Physics Insures Realism of

Motion

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 37

Space Time Constraints

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 38

Space Time Constraints

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 39

Space Time Constraints

Adapting Motion

Original Jump

Heavier Base

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 40

Space Time Constraints

Adapting Motion

Hurdle

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 41

Space Time Constraints

Adapting Motion

Ski Jump

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 42

Space Time Constraints

Editing Motion

Original Adapted

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Example

http://www.naturalmotion.com/endorphin.htm

kucg.korea.ac.kr 43

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 44

Space Time Constraints

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Physical simulation

Simulate natural phenomena based upon the

law of physics

Predict how objects change over time according to

physical laws

Physical simulations

Rigid, Soft bodies

Cloth, hair

Fluids (Liquids, Gases)

etc

kucg.korea.ac.kr 45

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Example

“Fracturing Rigid Materials”, IEEE TVCG 2007,

Bao et al.

kucg.korea.ac.kr 46

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Example

“Controlling fluid animation with Geometric

Potential”, CASA 2004, Hong and Kim

kucg.korea.ac.kr 47

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Example

"Wrinkled Flames and Cellular Patterns",

SIGGRAPH 2007, Hong et al.

kucg.korea.ac.kr 48

Fire

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Rigid, Soft bodies

Zhaosheng Bao, Jeong-Mo Hong, Joseph Teran and Ron Fedkiw, "Fracturing Rigid Materials",

IEEE Transactions on Visualization and Computer Graphics, Volume 13, Issue 2, pp.370-378,

2007.

Shinar, T., Schroeder, C. and Fedkiw, R., "Two-way Coupling of Rigid and Deformable Bodies",

ACM SIGGRAPH/Eurographics Symposium on Computer Animation (SCA), edited by Doug

James and Markus Gross, pp. 95-103 (2008).

kucg.korea.ac.kr 49

Rigid Soft

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Cloth, Hair

Selle. A, Su, J., Irving, G. and Fedkiw, R., "Highly Detailed Folds and

Wrinkles for Cloth", IEEE TVCG (in press).

Selle, A., Lentine, M. and Fedkiw, R., "A Mass Spring Model for Hair

Simulation", SIGGRAPH 2008, ACM TOG 27, 64.1-64.11 (2008).

kucg.korea.ac.kr 50

Cloth Hair

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Fluid simulation (Water, Smoke)

Losasso, F., Talton, J., Kwatra, N. and Fedkiw, R., "Two-way Coupled SPH and Particle Level

Set Fluid Simulation", IEEE TVCG 14, 797-804 (2008).

T. Kim, Nils Thürey, Doug James, and Markus Gross, “Wavelet turbulence for fluid simulation”,

SIGGRAPH 2008, ACM TOG 27.

kucg.korea.ac.kr 51

Water Smoke

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Physical simulation

Why do we need physical simulation

It is nearly impossible to produce natural physical

phenomena manually without extreme effort

Can generate physically accurate motions

Can generate huge scale animations such as

explosion, tornado, tidal wave

Actors do not have to risk possible dangers of

extreme environments

kucg.korea.ac.kr 52

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Applications of Physical

Simulation

kucg.korea.ac.kr 53

Movie “Pirates of the Caribbean(2007)” Evian TV CF.

Movie “Terminator 3(2003)” Movie “The Chronicles Of Narnia: Prince Caspian (2008)”

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea Universitykucg.korea.ac.kr 54

Summary

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

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Navier-Stokes Equations

Appendix : Fluid Simulation

kucg.korea.ac.kr 55

Advection External

force

DiffusionProjection

Reference: Jos Stam, "Stable Fluids", In SIGGRAPH 99 Conference

Proceedings, Annual Conference Series, August 1999, 121-128.

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Appendix : Fluid Simulation

kucg.korea.ac.kr 56

The advection step moves the density through a static velocity field.

Advection

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Appendix : Fluid Simulation

kucg.korea.ac.kr 57

The effect of Density Diffusion

Velocity Diffusion makes the fluid move more like a rigid object.

Density and Velocity Diffusion

KUCG

Graphics Lab @ Korea UniversityGraphics Lab @ Korea University

Appendix : Fluid Simulation

kucg.korea.ac.kr 58

To obtain an incompressible field we simply subtract

the gradient field from our current velocities.

Projection

top related