Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

Similar documents
Animation Lecture 10 Slide Fall 2003

Computer Animation II

Homework 2 Questions? Animation, Motion Capture, & Inverse Kinematics. Velocity Interpolation. Handing Free Surface with MAC

Animation. Traditional Animation Keyframe Animation. Interpolating Rotation Forward/Inverse Kinematics

Last Time? Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Animations. Hakan Bilen University of Edinburgh. Computer Graphics Fall Some slides are courtesy of Steve Marschner and Kavita Bala

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

COMP371 COMPUTER GRAPHICS

Animation, Motion Capture, & Inverse Kinematics. Announcements: Quiz

Announcements: Quiz. Animation, Motion Capture, & Inverse Kinematics. Last Time? Today: How do we Animate? Keyframing. Procedural Animation

Last Time? Animation, Motion Capture, & Inverse Kinematics. Today. Keyframing. Physically-Based Animation. Procedural Animation

Animation. CS 4620 Lecture 32. Cornell CS4620 Fall Kavita Bala

Keyframe Animation. Animation. Computer Animation. Computer Animation. Animation vs Modeling. Animation vs Modeling

Animation. Keyframe animation. CS4620/5620: Lecture 30. Rigid motion: the simplest deformation. Controlling shape for animation

Animation. CS 4620 Lecture 33. Cornell CS4620 Fall Kavita Bala

Computer Animation. Courtesy of Adam Finkelstein

CS770/870 Spring 2017 Animation Basics

CS770/870 Spring 2017 Animation Basics

COMPUTER ANIMATION 3 KEYFRAME ANIMATION, RIGGING, SKINNING AND CHARACTER ANIMATION. Rémi Ronfard, Animation, M2R MOSIG

Chapter 3 : Computer Animation

Animation principles. Character animation. Reading. Goal: make characters that move in a convincing way to communicate personality and mood.

To Do. History of Computer Animation. These Lectures. 2D and 3D Animation. Computer Animation. Foundations of Computer Graphics (Spring 2010)

Reading. Animation principles. Required:

Animation, Motion Capture, & Inverse Kinematics

CS230 : Computer Graphics Lecture 12: Introduction to Animation. Tamar Shinar Computer Science & Engineering UC Riverside

Reading. Topics in Articulated Animation. Character Representation. Animation. q i. t 1 t 2. Articulated models: Character Models are rich, complex

Animation principles. Reading. Character animation. Animation Principles. Brian Curless CSE 457 Spring 2013

Interactive Computer Graphics

Why animate humans? Why is this hard? Aspects of the Problem. These lectures. Animation Apreciation 101

Reading. Animation principles. Character animation. Animation Principles

Animation principles. Reading. CSE 457 Winter Required:

Reading. Animation principles. Character animation. Goal: make characters that move in a convincing way to communicate personality and mood.

animation projects in digital art animation 2009 fabio pellacini 1

Character Animation COS 426

Animation. CS 465 Lecture 22

Articulated Characters

Animation principles. Character animation. Reading. Goal: make characters that move in a convincing way to communicate personality and mood.

Animation principles. Character animation. Reading. Goal: make characters that move in a convincing way to communicate personality and mood.

Animation Principles CSE 457

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/27/2017

12.1 Quaternions and Rotations

animation computer graphics animation 2009 fabio pellacini 1 animation shape specification as a function of time

For each question, indicate whether the statement is true or false by circling T or F, respectively.

animation computer graphics animation 2009 fabio pellacini 1

计算机图形学. Computer Graphics 刘利刚.

Animation. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 4/23/07 1

Quaternions and Rotations

Quaternions and Rotations

Quaternions and Rotations

COMP 175 COMPUTER GRAPHICS. Lecture 10: Animation. COMP 175: Computer Graphics March 12, Erik Anderson 08 Animation

Kinematical Animation.

Animation and Quaternions

Rotations (and other transformations) Rotation as rotation matrix. Storage. Apply to vector matrix vector multiply (15 flops)

SM2231 :: 3D Animation I :: Basic. Rigging

Computer Animation. Michael Kazhdan ( /657) HB 16.5, 16.6 FvDFH 21.1, 21.3, 21.4

Quaternions and Rotations

Fundamentals of Computer Animation

Keyframe Animation. Computer Animation. Outline. Computer Animation. Keyframe Animation. Keyframe Animation

Basics of Motion Generation

Visual Recognition: Image Formation

IMAGE-BASED RENDERING AND ANIMATION

Animation Curves and Splines 2

Chapter 5.2 Character Animation

CS 445 / 645 Introduction to Computer Graphics. Lecture 21 Representing Rotations

3D Modelling: Animation Fundamentals & Unit Quaternions

