Animation Lecture 10 Slide Fall 2003

Similar documents
Computer Animation Fundamentals. Animation Methods Keyframing Interpolation Kinematics Inverse Kinematics

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

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

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

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

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

Animation, Motion Capture, & Inverse Kinematics

CS770/870 Spring 2017 Animation Basics

CS770/870 Spring 2017 Animation Basics

animation projects in digital art animation 2009 fabio pellacini 1

COMP371 COMPUTER GRAPHICS

Computer Animation II

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

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

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

Interactive Computer Graphics

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

Reading. Animation principles. Required:

Reading. Animation principles. Character animation. Animation Principles

Animation principles. Reading. CSE 457 Winter Required:

Computer Animation. Courtesy of Adam Finkelstein

Motion Capture. Motion Capture in Movies. Motion Capture in Games

Reading. Animation principles. Character animation. 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.

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

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

Animation Principles CSE 457

Character Animation COS 426

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

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

CS 775: Advanced Computer Graphics. Lecture 3 : Kinematics

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

Lecture VI: Constraints and Controllers

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

Articulated Characters

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

Kinematical Animation.

Chapter 3 : Computer Animation

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

Motion Capture & Simulation

Basics of Motion Generation

Animation. CS 465 Lecture 22

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

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

animation computer graphics animation 2009 fabio pellacini 1

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

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

Lecture VI: Constraints and Controllers. Parts Based on Erin Catto s Box2D Tutorial

CS559: Computer Graphics

Chapter 3 Numerical Methods

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

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

CS-184: Computer Graphics. Today. Forward kinematics Inverse kinematics. Wednesday, November 12, Pin joints Ball joints Prismatic joints

TIEA311 Tietokonegrafiikan perusteet kevät 2018

Inverse Kinematics Programming Assignment

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

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

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

Computer Animation INF2050

Animation by Adaptation Tutorial 1: Animation Basics

Keyframing an IK Skeleton Maya 2012

A 12-DOF Analytic Inverse Kinematics Solver for Human Motion Control

Computer Graphics Curves and Surfaces. Matthias Teschner

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

Kinematics & Motion Capture

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

6.837 Computer Graphics Hierarchical Modeling Wojciech Matusik, MIT EECS Some slides from BarbCutler & Jaakko Lehtinen

Motion for Computer Animation. Michael Gleicher Department of Computer Sciences University of Wisconsin, Madison

1 Trajectories. Class Notes, Trajectory Planning, COMS4733. Figure 1: Robot control system.

Inverse Kinematics (part 1) CSE169: Computer Animation Instructor: Steve Rotenberg UCSD, Winter 2018

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

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

Robots are built to accomplish complex and difficult tasks that require highly non-linear motions.

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

MTRX4700 Experimental Robotics

CNM 190 Advanced Digital Animation Lec 10 : Inverse Kinematics & Automating Animation

Splines. Parameterization of a Curve. Curve Representations. Roller coaster. What Do We Need From Curves in Computer Graphics? Modeling Complex Shapes

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

Kinematics and Orientations

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

Optimal motion trajectories. Physically based motion transformation. Realistic character animation with control. Highly dynamic motion

Beginners Guide Maya. To be used next to Learning Maya 5 Foundation. 15 juni 2005 Clara Coepijn Raoul Franker

Robotics (Kinematics) Winter 1393 Bonab University

The 3D rendering pipeline (our version for this class)

Serial Manipulator Statics. Robotics. Serial Manipulator Statics. Vladimír Smutný

Term Project Final Report for CPSC526 Statistical Models of Poses Using Inverse Kinematics

CS 231. Basics of Computer Animation

Kinematics. CS 448D: Character Animation Prof. Vladlen Koltun Stanford University

Diploma in Graphics Design. Examinations for / Semester 1

Interactive Graphics. Lecture 9: Introduction to Spline Curves. Interactive Graphics Lecture 9: Slide 1

Table of Contents. Chapter 1. Modeling and Identification of Serial Robots... 1 Wisama KHALIL and Etienne DOMBRE

Style-based Inverse Kinematics

Mesh-Based Inverse Kinematics

The Line of Action: an Intuitive Interface for Expressive Character Posing. Martin Guay, Marie-Paule Cani, Rémi Ronfard

Manipulator trajectory planning

02/22/02. Assignment 1 on the web page: Announcements. Test login procedure NOW!

12.1 Quaternions and Rotations

CSE452 Computer Graphics

SCAPE: Shape Completion and Animation of People

Transcription:

Animation Lecture 10 Slide 1 6.837 Fall 2003

Conventional Animation Draw each frame of the animation great control tedious Reduce burden with cel animation layer keyframe inbetween cel panoramas (Disney s Pinocchio)... Lecture 10 Slide 2 6.837 Fall 2003

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 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 Example 2: A bouncing ball Abs(sin(ωt+θ 0 ))*e -kt Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Lecture 10 Slide 3 6.837 Fall 2003

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 Image removed due to copyright considerations. Motion Capture Captures style, subtle nuances and realism You must observe someone do something Lecture 10 Slide 4 6.837 Fall 2003

