1 7m836 animation & rendering animation jakob beetz j.beetz@tue.nl joran jessurun...

Post on 20-Dec-2015

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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)

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

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

5

What can be animated?

• Position and orientation of objects

• Geometry (shape) and scaling of objects

• Illumination

• Reflection

• Camera

• In fact, everything!

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

7

Computer animation

• Computer animation pipeline

– 3D modeling

– Motion specification

– Motion simulation

– Rendering

– Post-processing

Key framing

8

Keyframe animation

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

• Inbetweening: Interpolate these parameters

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

10

Interpolation

• Linear interpolation

– Usually discontinuities

– Not a smooth movement

11

Interpolation

• Spline interpolation

– Smooth transitions

– Beware of unwanted side effects

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

13

Interpolation – speed control

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

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

16

Examples of joints

• Constraints on joints

17

Articulated structure

• Skeleton consists of 14 joints

• Each joint has 2 or 3 degrees of freedom

• Some parameters constrained

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

19

Forward kinematics

• Animator sets parameter values for joints

• Computer computes positions/orientations for links links:

),(fX 21

20

Forward kinematics

• Animation by specification / interpolation of joint parameters

1

2

21

Forward kinematics

22

Forward kinematics

23

Forward kinematics

24

Kinematics

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

– E.g. to grab something?

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

26

Inverse kinematics

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

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?

29

Inverse kinematics

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

– E.g. for object with closed loops

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

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

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

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

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

35

Springs

• Spring Force

• Dampers

)(tvkF iddamper

i

jijijispringji

springji vlentdistkFF ,,,,, ))((

mass point mass point

damperspring

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

37

Friction

• Static friction

• Kinetic friction

Nss FF Parallel component

Perpendicular component(Normal force)

Applied force

Normal

Ff

Nkk FF

38

Constraints

• Hard constraints

• Soft constraints

• Joints are constraints

• Point-spline constraint

39

Flexible objects

• Spring-Mass-Damper model

• Each vertex is a point mass

• Between vertices a spring

• Add interior springs to create stability

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

top related