Inverse Kinematics Programming Assignment

Motivation. Parametric Curves (later Surfaces) Outline. Tangents, Normals, Binormals. Arclength. Advanced Computer Graphics (Fall 2010)

Visualizing Quaternions

Kinematics and Orientations

Animation by Adaptation Tutorial 1: Animation Basics

Lecture 18 of 41. Scene Graphs: Rendering Lab 3b: Shader

Transformations Week 9, Lecture 18

Character Animation 1

Rigging / Skinning. based on Taku Komura, Jehee Lee and Charles B.Own's slides

This week. CENG 732 Computer Animation. Warping an Object. Warping an Object. 2D Grid Deformation. Warping an Object.

CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

Lab 2A Finding Position and Interpolation with Quaternions

Aalto CS-C3100 Computer Graphics, Fall 2016

Coordinate Transformations. Coordinate Transformation. Problem in animation. Coordinate Transformation. Rendering Pipeline $ = $! $ ! $!

Applications. Human and animal motion Robotics control Hair Plants Molecular motion

TIEA311 Tietokonegrafiikan perusteet kevät 2018

MTRX4700 Experimental Robotics

CS354 Computer Graphics Rotations and Quaternions

Keyframing an IK Skeleton Maya 2012

CS475/CS675 - Computer Graphics. Lecture 16: Principles of Animation

Transformation. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

CS559: Computer Graphics

Part II: OUTLINE. Visualizing Quaternions. Part II: Visualizing Quaternion Geometry. The Spherical Projection Trick: Visualizing unit vectors.

Applications of Dual Quaternions in Three Dimensional Transformation and Interpolation

Lecture VI: Constraints and Controllers

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Lecture 22 of 41. Animation 2 of 3: Rotations, Quaternions Dynamics & Kinematics

Visualizing Quaternions

CS 231. Basics of Computer Animation

Computer Animation. Rick Parent

Computer Graphics. Spring Feb Ghada Ahmed, PhD Dept. of Computer Science Helwan University

Computer Animation. Algorithms and Techniques. z< MORGAN KAUFMANN PUBLISHERS. Rick Parent Ohio State University AN IMPRINT OF ELSEVIER SCIENCE

Inertial Measurement Units II!

3D Transformations. CS 4620 Lecture Kavita Bala w/ prior instructor Steve Marschner. Cornell CS4620 Fall 2015 Lecture 11

Diploma in Graphics Design. Examinations for / Semester 1

Transcription:

Computer Animation Fundamentals Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics Lecture 21 6.837 Fall 2001

Conventional Animation Draw each frame of the animation great control tedious Reduce burden with cel animation layer keyframe inbetween cel panoramas (Disney s Pinocchio)... ACM 1997 Multiperspective panoramas for cel animation Lecture 21 Slide 2 6.837 Fall 2001

Keyframing Computer-Assisted Animation automate the inbetweening good control less tedious creating a good animation still requires considerable skill and talent Procedural animation describes the motion algorithmically express animation as a function of small number of parameteres ACM 1987 Principles of traditional animation applied to 3D computer animation Example: a clock with second, minute and hour hands hands should rotate together express the clock motions in terms of a seconds variable the clock is animated by varying the seconds parameter Lecture 21 Slide 3 6.837 Fall 2001

Computer-Assisted Animation Physically Based Animation Assign physical properties to objects (masses, forces, inertial properties) Simulate physics by solving equations Realistic but difficult to control Motion Capture Captures style, subtle nuances and realism ACM 1988 Spacetime Constraints You must observe someone do something Lecture 21 Slide 4 6.837 Fall 2001

Keyframing ACM 1987 Principles of traditional animation applied to 3D computer animation Describe motion of objects as a function of time from a set of key object positions. In short, compute the inbetween frames. st ( ) Lecture 21 Slide 5 6.837 Fall 2001

Interpolating Positions Given positions: ( x, y, t ), i = 0, K, n i i i x ( t ) find curve C ( t ) = such that y ( t ) C ( t ) i x i = y i ( x, y, t ) 2 2 2 C ( t ) u 0 0 0 ( x, y, t ) 0 ( x1, y 1, t1) Lecture 21 Slide 6 6.837 Fall 2001

Linear Interpolation ( x, y, t ) 2 2 2 ( x 0, y 0, t 0) ( x1, y 1, t1) Simple problem: linear interpolation between first two points assuming t : 0=0 and t 1=1 x ( t ) = x 0( 1 t) + x1t The x-coordinate for the complete curve in the figure: x ( t ) t1 t t t 0 ) x 0 + x 1, t t 0, t 1 t1 t0 t1 t 0 = t 2 t t t1 x1 + x 2, t t 1, t2 t 2 t1 t 2 t 1 Lecture 21 Slide 7 6.837 Fall 2001

