keyframe animation
play

Keyframe animation 2. A period of blackness between images - PowerPoint PPT Presentation

Oldest keyframe animation Two conditions to make a moving image in 19th century 1. Higher than 10 frames per second Keyframe animation 2. A period of blackness between images Phenakistiscope Zoetrope Praxinoscope 2D animation 3D animation


  1. Oldest keyframe animation Two conditions to make a moving image in 19th century 1. Higher than 10 frames per second Keyframe animation 2. A period of blackness between images Phenakistiscope Zoetrope Praxinoscope 2D animation 3D animation Animators specify important keyframes in 3D Highly skilled animators draw the keyframes Computers generates the in-between frames Less skilled (lower paid) animators draw the in- between frames Some dynamic motion can be done by computers (hair, clothes, etc) Difficult to create physically realistic animation Still time consuming; Pixar spent four years to Time consuming process produce Toy Story

  2. From the making of toy story General pipeline Story board Keyframes Inbetweens Painting Storyboards Story boarding from “a bug’s life” The film in outline form specify the key scenes specify the camera moves and edits specify character gross motion Typically paper and pencil sketches on individual sheets taped on a wall http://www.pixar.com/featurefilms/ab � behind_pop4.html

  3. The process of keyframing A keyframe Specify the keyframes Specify the type of interpolation In 2D animation, a keyframe is usually a single image linear, cubic, parametric curves Specify the speed profile of the interpolation In 3D animation, each keyframe is defined by a set of parameters constant velocity, ease-in-ease-out, etc Computer generates the in-between frames Keyframe parameterization in-between frames What are the parameters? Position and orientation in 3D Joint angles of the hierarchy Body deformation Linear interpolation Facial features Cubic curve interpolation Hair Clothing Scene elements such as lights and cameras

  4. Linear interpolation Cubic curve interpolation Linearly interpolate the parameters between keyframes We can use three cubic functions to represent a 3D curve Each function is defined with the range 0 ≤ t ≤ 1 bold: a vector or a matrix Q ( t ) = [ x ( t ) y ( t ) z ( t )] t = 5 t = 10 italic: a scalar or vectors Q x ( t ) = a x t 3 + b x t 2 + c x t + d x a · b : inner product t = 0 t = 15 a × b : outer product end key start key Q y ( t ) = a y t 3 + b y t 2 + c y t + d y ab : multiplication x = x 0 + t − t 0 ( x 1 − x 0 ) matrices Q z ( t ) = a z t 3 + b z t 2 + c z t + d z t 1 − t 0 multiplication A · B : multiplication AB : end time start time Compact representation Constraints on the cubics   a x a y a z How many constraints do we need to determine a cubic b x b y b z   � � t 3 t 2 C = T = 1 curve? 4 t   c x c y c z   d x d y d z Redefine C as a product of the basis matrix M and the   a x a y a z geometry vector G b x b y b z � t 3 t 2 �   Q ( t ) = 1  = TC t   c x c y c z C = M · G  d x d y d z     m 11 m 12 m 13 m 14 G 1 x G 1 y G 1 z � t 3 m 21 m 22 m 23 m 24 G 2 x G 2 y G 2 z     Q ( t ) = t 2 1 � t     m 31 m 32 m 33 m 34 G 3 x G 3 y G 3 z d     ˙ � 3 t 2 � dt Q ( t ) = 2 t 1 0 m 41 m 42 m 43 m 44 G 4 x G 4 y G 4 z Q = C = T · M · G

  5. Hermite curves Hermite basis matrix A Hermite curve is determined by Given desired constraints: P 4 R 4 1. endpoints meet P 1 and P 4 1. endpoints P 1 and P 4 P 1 � � R 1 Q (0) = 0 0 0 1 · M h · G h = P 1 2. tangent vectors R 1 and R 4 at the endpoints � � Q (1) = 1 1 1 1 · M h · G h = P 4 2. tangent vectors meet R 1 and R 4 Use these elements to construct the geometry vector � � Q � (0) = 0 0 1 0 · M h · G h = R 1   P 1 x P 1 y P 1 z Q � (1) = � � P 4 x P 4 y P 4 z 3 2 1 0 · M h · G h = R 4   G h =   R 1 x R 1 y R 1 z   R 4 x R 4 y R 4 z Hermite basis matrix Hermite Blending functions We can solve for basis matrix M h Let’s define B as a product of T and M  2 − 2 1 1      P 1 0 0 0 1 − 3 3 − 2 − 1   � t 3 t 2 1 � B h ( t ) = t P 4 1 1 1 1   0 0 1 0        = G h =  · M h · G h     1 0 0 0 R 1 0 0 1 0   R 4 3 2 1 0 B h ( t ) indicates the weight of each element in G h B h ( t ) − 1     0 0 0 1 2 − 2 1 1 P 1 P 4   P 1 1 1 1 1 − 3 3 − 2 − 1     M h = = P 4     0 0 1 0 0 0 1 0   Q ( t ) = B h ( t ) ·       R 1   3 2 1 0 1 0 0 0 R 4 R 1 t R 4

  6. Bézier curves Bézier basis matrix Indirectly specify tangent vectors by specifying two Establish the relation between Hermite and Bezier intermediate points geometry vectors R 1 P 3 R 1 = 3( P 2 − P 1 ) P 4 P 2 R 4 = 3( P 4 − P 3 )       P 1 1 0 0 0 P 1 P 1 R 4 P 4 0 0 0 1 P 2       G h =  = M hb · G b  =       R 1 P 3 − 3 3 0 0     R 4 P 4 0 0 − 3 3   P 1 P 2   G b =   P 3   P 4 Bézier basis matrix Bézier blending functions Bezier blending functions are also called Bernstein polynomials Q ( t ) = T · M h · G h = T · M h · ( M hb · G b )   − 1 3 − 3 1 = T · ( M h · M hb ) · G b = T · M b · G b 3 − 6 3 0 � t 3 t 2 �   B b ( t ) = 1 t   − 3 3 0 0   1 0 0 0   − 1 3 − 3 1 B b ( t ) 3 − 6 3 0   M b = M h M hb =     − 3 3 0 0 P 1 P 1 P 4   P 2 1 0 0 0   Q ( t ) = B b ( t ) · P 2 P 3   P 3   P 4 http://www.cs.unc.edu/~mantler/research/bezier/index.html t

  7. Complex curves Splines A piecewise polynomial function that has locally What if we want to model a curve that passes through these points? very simple form, yet be globally flexible and smooth There are three nice properties of splines we’d like to have Problem with higher order polynomials: Continuity Wiggly curves Local control No local control Interpolation Continuity Continuity C 0 : points coincide, velocities don’t Cubic curves are continuous and differentiable C 1 : points and velocities coincide We only need to worry about the derivatives at the endpoints when two curves meet What’s C 2 ? points, velocities and accelerations coincide

  8. Local control Interpolation Bezier and Hermite curves don’t have local control; Bezier curves do not necessarily pass through all moving a single control point affects the whole the control points curve We’d like to have a spline interpolating the control We’d like to have each control point on the spline points so that the spline always passes through only affect some well-defined neighborhood around every control points that point B-splines Continuity in B-splines Suppose we want to join two Bezier curves ( V 0 , V 1 , V 2 , V 3 ) and ( W 0 , W 1 , W 2 , W 3 ) so that C 2 continuity is met at the joint V 1 W 1 V 2 W 2 We can join multiple Bezier curves to create B- splines V 0 W 3 V 3 W 0 Ensure C 2 continuity when two curves meet Q v (1) = Q w (0) V 3 = W 0 Q � v (1) = Q � w (0) V 3 − V 2 = W 1 − W 0 Q �� v (1) = Q �� w (0) V 1 − 2 V 2 + V 3 = W 0 − 2 W 1 + W 2 W 2 = V 1 + 4 V 3 − 4 V 2

  9. Continuity in B-splines de Boor points What does this derived equation mean geometrically? Instead of specifying the Bezier control points, let’s specify the corners of the frames that forms a B-spline W 2 = V 1 + 4 V 3 − 4 V 2 What is the relationship between a, b and c, if a = 2b - c? V 1 W 0 = V 3 V 2 B 1 W 1 = 2 V 3 − V 2 W 2 = V 1 + 4 V 3 − 4 V 2 V 3 = W 0 = 2(2 V 3 − V 2 ) − (2 V 2 − V 1 ) W 1 V 0 These points are called de Boor points and the frames are W 3 = 2 W 1 − B 1 called A-frames What is B 2 ? W 2 de boor points B-spline basis matrix What is the relationship between Bezier control points and   B 1 de Boor points? B 2 � t 3 t 2 �   Q ( t ) = 1 t M bs   B 3   V 0 = 1 � B 0 + 2 3( B 1 − B 0 ) + B 1 + 1 � B 4 3( B 2 − B 1 ) 2 V 1 = B 1 + 1 3( B 2 − B 1 )   − 1 3 − 3 1 V 2 = B 1 + 2 M bs = 1 3 − 6 3 0   3( B 2 − B 1 )   − 3 0 3 0 6   1 4 1 0 V 3 = 1 � B 1 + 2 3( B 2 − B 1 ) + B 2 + 1 � 3( B 3 − B 2 ) 2 Verify this by yourself http://www.engin.umd.umich.edu/CIS/course.des/cis577/projects/BSP/welcome.html

  10. B-Spline properties B-Spline properties C 2 continuity? C 2 continuity? Local control? Local control? Interpolation? Interpolation? Catmull-Rom splines Catmull-Rom splines D 0 = C 1 − C 0 C 3 If we are willing to sacrifice C 2 continuity, we can D 1 = 1 C 1 2( C 2 − C 0 ) get interpolation and local control D 1 D 2 = 1 D 0 If we set each derivative to be a constant multiple of 2( C 3 − C 1 ) D 2 C 0 the vector between the previous and the next C 2 . . controls, we get a Catmull-Rom spline . D n = C n − C n − 1

  11. Catmull-Rom Basis matrix CATmull-Rom properties     − 1 3 − 3 1 P 1 C 2 continuity? � 1 2 − 5 4 − 1 P 2     � t 3 t 2 1 Q ( t ) = t     2 − 1 0 1 0 P 3     Local control? 0 2 0 0 P 4 Interpolation? Derive Catmull-Rom basis matrix by yourself CATmull-Rom properties C 2 interpolating splines How can we keep the C 2 continuity of B-splines but get interpolation property as well? C 2 continuity? Suppose we have a set of Bezier control points, our goal is to find a C 2 spline that that passes through Local control? all the points Interpolation? C 2 C 1 C 0 C 3

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend