Introduction to Animation, Key-Frame Animation, Kinematics, Motion Capture
Total Page:16
File Type:pdf, Size:1020Kb
What is Animation? Generate perception of motion with sequence of images shown in rapid succession EECS 487: Interactive • humans “see” smooth motion at 12−70 fps Must be technically excellent, but more importantly, aesthetically, emotionally compelling Computer Graphics • violation of realism may at times be desirable Animation “pipeline”: Lecture 33: • Introduction to animation • Key-frame character animation • Inverse kinematics and motion capture McMillan,O’Brien Traditional Animation Computer Animation 2D animation: 1. Straight ahead: draw each frame, • CADrawing and painting are now routine one frame at a time • but 2D in-betweening (morphing) • lead to spontaneity is hard to get right • great control Instead, we assume 3D model of scene • tedious: 24 fps, 1,440 frames/minute, • for each scene, vary parameters to generate 130K frames for a 1.5 hour movie desired pose for all objects 2. Pose-to-pose (developed by Walt Disney): • stop-motion: shooting miniature physical • director plans shots using storyboards models frame by frame • senior artists sketch key poses (keyframes) • typically when motion changes • interns fill in the in-between frames • all line drawings are painted on cels • composed in layers • background changes infrequently, can be reused • photograph finished cel-stack onto film Yu,Marschner,Durand,Hodgins Some Artistic Considerations Principles of Traditional Animation Eleven principles of traditional Goal: make characters that move in animation compiled by Lasseter: a convincing way to communicate 1. Squash and stretch personality and emotion 2. Slow in, slow out Many of these principles Animation principles developed by 3. Timing follow indirectly from Disney in the 20’s−30’s, adapted by 4. Anticipation physics, e.g., CG animators, e.g., Lasseter of 5. Follow through anticipation, follow- Pixar (now Disney) 6. Overlapping action through, and many other 7. Secondary action effects can be produced The most important source of 8. Arcs traditional animation principles is by simply minimizing 9. Exaggeration the book by Thomas and Johnston, physical energy, but 10. Appeal Disney Animation: The Illusion of Life exaggerated 11. Staging Marschner Squash and Stretch and Slow In/Out Timing of Motion Squash and stretch Timing can completely change the • rigidity/softness via distortion during motion interpretation of motion • pseudo-physics: carrying momentum • increase the sense of speed Time spent on action affects perception • try to keep the volume constant • timing indicates weight Comet • speed determines emotion Slow in and out • an extreme pose can be emphasized by slowing down as you get to it Since timing is so critical, animators (and as you leave it) • in practice, many things do not move usually draw a time scale next to abruptly but start and stop gradually keyframes to indicate how to generate • pseudo-physics: overcoming inertia the in-between frames no fx squash/stretch squash/stretch +slow in/out only Owen Maestri Actions do not end abruptly Anticipation Follow Through • hand continues to move after throwing a ball: inertia An action can be divided into three: and Overlapping • audience likes to see resolution • anticipation of action • action Action • discontinuities are unsettling • reaction • the termination of an action Anatomical motivation: a muscle anticipates the next must extend before it can contract • overlaps indicate intentions Prepares audience for an action • don’t surprise the audience • direct their attention to what’s important Amount of anticipation can affect perception of speed and weight Comet Secondary Actions and Arcs Exaggeration and Appeal Use secondary actions to Exaggeration increase complexity of • get to the heart of the idea and emphasize it so the audience can see it scene, but it should not • choose which properties to exaggerate interfere with the primary action Appeal • the character must interest the audience Avoid straight lines since most • it doesn't have to be cute and cuddly things in nature move in arcs • design, simplicity, behavior Comet all affect appeal • avoid perfect symmetries • example: Luxo, Jr. was made to appear childlike freetoon.com Staging What is Animation? Present the idea so that it is unmistakably clear • audience can only focus on one thing at a time: Make objects change over time main object should be contrasted • stage action in silhouette Key technical problems are how to specify, • in dialogue, characters should face ¾ towards generate, and manipulate motion the camera, not right at each other Four alternatives: good bad 1. brute force: model each frame 2. key-frame animation: • key poses specified by hand • or poses recorded by motion capture • interpolate in-between frames comet-cartoons.com/3ddocs/charanim/ Durand What is Animation? Key-frame Character Animation 3. procedural/behavioral: Two approaches: describe motion algorithmically 1. blend shapes or morph targets • local rules, global emergent behavior: boids, 2. rigged characters or articulated brain-spring models • procedural texture: crack propagation in glass or concrete, metallic patina, stone aging, water Blend shapes: flow and rust • a very simple surface control scheme 4. physical simulation: • no skeleton motion according to physical laws • based on interpolating (tweening) among several key poses • particle systems for fire, smoke • given a number of base meshes, combine • mass-spring damper arrays for fluttering cloth them with time-dependent coefficients • fluid simulation Durand Marschner Blend Shapes Rigged Character Setup: • user provides key shapes with a position (pij) for every control To support more complex character point i in shape j animation, models are often based on • k w for each frame user provides a weight j,k for each key shape jointed skeletons (articulated models) (∑jwj,k = 1), i.e., how much each key shape affects frame k • the shape for frame k can be computed from the control points: p w p ik = ∑j j,k ij Kinematics: the study of movement of Works well for relatively small motions articulated models • runs in real time, e.g., as vertex shader • began in the mechanical engineering of robots • often used for facial animation • popular for games The skeleton can be fleshed out in any way, e.g., with mesh skinning • skin deforms following bone movements Marschner Marschner, Gillies Articulated Model Degrees of Freedom (DoFs) hip Setup: • rigid parts: each link (bone) in the thigh articulated chain (skeleton) is rigid Hinge/pin joint: 1 DoF • not physically accurate, but rigid • knee or elbow joint skeleton constrains movement knee • connected by joints: movement is constrained by the degree of Saddle: 2 DoFs • wrist/hand joints shin freedom at each joint Can be animated by specifying ankle the joint angles as functions of foot Ball/socket joint: 3 DoFs time • hip, shoulder, neck Gillies Marschner, Gillies Key-frame Animation Key-frame Animation With the character rigged, next specify Steps: key poses at specific time steps: • each pose controlled by a set of 1. character modeling: design the geometry variables: joint angles, positions, etc. 2. character rigging: set up a bunch of parameters • each variable changes as a function of time Key frames (created first) • joint angles, positions, etc. • for each variable, specify its key value at 3. set up key-framing “important” or key frames • specify key values of parameters at specific times • in-between frames will be created by • by forward kinematics interpolating these key values • by inverse kinematics • more generally, each variable may have • incl. motion capture a different set of key frames Time • specify an interpolation for the in-between values Durand,O’Brien Yu Straight ahead order of frame creation Forward Kinematics Hierarchical Modeling hip Could animate by moving every control point (joint) Calculate the position and orientation at every key frame: tedious, hard to get smooth, thigh of a limb’s end point (end effector) as consistent motion a function of the angles of all joints: φ p = f(Θ) Animation need to be controlled at a higher level: knee where: • “bend elbow” instead of p: position of end effector • “move left forearm one square inch” Θ: angles, positions, … of joints ϕ Model objects as a hierarchy of components shin ⎡ ⎤ ⎡ ⎤ px g(φ,ϕ,θ) • encodes topology (what’s connected to what) For example: ⎢ ⎥ = ⎢ ⎥ p h(φ,ϕ,θ) • specifies geometric relations from joints: foot ⎢ y ⎥ ⎣⎢ ⎦⎥ ankle ⎣ ⎦ tree structure θ p • each component defined relative to parent • independent of display geometry Yu Marschner,Gillies,Yu, Hodgins,Durand Moving Components Embedding Transformations Define a coordinate system at the top of the To draw an object, traverse its hierarchical model hierarchy and at each joint Two types of nodes: • object nodes: draw them (may include attributes) Each joint is thus a separate frame of reference, • transform nodes: with its own local coordinate system • multiply into Current Matrix on the way down • remove from Current Matrix on the way up Each local coordinate system is defined in the constantly changing local coordinate system coordinate system of the previous frame Allows changes at different scales We can express positions frame i • apply rotation above “Upper Body” and directions for frame i • vs. rotation above “L Arm” in the coordinate system of link i Be careful about transformation order frame i−1 by a matrix • (usually) scale before rotate transformation link i-1 • (usually) rotate before translate frame i-1 Gillies Yu Use OpenGL Matrix Stack Example human() human’s center