ANIMATION
Overview Animation is a big topic We will concentrate on character animation as is used in many games today humans, animals, monsters, robots, etc.
Character Representation A character is represented as a hierarchy of transforms (the skeleton) 4x4 transformation matrices with parent/child relationships called a bone, joint, or node A particular configuration of a skeleton is called a pose the state of a skeleton at a particular time of animation
A Character Plazmo and his hierarchy
Skeletal Animation The matrices that define the orientation of each joint are changed over time to produce motion. A bundle of motion data that defines a particular moment in time is a frame. Motion data comes from a variety of sources.
Motion Data Procedural algorithmically generated e.g. dynamics simulation, inverse kinematics Key framed important frames are recorded motion is reproduced through interpolation (tweening) of key frames Hybrid combines both procedural and key framed elements e.g. key framed character with head tracking
Key framing Ways to generate key frames created by an animator with an animation tool (e.g. Maya, SoftImage, Max) motion capture acquired through sampling motion of actor(s) wearing sensors requires extensive cleanup before use procedural e.g. sampling a complex cloth simulation generated offline
Interpolation A frame of animation data is usually generated via interpolation of key frames Two commonly used methods: Linear Cubic
Interpolation Cont d Linear interpolation is simple to implement and efficient need many key frames to record complex motion motion can look robotic Cubic interpolation can reproduce more complex motion with fewer key frames memory savings more expensive to evaluate more natural looking motion
Interpolation Cont d Interpolating orientation poses special problems which way to interpolate? usually we choose the shortest arc problems with rotations near 180 o Euler angle representation orientations are not unique gimble lock quaternions interpolate nicely larger to store
Root Node Handling Consider a slam dunk animation for a basketball game the AI wishes to initiate the dunk from different distances from the basket the hands must be able to grab the rim for different height players the feet must not slip the motion should be fluid at all times the feel of the animation created by the artist should be maintained How do we solve this?
Root Node Handling The root of a character s hierarchy establishes its position in space It is the handle that is used to manipulate the position and orientation of the character Control of the root node is an essential concern to the AI
Root Node Handling Idea #1: Root node controlled by AI character is animated in place AI is responsible for motion advantages: high degree of control by the AI problems: motion is complex to simulate simple linear velocity looks bad foot registration is lost AI programmer intent doesn t always match animator intent
Root Node Handling Idea #2: Root node controlled by animation root node motion created by animator AI reads root node displacement from motion data character position, orientation updated from this displacement advantages: intended feel of motion maintained footsteps registration more data driven
Root Node Handling Problems: hard to align animations with objects in the world hard to change speed of animation hard to play animation with different orientations Many systems mix both approaches e.g. The AI uses the run cycle animation to move the character to the correct position for initiation of the dunk animation. Orientation is interpolated to align the character properly to the basket.
Advanced Root Node Handling Idea #3: Animation augmented procedurally root node driven by animation data (idea #2) registration of features constrained by IK basic systems can grasp objects advanced systems can preserve footsteps advantages: hard to maintain balance of character looks good disadvantages: computationally expensive complex
Advanced Root Node Handling Idea #4: Pure procedural animation driven by procedural model forces, collisions, muscles, springs, etc. open research area for characters doesn t work very well works very well for some objects cars, planes, crates, pucks, clothing
Motion Sequencing For each character, the AI maintains the current behavioural state. This state is mapped onto one or more segments of character motion. When the AI changes state, animations should transition appropriately, without popping. This is the job of the animation sequencer.
Motion Sequencing The set of all animations available to a character, plus transition information is stored in a motion graph When the AI requests a new state, the sequencer selects the best transition to move to that state.
Transitions Several ways to splice animations together: cut immediately jump to beginning of new animation instant visual feedback features pop if animations aren t aligned phase align and cut jump to phase-aligned frame of new animation instant visual feedback less popping assumes animations have single, compatible phase value
Transitions wait for alignment and cut play current animation until features align with new animation, then cut introduces lag some animations don t have alignment points glue animations play a special artist-built animation between the current, and new animation look good need a lot of them
Transitions blending cross-fade current and new animation looks good for short transitions long transitions look robotic animations should be similar possible to mix with previous techniques computationally expensive
In Closing Animation systems are a lively research area We've highlighted a few important areas But left out many more! Character animation is tough Trade-off between aesthetics, and control response