110/27/ :47 Graphics II Animation Introduction and Motion Control Session 6
210/27/ :47 Animation 0 Traditional 2D animation -Origins in late 1920s -Flat shading -Illusion of 3D produced by fluidity of characters, use of perspective, motion of “virtual camera” -Disney animators pioneered major techniques =“Squash and stretch” =Secondary action =Appeal
310/27/ :47 Advantages of Computer Animation 0 Eliminates requirements of building models 0 No restriction on camera movement 0 Easy inclusion of shading models 0 Can introduce physical models
410/27/ :47 Animation Taxonomy 0 Representational animation -Rigid objects =Single, unchanging model for each object -Articulated objects =Rigid subobjects, connected at joints =Motions generally revolute -Soft objects =Model is deformed 0 Procedural animation 0 Stochastic animation 0 Behavioral animation
510/27/ :47 Motion Control: Keyframing In computer graphics animation, keyframe -> key parameter. Therefore selection of the parameter becomes critical in defining appropriate motion. Interpolating angle Interpolating endpoints
610/27/ :47 Motion control of rigid objects Parameterization of position Rigid Objects Articulated Objects Soft Objects Position Orientation
710/27/ :47 Spline-driven Position Animation Q(u) Equal arc length, s Equal u
810/27/ :47 Arclength Parameterization of Splines Eval. Spline s u s Evaluate numerically (arc length along spline) Spline parameter s x,y,z
910/27/ :47 Arclength Parameterization of Splines Arclength along spline: z x y Integrating gives:
1010/27/ :47 Arclength Parameterization of Splines General form of Cubic Spline: Taking the derivatives and integrating: Where: This function will not integrate analytically, so integration must be done numerically.
1110/27/ :47 Forward Differencing Approach to Evaluating A Where:
1210/27/ :47 Ease-in, ease-out motion Arc length no longer proportional to time Q(t) Equal t
1310/27/ :47 Velocity Curves t s Velocity Curve t u Bisection Search Eval. Cubic t u s
1410/27/ :47 Velocity Curves s 3 Position Spline t s 1 2 Velocity Curve
1510/27/ :47 Velocity Curves Position Spline t s Velocity Curve Equal time Intervals Gentle Acceleration from Rest Gentle deceleration to Rest
1610/27/ :47 General Kinetic Control (Steketee & Badler 1985) 0 “Position Spline” -Let the motion parameter to be interpolated be. is specified at n key values,. The position spline is constructed by assigning a keyframe number to each key value and interpolating through the resulting tuples: 0 “Kinetic Spline” -Each keyframe number is assigned a time. The kinetic spline interpolates through the resulting pairs:
1710/27/ :47 Parameterization of Orientation: Euler Angles x y z x y z x y z Transformation:
1810/27/ :47 Multiple Ways to Define Rotation with Euler Angles Rx -> Ry -> Rz Rx -> Rz -> Ry Ry -> Rx -> Rz Ry -> Rz -> Rx Rz -> Rx -> Ry Rz -> Ry -> Rx Possible Orderings:
1910/27/ :47 Problems with Euler Angle Parameterization: Gimbal Lock x y z x y z x y z x’ Selecting a rotation about y removes a degree of freedom.
2010/27/ :47 Problems with Euler Angle Parameterization: Interpolation y x z y x z X roll
2110/27/ :47 Problems with Euler Angle Parameterization: Interpolation y x z y x z y x z
2210/27/ :47 Problems with Euler Angle Parameterization: Interpolation Picture from p. 359 Case 1: Case 2: Generating Interpolated Orientations: Case 1 Case 2
2310/27/ :47 Alternate Approach to Parameterizing Arbitrary Orientation Replace Euler angles with a single angle of rotation about an axial direction defined by the unit vector, n.
2410/27/ :47 Quaternions i j k A quaternion is made up of a scalar plus a vector: We use the notation: Multiplication is defined:
2510/27/ :47 Quaternions Take a pure quaternion (one that has no scalar part): And a unit quaternion: Define:
2610/27/ :47 Moving in and out of Quaternion Space Converts to the transformation matrix: The quaternion:
2710/27/ :47 Interpolating Between Two Quaternions Where:
2810/27/ :47 Interpolating Examples
2910/27/ :47 Interpolating Examples, contd. Pictures from page 367