1 7m836 animation & rendering animation jakob beetz [email protected] joran jessurun...

40
1 7M836 Animation & Rendering Animation Jakob Beetz [email protected] Joran Jessurun [email protected]

Post on 20-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

1

7M836 Animation & Rendering

Animation

Jakob Beetz

[email protected]

Joran Jessurun

[email protected]

Page 2: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

2

Next Week

Subject: Virtual Reality

When: June 2nd

Where: Design Systems Lab. (Vertigo 9.16)

Page 3: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

3

Animation

• History of cartoon and computer animation• Extensive description of techniques and algorithms

Rick ParentComputer Animation, Algorithms and Techniques

www.cis.ohio-state.edu/~parent/book/outline.html

• How to make an animation• Examples

www.pixar.com

Page 4: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

4

Animation

• Animation

– “To give live to”

– Make objects change over timeaccording to scripted actions

– By showing a sequence of fastchanging images

• Series images (frames)

– Film 24 fps

– Video 30 fps => 1 hour animation 108000 frames

Page 5: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

5

What can be animated?

• Position and orientation of objects

• Geometry (shape) and scaling of objects

• Illumination

• Reflection

• Camera

• In fact, everything!

Page 6: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

6

Animation process - traditional

• Storyboard– The story– Sequence of images with descriptions

• Key frames– Draw a number of important images (key frames)– Motion-based description

• Inbetweens– Draw the rest of the frames

• Painting– Redraw frames onto cels– Color them in

• Put animation onto film

Page 7: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

7

Computer animation

• Computer animation pipeline

– 3D modeling

– Motion specification

– Motion simulation

– Rendering

– Post-processing

Key framing

Page 8: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

8

Keyframe animation

• Each “keyframe” specified by a number of key-parameters (state)

• Inbetweening: Interpolate these parameters

Page 9: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

9

Keyframe animation

• For each key parameter, specify value at “important” frames

• Computer creates path for each parameter by interpolating this key parameter for inbetween frames

Page 10: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

10

Interpolation

• Linear interpolation

– Usually discontinuities

– Not a smooth movement

Page 11: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

11

Interpolation

• Spline interpolation

– Smooth transitions

– Beware of unwanted side effects

Page 12: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

12

Interpolation – speed control

• Include velocity of interpolation

– It is often more realistic to start a movement slowly, then speed up, and end it again slowly

– Use speed curve

• Speed curve relates time with position on interpolation spline

• Position on interpolation spline determines interpolated key parameter value

Page 13: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

13

Interpolation – speed control

Page 14: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

14

Keyframing summarized

• Specification of key frames/parameters

– Determine key parameters and their values at certain important points in time

– Specify type of interpolation

• Specify speed curve for interpolation

• Computer generates inbetween frames

Page 15: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

15

Animation of articulated structures

• Articulated structure:

– Object consists of a number of (sub-)objects (links) connected by joints

– Each joint is specified by at least one (key-)parameter

– Movement of object described by changing parameter values

Page 16: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

16

Examples of joints

• Constraints on joints

Page 17: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

17

Articulated structure

• Skeleton consists of 14 joints

• Each joint has 2 or 3 degrees of freedom

• Some parameters constrained

Page 18: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

18

Kinematics

• Kinematics is the study of movement of (hierarchical) objects

– Position, orientation, velocity, acceleration

– Without taking into account dynamic properties (forces) (dynamics)

• Forward kinematics

• Inverse kinematics

Page 19: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

19

Forward kinematics

• Animator sets parameter values for joints

• Computer computes positions/orientations for links links:

),(fX 21

Page 20: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

20

Forward kinematics

• Animation by specification / interpolation of joint parameters

1

2

Page 21: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

21

Forward kinematics

Page 22: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

22

Forward kinematics

Page 23: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

23

Forward kinematics

Page 24: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

24

Kinematics

• What to do when animation knows the desired end-position of the (sub-)object?

– E.g. to grab something?

Page 25: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

25

Inverse kinematics

• Animator specifies position (and orientation) within scene at wich link (end-effector) has to be positioned

• Computer computes joint parameter values to get link at desired position:

• After that. computer computes positions of all links by applying these joint parameter values for all joints

)X(f, 1

21

Page 26: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

26

Inverse kinematics

Page 27: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

27

Inverse kinematics

• Animation by specification / interpolation of end-effector position

• Or animation by interpolation of joint parameter values at start and end frame

x

y

Page 28: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

28

Inverse kinematics

• Problems

– Often more than one solution

• Extra requirements to solution

– Result not always desired path (e.g. collisions)

– What to do when end-effector position specified outside operation area of object?

Page 29: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

29

Inverse kinematics

• Inverse kinematics is also used to compute dependency of joint parameter values

– E.g. for object with closed loops

Page 30: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

30

Kinematics summarized

• Forward kinematics

– Animator controls through joint parameters

– Direct control over object state

– Often many parameters to control

• Inverse kinematics

– Animator controls through position/orientation end-effector

– Simpler specification of movements

• Less parameters

• Better feeling for positions in scene

– Complex computations

Page 31: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

31

Rigid Body Simulation

Rigid bodies Joints Contact and collisions Friction

Springs

Mechanical systems that have:

Examples:

Bridge Rope Robot arm

VehicleHuman

Tower of cards

Page 32: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

32

Rigid Body Simulation

• Physical process

• Model

• Simulation algorithm

• Computer program

Object properties (e.g. position, orientation, linear and angular momentum, mass)

Calculate forces (e.g. wind, gravity,

viscosity)

Calculate accelerations from objects’ masses

Calculate change in objects’ positions,

velocities, momenta

Page 33: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

33

Simulating position

ttvtxttx )()()(

ttatvttv )()()(

amF

-8

-6

-4

-2

0

2

4

6

8

10

12

14

0 10 20 30 40 50 60

Position

Velocity

5.0t

5

5)0(v

0

0)0(x

1

0)(ta

Page 34: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

34

Simulating rotational movement

)(tx

)(tv

)(t

)(tFi

)())()(()( tFtxtrt iii

)(tx

)(tri

• Angular velocity

• Torque

• Inertia Tensor is the angular equivalent of mass

• Inertia Tensor is dependent on the orientation of the body

)()()(

)()(

ttItL

tmvtP

Page 35: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

35

Springs

• Spring Force

• Dampers

)(tvkF iddamper

i

jijijispringji

springji vlentdistkFF ,,,,, ))((

mass point mass point

damperspring

Page 36: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

36

Collision

• Detecting the occurrence of collision

• Computing the response to those collisions

dkF Point p at t(i-1)

d

Point p at t(i) Penalty force

Page 37: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

37

Friction

• Static friction

• Kinetic friction

Nss FF Parallel component

Perpendicular component(Normal force)

Applied force

Normal

Ff

Nkk FF

Page 38: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

38

Constraints

• Hard constraints

• Soft constraints

• Joints are constraints

• Point-spline constraint

Page 39: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

39

Flexible objects

• Spring-Mass-Damper model

• Each vertex is a point mass

• Between vertices a spring

• Add interior springs to create stability

Page 40: 1 7M836 Animation & Rendering Animation Jakob Beetz J.Beetz@tue.nl Joran Jessurun A.J.Jessurun@tue.nl

40

3D Max Reactor examples

• Demo1 – pencils fall out of cup

• Demo2 – shoot cannon ball against wall that fractures

• Demo3 – create box on a rope and let it swing

• Demo4 – create a piece of cloth, let the wind blow and drop something on it

• Demo5 – vehicle down a ramp and a simple roller coaster