Polynomial Interpolation ( x, y, t ) 2 2 2 ( x 0, y 0, t 0) ( x1, y 1, t1) parabola An n-degree polynomial can interpolate any n+1 points. The Lagrange formula gives the n+1 coefficients of an n-degree polynomial that interpolates n+1 points. The resulting interpolating polynomials are called Lagrange polynomials. On the previous slide, we saw the Lagrange formula for n = 1. Lecture 21 Slide 8 6.837 Fall 2001

Spline Interpolation Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly. Spline (piecewise cubic polynomial) interpolation produces nicer interpolation. t t t x ( t) 8-degree polynomial spline spline vs. polynomial How many n-degree polynomials interpolate n+1 points? How many splines interpolate n+1 points? Lecture 21 Slide 9 6.837 Fall 2001

Spline Interpolation A cubic polynomial between each pair of points: 2 3 x ( t ) = c + c t + c t + c t Four parameters (degrees of freedom) for each spline segment. Number of parameters: n+1 points n cubic polynomials 4n degrees of freedom Number of constraints: 0 1 2 3 interpolation constraints n+1 points 2 + 2 (n-1) = 2n interpolation constraints continuous velocity n+1 points n-1 velocity constraints (one for each interior point) continuous acceleration n+1 points n-1 acceleration constraints (one for each interior point) Lecture 21 Slide 10 6.837 Fall 2001

Interpolation of Positions Solve an optimization to set remaining degrees of freedom: max quality t min badness C t dof C ( ) ( ) ( ) subject to constraints dof ( C ( t) ) = C ( t) ( ) subject to constraints badness quality( ) We want to support general constraints: not just smooth velocity and acceleration. For example, a bouncing ball does not always have continuous velocity: Lecture 21 Slide 11 6.837 Fall 2001

Interpolating Angles Given angles ( θ i, t i ), i = 0, K, n find curve θ ( t ) such that θ( ) = θ t i i Angle interpolation is ambiguous. Different angle measurements will produce different motion: θ 1 θ 0 θ 2 θ 2 Lecture 21 Slide 12 6.837 Fall 2001

Keyframing Given keyframes ( θ ) K = x, y,, t, i = 0, K, n i i i i i ( ) x t find curve K ( t ) = y ( t) such that K ( t i ) = K i θ( t) Interpolate each parameter separately Lecture 21 Slide 13 6.837 Fall 2001

Traditional Animation Principles The in-betweening, was once a job for apprentice animators. We described the automatic interpolation techniques that accomplish these tasks automatically. However, the animator still has to draw the key frames. This is an art form and precisely why the experienced animators were spared the inbetweening work even before automatic techniques. The classical paper on animation by John Lasseter from Pixar surveys some the standard animation techniques: "Principles of Traditional Animation Applied to 3D Computer Graphics, SIGGRAPH'87, pp. 35-44. Lecture 21 Slide 14 6.837 Fall 2001

Squash and stretch Squash: flatten an object or character by pressure or by its own power Stretch: used to increase the sense of speed and emphasize the squash by contrast Lecture 21 Slide 15 6.837 Fall 2001

Timing Timing affects weight: Light object move quickly Heavier objects move slower Timing completely changes the interpretation of the motion. Because the timing is critical, the animators used the draw a time scale next to the keyframe to indicate how to generate the in-between frames. Lecture 21 Slide 16 6.837 Fall 2001

Anticipation An action breaks down into: Anticipation Action Reaction Anatomical motivation: a muscle must extend before it can contract. Prepares audience for action so they know what to expect. Directs audience s attention. Amount of anticipation can affect perception of speed and weight. Lecture 21 Slide 17 6.837 Fall 2001

Interpolating Key Frames Interpolation is not fool proof. The splines may undershoot and cause interpenetration. The animator must also keep an eye out for these types of side-effects. Lecture 21 Slide 18 6.837 Fall 2001

Interpolating Orientations in 3-D Rotation matrices Given rotation matrices M i and time t i, find M(t) such that M(t i )=M i. z y y z x x M = x y z Lecture 21 Slide 19 6.837 Fall 2001

Flawed Solution Linearly interpolate each entry independently Example: M 0 is identity and M 1 is 90-deg rotation around x-axis 1 0 0 1 0 0 1 0 0 Interpolate ( 0 1 0, 0 0 1 ) 0 0.5 0.5 = 0 0 1 0 1 0 0 0.5 0.5 Is the result a rotation matrix? The result R is not a rotation matrix. For example, check that RR T does not equal identity. In short, this interpolation does not preserve the rigidity (angles and lengths) of the transformation. Lecture 21 Slide 20 6.837 Fall 2001

