Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
7M836 Animation & Rendering Animation Jakob Beetz Joran Jessurun [email protected] [email protected] 1 Next Week Subject: Virtual Reality When: June 2nd Where: Design Systems Lab. (Vertigo 9.16) 2 Animation • History of cartoon and computer animation • Extensive description of techniques and algorithms Rick Parent Computer Animation, Algorithms and Techniques www.cis.ohio-state.edu/~parent/book/outline.html • How to make an animation • Examples www.pixar.com 3 Animation • Animation – “To give live to” – Make objects change over time according to scripted actions – By showing a sequence of fast changing images • Series images (frames) – Film 24 fps – Video 30 fps => 1 hour animation 108000 frames 4 What can be animated? • • • • • Position and orientation of objects Geometry (shape) and scaling of objects Illumination Reflection Camera • In fact, everything! 5 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 6 Computer animation • Computer animation pipeline – 3D modeling – Motion specification Key framing – Motion simulation – Rendering – Post-processing 7 Keyframe animation • Each “keyframe” specified by a number of key-parameters (state) • Inbetweening: Interpolate these parameters 8 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 9 Interpolation • Linear interpolation – Usually discontinuities – Not a smooth movement 10 Interpolation • Spline interpolation – Smooth transitions – Beware of unwanted side effects 11 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 12 Interpolation – speed control 13 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 14 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 15 Examples of joints • Constraints on joints 16 Articulated structure • Skeleton consists of 14 joints • Each joint has 2 or 3 degrees of freedom • Some parameters constrained 17 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 18 Forward kinematics • Animator sets parameter values for joints • Computer computes positions/orientations for links links: X f (1 , 2 ) 19 Forward kinematics • Animation by specification / interpolation of joint parameters 1 2 20 Forward kinematics 21 Forward kinematics 22 Forward kinematics 23 Kinematics • What to do when animation knows the desired endposition of the (sub-)object? – E.g. to grab something? 24 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: 1 , 2 f 1 ( X) • After that. computer computes positions of all links by applying these joint parameter values for all joints 25 Inverse kinematics 26 Inverse kinematics • Animation by specification / interpolation of end-effector position x y • Or animation by interpolation of joint parameter values at start and end frame 27 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? 28 Inverse kinematics • Inverse kinematics is also used to compute dependency of joint parameter values – E.g. for object with closed loops 29 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 endeffector – Simpler specification of movements • Less parameters • Better feeling for positions in scene – Complex computations 30 Rigid Body Simulation Mechanical systems that have: Rigid bodies Springs Contact and collisions Joints Friction Examples: Vehicle Bridge Rope Human Robot arm Tower of cards 31 Rigid Body Simulation • • • • Physical process Model Simulation algorithm Computer program Object properties (e.g. position, orientation, linear and angular momentum, mass) Calculate change in objects’ positions, velocities, momenta Calculate forces (e.g. wind, gravity, viscosity) Calculate accelerations from objects’ masses 32 Simulating position x(t t ) x(t ) v(t ) t v(t t ) v(t ) a(t ) t F m a t 0.5 14 12 10 8 6 4 Position 2 Velocity 0 -2 0 -4 -6 -8 10 20 30 40 50 60 0 x(0) 0 5 v(0) 5 0 a(t ) 1 33 Simulating rotational movement • Angular velocity • Torque • Inertia Tensor is the angular equivalent of mass • Inertia Tensor is dependent on the orientation of the body P(t ) mv(t ) L(t ) I (t ) (t ) (t ) v (t ) x(t ) i (t ) (ri (t ) x(t )) Fi (t ) ri (t ) x(t ) Fi (t ) 34 Springs • Spring Force spring Fi ,spring F k (dist i , j (t ) leni , j ) vi , j j i, j • Dampers Fi damper k d vi (t ) mass point spring damper mass point 35 Collision • Detecting the occurrence of collision • Computing the response to those collisions Point p at t(i-1) F k d d Point p at t(i) Penalty force 36 Friction • Static friction Fs s FN • Kinetic friction Fk k FN Parallel component Applied force Perpendicular component (Normal force) Normal Ff 37 Constraints • Hard constraints • Soft constraints • Joints are constraints • Point-spline constraint 38 Flexible objects • • • • Spring-Mass-Damper model Each vertex is a point mass Between vertices a spring Add interior springs to create stability 39 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 40