1Computer AnimationAdam FinkelsteinPrinceton UniversityCOS 426, Spring 2003AdvertisementComputer Animation• What is animation?o Make objects change over time according to scripted actions• What is simulation?o Predict how objects change over timeaccording to physical lawsUniversity of IllinoisPixar3-D and 2-D animationHomer 3-D Homer 2-DOutline• Principles of animation• Keyframe animation• Articulated figures • Kinematics•DynamicsAngel Plate 1Principles of Traditional Animation• Squash and stretch• Slow In and out• Anticipation• Exaggeration• Follow through and overlapping action• Timing• Staging• Straight ahead action and pose-to-pose action•Arcs• Secondary action• AppealDisney2Principles of Traditional Animation• Squash and stretchLasseter `87Principles of Traditional Animation• Slow In and OutWatt Figure 13.5Principles of Traditional Animation• Anticipation (and squash & stretch)Lasseter `87Principles of Traditional Animation• Squash and stretch• Slow In and out• Anticipation• Exaggeration• Follow through and overlapping action• Timing• Staging• Straight ahead action and pose-to-pose action•Arcs• Secondary action• AppealDisneyComputer AnimationAnimation pipelineo 3D modelingo Articulationo Motion specificationo Motion simulation o Shadingo Lightingo Renderingo Postprocessing» CompositingPixarKeyframe Animation• Define character poses at specific time stepscalled “keyframes”Lasseter `873Keyframe Animation• Interpolate variables describing keyframes to determine poses for character “in-between”Lasseter `87Keyframe Animation• Inbetweening:o Linear interpolation - usually not enough continuityH&B Figure 16.16 Linear interpolationKeyframe Animation• Inbetweening:o Spline interpolation - maybe good enoughH&B Figure 16.11 Keyframe Animation• Inbetweening:o Cubic spline interpolation - maybe good enough» May not follow physical lawsLasseter `87 Keyframe Animation• Inbetweening:o Cubic spline interpolation - maybe good enough» May not follow physical lawsLasseter `87 Keyframe Animation• Inbetweening:o Inverse kinematics or dynamicsRose et al. `964Outline• Principles of animation• Keyframe animation• Articulated figures• Kinematics• Dynamics Angel Plate 1Articulated 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, 1995Joints provide handles for moving articulated figureArticulated Figures• Inbetweeningo Compute joint angles between keyframesWatt & Watt Good arm Bad armExample: Walk Cycle• Articulated figure:Watt & Watt5Example: Walk Cycle• Hip joint orientation:Watt & Watt Example: Walk Cycle• Knee joint orientation:Watt & Watt Example: Walk Cycle• Ankle joint orientation:Watt & Watt Example: Run CycleMike Marr, COS 426, Princeton University, 1995Example: Ice Skating(Mao Chen, Zaijin Guan, Zhiyan Liu, Xiaohu Qie,CS426, Fall98, Princeton University)Outline• Principles of animation• Keyframe animation• Articulated figures• Kinematics• Dynamics Angel Plate 16Kinematics and Dynamics• Kinematicso Considers only motiono Determined by positions, velocities, accelerations•Dynamicso Considers underlying forceso Compute motion from initial conditions and physicsExample: 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−=Θ=Θ=Θ=ΘdtddtdooExample: 2-Link Structure• What if animator knows position of “end-effector”Θ1Θ2X = (x,y)21(0,0)“End-Effector”7Inverse 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)−−+=Θ−2122212212cosllllxx2Inverse Kinematics• End-effector postions can be specified by splines Θ1Θ2X = (x,y)21(0,0)yxtInverse Kinematics• Problem for more complex structureso System of equations is usually under-definedo Multiple solutionsΘ1Θ221(0,0)X = (x,y)3Θ3Three unknowns: Θ1, Θ2 , Θ3Two equations: x, yInverse Kinematics• Solution for more complex structures:o Find best solution (e.g., minimize energy in motion)o Non-linear optimizationΘ1Θ221(0,0)X = (x,y)3Θ3Summary of Kinematics• Forward kinematicso Specify conditions (joint angles)o Compute positions of end-effectors• Inverse kinematicso “Goal-directed” motiono Specify goal positions of end effectorso Compute conditions required to achieve goalsInverse 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 difficultOverview• Kinematicso Considers only motiono Determined by positions, velocities, accelerations•Dynamicso Considers underlying forceso Compute motion from initial conditions and physics8Dynamics• Simulation of physics insures realism of motionLasseter `87Spacetime Constraints• Animator specifies constraints:o What the character’s physical structure is» e.g., articulated figureo What the character has to do» e.g., jump from here to there within time to What other physical structures are present» e.g., floor to push off and lando How the motion should be performed» e.g., minimize energySpacetime Constraints• Computer finds the “best” physical motion satisfying constraints• Example: particle with jet propulsiono x(t) is position of particle at time to f(t) is force of jet propulsion at time to Particle’s equation of motion is:o Suppose we want to move from a to b within t0to t1 with minimum jet fuel:0'' =−− mgfmxdttftt∫102)(Minimize subject to x(t0)=a and x(t1)=bWitkin & Kass `88Spacetime Constraints• Discretize time
View Full Document