Euler Angles An euler angle is a rotation about a single axis. Any orientation can be described composing three rotation around each coordinate axis. We can visualize the action of the Euler angles: each loop is a rotation around one coordinate axis. Lecture 21 Slide 21 6.837 Fall 2001

Interpolating Euler Angles Natural orientation representation: three angles for three degrees of freedom Unnatural interpolation: A rotation of 90-degrees first around the z-axis and then around the y-axis has the effect of a 120-degree rotation around the axis (1, 1, 1). But rotation of 30-degrees around the z- and y-axis does not have the effect of a 40-degree rotation around the axis (1, 1, 1). Gimbal lock: two or more axis align resulting in a loss of rotation degrees of freedom. For example, if the green loop in previous slide aligns with the red loop then both the rotation around the blue loop and the rotation around the red loop produces identical rotation. Lecture 21 Slide 22 6.837 Fall 2001

Quaternion Interpolation Linear interpolation (lerp) of quaternion representation of orientations gives us something better: Quaternion Refresher a general r quaternion r r rq consists of four r numbers: a scalar s and a 3-D vector : two general quaternions are multiplied by a special rule: a unit quaternion ( ) ( ) lerp q, q, t = q( t ) = q 1 t + q t 0 1 0 1 ( ) ( s, v ) v = v 1, v 2, v 3 q= r r r r r r q1q 2 = s 1s 2 ( v1v 2), s1v 2 + s 2v 1 + v1 v 2 r q= ( cos( θ / 2),sin( θ /2)a) θ θ r a ( ) can represent a rotation of radians around the unit axis vector a r Lecture 21 Slide 23 6.837 Fall 2001

Quaternion Interpolation The only problem with linear interpolation (lerp) of quaternions is that it interpolates the straight line (the secant) between the two quaternions and not their spherical distance. As a result, the interpolated motion does not have smooth velocity: it may speed up too much in some sections: t q t q ( ) ( ) q q 1 0 keyframes lerp slerp Spherical linear interpolation (slerp) removes this problem by interpolating along the arc lines instead of the secant lines. q ( ) ( ) ( ) 0 sin 1 t ω + q1 sin( tω) slerp q0, q1, t = q( t ) =, sin ω where ω ( q0 q1) 1 = cos ( ) Lecture 21 Slide 24 6.837 Fall 2001

Articulated Models Articulated models: rigid parts connected by joints They can be animated by specifying the joint angles (or other display parameters) as functions of time. q i q t i( ) t 1 t 2 t 1 t 2 Lecture 21 Slide 25 6.837 Fall 2001

Forward Kinematics Describes the positions of the body parts as a function of the joint angles. 1 DOF: knee 2 DOF: wrist 3 DOF: arm Lecture 21 Slide 26 6.837 Fall 2001

Skeleton Hierarchy Each bone transformation described relative to the parent in the hierarchy: x h, y h, z h, qh, f h, s h q, f, s t t t hips left-leg... r-thigh q c r-calf q f, f f r-foot Lecture 21 Slide 27 6.837 Fall 2001

Forward Kinematics x h, y h, z h, qh, f h, s h q, f, s t t t Transformation matrix for a sensor/effecter v s is a matrix composition of all joint transformation between the sensor/effecter and the root of the hierarchy. q c y q f, f f v s z v s x v = w T( x, y, z ) R( q, f, s ) h h h h h h TR( q, f, s )TR( q c ) t t t TR( q, f ) v w= S x, y, z, θ, φ, σ, θ, φ, σ, θ, θ, φ v = S( p) v h h h h h h t t t c f f s s 14444444244444443 p Lecture 21 Slide 28 6.837 Fall 2001 f f vs

Inverse Kinematics Forward Kinematics Given the skeleton parameters (position of the root and the joint angles) p and the position of the sensor/effecter in local coordinates v s, what is the position of the sensor in the world coordinates v w. Not too hard, we can solve it by evaluating Inverse Kinematics Given the the position of the sensor/effecter in local coordinates v s and the position of the sensor in the world coordinates v w, what are the skeleton parameters p. Much harder requires solving the inverse of the non-linear function ( ) S p We can solve it by root-finding We can solve it by optimization ( ) v s S p ( ) v s w ( ) v s p? such that S p v = 0 minimize S p v w p ( ) 2 Lecture 21 Slide 29 6.837 Fall 2001

Kinematics vs. Dynamics Kinematics Describes the positions of the body parts as a function of the joint angles. Dynamics Describes the positions of the body parts as a function of the applied forces. Lecture 21 Slide 30 6.837 Fall 2001

Dynamics Next Time ACM 1988 Spacetime Constraints Lecture 21 Slide 31 6.837 Fall 2001