1KinematicsTom FunkhouserPrinceton UniversityC0S 426, Fall 2006Computer Animation• What is animation? Make objects change over time according to scripted actions• What is simulation? Predict how objects change over timeaccording to physical lawsUniversity of IllinoisPixarComputer AnimationPixarComputer Animation• Animation pipeline 3D modeling Motion specification Motion simulation Shading, lighting, & rendering PostprocessingPixarComputer Animation• Animation pipeline 3D modeling Motion specification Motion simulation Shading, lighting, & rendering PostprocessingPixarOutline• Articulated figures • Keyframe animation• Kinematics• Dynamics• GuidelinesAngel Plate 12Articulated Figures• Character poses described by set of rigid bodies connected by “joints”Angel Figures 8.8 & 8.9BaseArmHandScene GraphArticulated FiguresRose et al. `96• Well-suited for humanoid charactersRootLHipLKneeLAnkleRHipRKneeRAnkleChestLCollarLShldLElbowLWristLCollarLShldLElbowLWristNeckHeadArticulated FiguresMike Marr, COS 426, Princeton University, 1995• Joints provide handles for moving articulated figureOutline• Articulated figures Keyframe animation• Kinematics• Dynamics• GuidelinesAngel Plate 1Keyframe Animation• Define character poses at specific time stepscalled “keyframes”Lasseter `87Keyframe Animation• Interpolate variables describing keyframes to determine poses for character “in-between”Lasseter `873Keyframe Animation• Inbetweening: Linear interpolation - usually not enough continuityH&B Figure 16.16 Linear interpolationKeyframe Animation• Inbetweening: Spline interpolation - maybe good enoughH&B Figure 16.11 Keyframe Animation• Inbetweening: Cubic spline interpolation - maybe good enough» May not follow physical lawsLasseter `87 Keyframe Animation• Inbetweening: Cubic spline interpolation - maybe good enough» May not follow physical lawsLasseter `87 Example: Walk Cycle• Articulated figure:Watt & Watt Example: Walk Cycle• Hip joint orientation:Watt & Watt4Example: Walk Cycle• Knee joint orientation:Watt & Watt Example: Walk Cycle• Ankle joint orientation:Watt & Watt Example: RobotMihai Parparita, COS 426, Princeton University, 2003Example: Ice Skating(Mao Chen, Zaijin Guan, Zhiyan Liu, Xiaohu Qie,CS426, Fall98, Princeton University)Outline• Articulated figures • Keyframe animation Kinematics• Dynamics• GuidelinesAngel Plate 1Animating Motion• Kinematics Considers only motion• Dynamics Considers underlying forces Compute motion from initial conditions and physics5Example: 2-Link Structure• Two links connected by rotational jointsΘ1Θ2X = (x,y)21(0,0)“End-Effector”Forward Kinematics• Animator specifies joint angles: Θ1 and Θ2• Computer finds positions of end-effector: X))sin(sin),cos(cos(2121121211Θ+Θ+ΘΘ+Θ+Θ= llllXΘ1Θ2X = (x,y)21(0,0)Forward Kinematics• Joint motions can be specified by spline curvesΘ1Θ2X = (x,y)21(0,0)Θ2Θ1tForward Kinematics• Joint motions can be specified by initial conditions and velocitiesΘ1Θ2X = (x,y)21(0,0)1.02.1250)0(60)0(2121−=Θ=Θ=Θ=ΘdtddtdExample: 2-Link Structure• What if animator knows position of “end-effector”Θ1Θ2X = (x,y)21(0,0)“End-Effector”Inverse Kinematics• Animator specifies end-effector positions: X• Computer finds joint angles: Θ1 and Θ2:xllylyllxl))cos(())sin(())cos(()sin((22122221221Θ++ΘΘ++Θ−=ΘΘ1Θ2X = (x,y)21(0,0) −−+=Θ−2122212212cosllllxx26Inverse Kinematics• End-effector postions can be specified by spline curvesΘ1Θ2X = (x,y)21(0,0)yxtInverse Kinematics• Problem for more complex structures System of equations is usually under-defined Multiple solutionsΘ1Θ221(0,0)X = (x,y)3Θ3Three unknowns: Θ1, Θ2 , Θ3Two equations: x, yInverse Kinematics• Solution for more complex structures: Find best solution (e.g., minimize energy in motion) Non-linear optimizationΘ1Θ221(0,0)X = (x,y)3Θ3Example: Ball BoyFujito, Milliron, Ngan, & SanockiPrinceton University“Ballboy”Example: Toy Story IIPixarSummary of Kinematics• Forward kinematics Specify conditions (joint angles) Compute positions of end-effectors• Inverse kinematics “Goal-directed” motion Specify goal positions of end effectors Suitable for in-betweeningInverse kinematics provides easier specification for many animation tasks,but it is computationally more difficultInverse kinematics provides easier specification for many animation tasks,but it is computationally more difficult7Outline• Articulated figures • Keyframe animation• Kinematics DynamicsAngel Plate 1Dynamics• Simulation of physics insures realism of motionLasseter `87Spacetime Constraints• Animator specifies constraints: What the character’s physical structure is» e.g., articulated figure What the character has to do» e.g., jump from here to there within time t What other physical structures are present» e.g., floor to push off and land How the motion should be performed» e.g., minimize energySpacetime Constraints• Computer finds the “best” physical motion satisfying constraints• Example: particle with jet propulsion x(t) is position of particle at time t f(t) is force of jet propulsion at time t Particle’s equation of motion is: Suppose we want to move from a to b within t0to t1 with minimum jet fuel:0''=−−mgfmxdttftt102)(Minimize subject to x(t0)=a and x(t1)=bWitkin & Kass `88Spacetime Constraints• Discretize time steps:02''211=−− +−=−+mgfhxxxxmiiiii2iifhMinimize subject to x0=a and x1=b21112'''hxxxxhxxxiiiiiii−+−+−=−=Witkin & Kass `88Spacetime Constraints• Solve with iterative optimizationmethodsWitkin & Kass `888Spacetime Constraints• Advantages: Free animator from having to specify details of physically realistic motion with spline curves Easy to vary motions due to new parameters and/or new constraints• Challenges: Specifying constraints and objective functions Avoiding local minima during optimizationSpacetime Constraints• Adapting motion:Witkin & Kass `88Heavier BaseOriginal JumpSpacetime Constraints• Adapting motion:Witkin & Kass `88HurdleSpacetime Constraints• Adapting motion:Witkin & Kass `88Ski JumpSpacetime Constraints• Advantages: Free animator from having to specify details of physically realistic motion with spline curves Easy
View Full Document