Overview Hermite Splines Keyframing Traditional Principles Squash & Stretch in Luxo Jr.'s Hop Articulated Models Forward Kinematics Inverse Kinematics Optimization Differential Constraints Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Lecture 10 Slide 5 6.837 Fall 2003

Keyframing Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Describe motion of objects as a function of time from a set of key object positions. In short, compute the inbetween frames. Lecture 10 Slide 6 6.837 Fall 2003

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 ( x2, y 2, t2) C ( t ) u 0 0 0 ( x, y, t ) 0 ( x1, y1, t1) Lecture 10 Slide 7 6.837 Fall 2003

Linear Interpolation ( x, y, t ) 2 2 2 ( x0, y 0, t0) ( x1, y1, 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 t0 ) x 0 + x 1, t t 0, t 1 t1 t0 t1 t 0 = t2 t t t1 x1 + x2, t t1, t2 t2 t1 t2 t 1 Lecture 10 Slide 8 6.837 Fall 2003 Derivation?

Polynomial Interpolation ( x2, y 2, t2) ( x0, y 0, t0) ( x1, y1, 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 10 Slide 9 6.837 Fall 2003

Spline Interpolation Lagrange polynomials of small degree are fine but high degree polynomials are too wiggly. t t t x ( t ) 8-degree polynomial spline spline vs. polynomial How many n-degree polynomials interpolate n+1 points? Lecture 10 Slide 10 6.837 Fall 2003

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 Lecture 10 Slide 11 6.837 Fall 2003

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 endpoints + each side of an internal point rest by requiring smooth velocity, acceleration, etc. Lecture 10 Slide 12 6.837 Fall 2003

Hermite Splines We want to support general constraints: not just smooth velocity and acceleration. For example, a bouncing ball does not always have continuous velocity: Solution: specify position AND velocity at each point Derivation? c, c, c, c =? for x, v : t = t and x, v : t = t 0 1 2 3 0 0 0 1 1 1 Lecture 10 Slide 13 6.837 Fall 2003

Keyframing Given keyframes ( 0 1 K ) 0 p t 1 find curves K () t = p ( t ) such that K ( t i ) = K M 0 1 What are parameters p, p, K? K = p, p,, t, i = 0, K, n i i i i ( ) position, orientation, size, visibility, i i i Interpolate each curve separately Lecture 10 Slide 14 6.837 Fall 2003

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. Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Lecture 10 Slide 15 6.837 Fall 2003

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 10 Slide 16 6.837 Fall 2003

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 Squash & Stretch in Luxo Jr.'s Hop Squash & Stretch In Bouncing Ball Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Lecture 10 Slide 17 6.837 Fall 2003

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 inbetween frames. TIMING CHART FOR BALL BOUNCE EXTREME EXTREME Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Lecture 10 Slide 18 6.837 Fall 2003

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. Squash & Stretch in Luxo Jr.'s Hop Image adapted from: Lasseter, John. "Principles of Traditional Animation applied to 3D Computer Animation." ACM SIGGRAPH Computer Graphics 21, no. 4 (July 1987): 35-44. Lecture 10 Slide 19 6.837 Fall 2003

Articulated Models Articulated models: rigid parts connected by joints They can be animated by specifying the joint angles as functions of time. q i q t i () t 1 t 2 t 1 t 2 Lecture 10 Slide 20 6.837 Fall 2003

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 10 Slide 21 6.837 Fall 2003

Skeleton Hierarchy Each bone transformation described relative to the parent in the hierarchy: xh, yh, zh, θh, φh, σh θt, φt, σt hips left-leg... r-thigh θ c y r-calf θ, φ v s f f x r-foot z Derive world coordinates for an effecter with local coordinates? v w v s Lecture 10 Slide 22 6.837 Fall 2003

Forward Kinematics xh, yh, zh, θh, φh, σh θt, φt, σt Transformation matrix for an effecter v s is a matrix composition of all joint transformation between the effecter and the root of the hierarchy. θ c y θ f, φ f v s v w = T( x, y, z ) R( θ, φ, σ ) z v s h h h h h h x TR( θφσ,, t t t )TR( θ ) TR ( θ, φ c ) v θ φ σ θ φ σ θ θ φ w=s x h, y, z,,,,,,,,, v =S( p) v 14444444244444443 p h h h h h t t t c f f s s Lecture 10 Slide 23 6.837 Fall 2003 f f v s

Inverse Kinematics Forward Kinematics Given the skeleton parameters (position of the root and the joint angles) p and the position of the 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 position of the effecter in local coordinates v s and the desired position ṽ w in world coordinates, what are the skeleton parameters p? S ( p) v s xh, yh, zh, θh, φh, σh θt, φt, σt θ c Much harder requires solving the inverse ( ) = % of the non-linear function: p? such that S p v s vw Underdetermined problem with many solutions θ f, φ f v s v% w Lecture 10 Slide 24 6.837 Fall 2003

Real IK Problem Find a natural skeleton configuration for a given collection of pose constraints. Definition: A scalar objective function g(p) measures the quality of a pose. The objective g(p) reaches its minimum for the most natural skeleton configurations p. Definition: A vector constraint function C(p) = 0 collects all pose constraints: S ( ) % 0 p v 0 v 0 S ( ) % 1 p v1 v1 = 0 M 1442443 C ( p) Lecture 10 Slide 25 6.837 Fall 2003

Optimization Compute the optimal parameters p * that satisfy pose constraints and maximize the natural quality of skeleton configuration: Example objective functions g(p): deviation from natural pose: g ( p) = p p T M( p p) joint stiffness power consumption * p = argmin g( p) p s.t. C ( p) = 0 ( ) Lecture 10 Slide 26 6.837 Fall 2003

Unconstrained Optimization Define an objective function f(p) that penalizes violation of pose constraints: Necessary condition: f ( p) = g ( p) + wi Ci( p) * p = argmin f ( p) p i * * * f ( p + p) f ( p ) 0 ( p is local minimum) * T f ( p ) p + L 0 (Taylor series) * f ( p ) = 0 ( p is arbitrary) 2 Lecture 10 Slide 27 6.837 Fall 2003

Numerical Solution Gradient methods Guess initial solution x 0 T Iterate xk+ 1 = xk + αkdk, αk > 0, f ( xk) dk < 0 Until f ( x k ) = 0 T The conditions α k > 0, f ( xk) dk < 0 guarantee that each new iterate is more optimal f ( x ) f ( x ). Derive? k+ 1 < k Some choices for direction d k : Steepest descent g C i dk = f ( xk) = 2 wici p p 2 Newton s method d k = f ( xk) f ( xk) Quasi-Newton methods dk = Dk f ( xk) 1 i Lecture 10 Slide 28 6.837 Fall 2003

Gradient Computation Requires computation of constraint derivatives: Compute derivatives of each transformation primitive Apply chain rule Example: C ( p) T( x, y, z ) R( θ, φ, σ ) TR( θ, φ, σ ) TR( θ ) TR( θ, φ ) v v h h h h h h t t t c f f s w C R( θ ) = c T( x, y, z ) R( θ, φ, σ ) TR( θ, φ, σ ) T TR( θ, φ ) v θ θ c h h h h h h t t t f f s c R( θc ) Derive if R is a rotation around z-axis? θ c Lecture 10 Slide 29 6.837 Fall 2003

Constrained Optimization Unconstrained formulation has drawbacks: Sloppy constraints The setting of penalty weights w i must balance the constraints and the natural quality of the pose Necessary condition for equality constraints: Lagrange multiplier theorem: f ( p * ) + λ ( * i Ci p ) = 0 λ 0, λ 1, are scalars called Lagrange multipliers Interpretations: i Cost gradient (direction of improving the cost) belongs to the subspace spanned by constraint gradients (normals to the constraints surface). Cost gradient is orthogonal to subspace of feasible variations. Lecture 10 Slide 30 6.837 Fall 2003

Example * p = argmin p + p p 1 2 2 2 s.t. p + p = 2 1 2 f ( p ) = 1 * 1 * 2 C( p ) = 2 Lecture 10 Slide 31 6.837 Fall 2003

Nonlinear Programming Use Lagrange multipliers and nonlinear programming techniques to solve the IK problem: * p = argmin g( p) nonlinear objective p } s.t. C ( p) = 0 nonlinear constraints In general, slow for interactive use! Lecture 10 Slide 32 6.837 Fall 2003

