Animation

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 28

Video Game Animation

Topics
Goal of computer game animation Animation techniques
Past (2D Animation)
Sprites Morphing Embedding

Present (3D Animation)


Modeling
Articulated Model and Skinning Particle System Deformed Objects

Rendering Animation
Keyframing Inverse Kinematics Motion Capture Procedural Algorithms

Goal
To create a realistic animated game character.

Animation Techniques- Past


Sprites
A sprite is a bitmap image or a series of images. Rapid replacement of sprites with successive images. Sequence of images composite one image per frame. Disadvantage: sprites comes from a fixed library.
Changes to the depth and lighting impossible.

Animation Techniques- Past


Morphing An image is metamorphosed to another image. Provides a clean transition from one picture to another. Expensive and hard to implement.

Animation Techniques- Past


Embedding Objects can be added or removed from a scene. Popular technique for many digital cinema. Difficult to implement for moving scenes.

Animation Techniques- Present


Movement towards 3D animation Problem?
Jointed animated characters Each limb was a rigid object Interpenetration at joints!

Animation Techniques- Present


3D Animation Virtual world where objects and characters can interact with one another. 3 Main components of 3D Animation.
Model, describing the elements of a scene. Animate, specifies how the objects move in the environment. Render, coverts the information (object and their motion) into images.

Animation Techniques
Modeling Articulated Model
Collection of objects connected together by joints. The collection of joints resembles a Hierarchy treelike structure. Moving the elbow would affect the location of the wrists position.

Animation Techniques
Modeling Particle System Collection of points in space. Particles move or collide with each other is decided by a set motion. A set motion is determined by a set of rules, i.e.: The laws of physics. Examples are watersplash, smoke, a flock of birds flying.

Animation Techniques
Modeling Deformable Objects Models similar to articulated but without the defined joints. The structure of the object is too great to implement joints. Examples: water, hair, rocks, ground.

Animation Techniques
Modeling
The diver represents an articulated object The body of water is a deformed object.

The splash of course would be a particle system

Animation Techniques
Rendering The process of generating a visual representation of the objects in 3D animation. Adds the collection of bitmap textures its light attributes to create a complete image. Some popular rendering algorithms are: rasterisation, ray casting, radiosity, and ray tracing.

Animation Techniques
Animation Challenge of creating realistic motion. Need a balance between automation and control.

Keyframe Animation
A simple yet effective way to animate 3D objects Each frame represents a position for the object Number of frames are limited, so object may appear to jump when going from one frame to another

Keyframe Animation
One solution is to just manually make more keyframes This takes time, and the programmer may not want to do it

Keyframe Animation
Instead of making them manually, use interpolation to create new frames Interpolation is creating a new position between existing positions

Linear Interpolation
The easiest form of interpolation Given the same point in two different keyframes, a line is drawn between them The new point exists somewhere on this line

Linear Interpolation
Where the point exists depends on three things: Total number of keyframes in animation Total time of animation Desired time of the new Position

Linear Interpolation
see page 466-467 for formulas Done for every point and combined to make a new keyframe Disadvantage: the formula doesnt always give a good approximation of the points

Hermite Spline Interpolation


This method shares the same idea as linear interpolation Considers two frames before and after the desired new frame, instead of one before and after Point approximation is more accurate than linear interpolation see page 468-469 for calculations

Kinematics
Determines parameters needed for a jointed, flexible object to achieve a pose Factors in maintaining balance, joint angle limitations, and collisions between the body and limbs. Two ways of doing this

Inverse Kinematics
Inverse Kinematics: figure out what angles joints will need in order to achieve a pose, given the desired configuration based on a hierarchy.
Specify the position of one object and every object above it in the hierarchy. Motion is inherited up. To perform one action must be able to move multiple joints.
Example: to move the arm and torso to one position, the algorithm can figure the position of where the shoulder and elbow should be.

Factors in maintaining balance, joint angle limitations, and collisions between the body and limbs.

Disadvantage: There is no general analytical solution Must be solved through non-linear programming techniques

Forward Kinematics
Forward Kinematic Animation: given desired angle changes for the figures joints will result in a pose. Motion is inherited down the hierarchy. Easier than inverse kinematics

Motion Capture
A person wears sensors near each joint Computer software records positions, angles, velocities, accelerations, and impulses for all sensors Typically captures submillimeter positions

Motion Capture
Advantages:
Faster than manually creating animations Can have much more natural looking motions and catch subtleties of the object.

Disadvantages:
Cant do anatomically impossible motions Motion is restricted to the laws of physics. Sensors attached to the skin can shift out of position during human movement causing real performance to differ from data recorded.

Procedural Animations
Algorithm used to generate animation in real-time Can be used for both simple and complex motions Most popular method is the Physically Based Simulation. Flocking is another example of procedural methods. Advantages:
Easy to generate similar motions. Generate interactive behavior that responds to the user by computing a response in real time. Ideal for models like the particle system.

Disadvantages:
Can be very expensive to compute during real time scenes Cannot control fine detail in animation.

Procedural Animation
One example of an application is creating death animations for characters The body can react to the environment while falling/fallen more realistically than other animation techniques Other examples: smoke, fire, water, clothing, hair.

You might also like