Differential Constraints Differential constraints linearize original pose constraints. Rewrite constraints by pulling the desired effecter locations to the right hand side Construct linear approximation around the current parameter p. Derive with Taylor series. ( ) ( ) S % 0 p v 0 v 0 = S % 1 p v1 v 1 M M 14243 C ( p) C( p) p = v% p Lecture 10 Slide 33 6.837 Fall 2003

IK with Differential Constraints Interactive Inverse Kinematics User interface assembles desired effecter variations Solve quadratic program with Lagrange multipliers: * T p = argmin p M p p C( p) s.t. p = v% p % v Update current pose: Objective function is quadratic, differential constraints are linear. Some choices for matrix M: p + = + α * k pk k p Identity: minimizes parameter variations Diagonal: minimizes scaled parameter variations 1 Lecture 10 Slide 34 6.837 Fall 2003

Quadratic Program Elimination procedure Apply Lagrange multiplier theorem and convert to vector notation: general form in scalar notation: f ( p * ) + λ ( * i Ci p ) = 0 Rewrite to expose p: i Use this expression to replace p in the differential constraint: Solve for Lagrange multipliers and compute p * C( p) M p + λ = 0 p 1 C( p) T p = M p C( p) 1 C( p) T M p p T λ λ = v% Lecture 10 Slide 35 6.837 Fall 2003

Kinematics Kinematics vs. Dynamics Describes the positions of body parts as a function of skeleton parameters. Dynamics Describes the positions of body parts as a function of applied forces. Lecture 10 Slide 36 6.837 Fall 2003

Next Dynamics ACM 1988 Spacetime Constraints Lecture 10 Slide 37 6.837 Fall 2003