8. Animation
Animation in computer graphics is the controlled change of images over time to create the illusion of motion. The human visual system perceives continuous motion when a sequence of still images is shown rapidly (typically ≥ 24 frames per second). Each frame is static; motion exists only in the viewer’s brain.
What is the minimum frame rate required for the human eye to perceive smooth motion?
A: Typically 24 frames per second (fps) or higher. Below this, the brain may perceive flicker rather than continuous motion.
8.1 Illusion of Motion – Core Concept
Animation exploits persistence of vision and temporal coherence. Small, consistent changes between consecutive frames are interpreted as smooth movement.
- Frame: A single still image.
- Frame rate: Number of frames shown per second.
- Temporal continuity: Objects move slightly, not randomly, between frames.
Without continuity, the brain detects flicker instead of motion.
flowchart TD
Input[User Input / Script] --> Update[Update State]
Update --> Physics[Apply Physics/Rules]
Physics --> Render[Render Frame]
Render --> Display[Display on Screen]
Display --> Wait[Wait for next frame]
Wait --> Update
Which two psychological/physiological concepts make animation possible?
A: Persistence of Vision (retraining an image for a split second) and Temporal Coherence (small changes interpreted as movement).
8.2 Key Techniques in Animation
8.2.1 Keyframing (Start / End Poses)
Keyframes define important states (poses) of an object at specific times. The animator specifies what matters, not every frame.
- Pose: Position, rotation, scale, shape, or color at a given time. (See Transformations)
- Time index: When that pose occurs.
Example: A ball at rest (t=0), ball at peak height (t=1), ball on ground (t=2).
In keyframing, what does the animator define versus what the computer calculates?
A: The animator defines the Keyframes (start/end poses at specific times). The computer calculates the in-between frames.
8.2.2 Tweening (In-betweening)
Tweening automatically generates intermediate frames between keyframes to create smooth motion.
Conceptually, the computer fills the gap between two known states.
For position interpolation:
$$P(t) = P_0 + t(P_1 - P_0), \quad 0 \le t \le 1$$
- P₀: Start position
- P₁: End position
- t: Normalized time
What is the linear interpolation formula for position \(P(t)\)?
A: \(P(t) = P_0 + t(P_1 - P_0)\), where \(t\) ranges from 0 to 1.
8.2.3 Interpolation
Interpolation is the mathematical foundation of tweening. It computes intermediate values between known values.
- Linear interpolation (LERP): Constant speed
- Non-linear interpolation: Acceleration / deceleration (ease-in, ease-out)
Interpolation applies to:
- Position
- Rotation
- Scale
- Color
- Shape parameters
How does Non-linear interpolation differ from Linear interpolation in terms of motion feel?
A: Linear is constant speed (robotic). Non-linear allows for acceleration and deceleration (ease-in/ease-out), making motion feel natural.
8.2.4 Morphing (Shape Transformation)
Morphing smoothly transforms one shape into another by interpolating corresponding points.
Key idea: establish point-to-point correspondence between source and target shapes.
- Used in face transformation, logo animation, special effects
- Avoids abrupt shape changes
Morphing is advanced tweening applied to geometry, not just position.
What is the most critical step in setting up a Morphing animation?
A: Establishing point-to-point correspondence between the source and target shapes to ensure a smooth transition without distortion.
8.2.5 Panning (Camera Movement)
Panning is camera motion where the camera moves horizontally or vertically while observing a scene.
The objects do not move; the viewpoint moves.
- Common in 2D side-scrollers and 3D games
- Guides viewer attention
- Enhances spatial understanding
In computer graphics Panning, does the scene move or the camera?
A: Technically, the Viewpoint (Camera) moves. The objects in the scene remain stationary in world coordinates.
8.3 Types of Animation
8.3.1 Frame-by-Frame (Traditional Animation)
Each frame is drawn manually.
- Maximum artistic control
- High cost and effort
- Used in classic hand-drawn animation
No automation; motion quality depends entirely on the animator.
Why is Frame-by-Frame animation rarely used for complex 3D scenes today?
A: It requires extremely high effort and cost since every single frame must be created manually.
8.3.2 Keyframe Animation
Only key poses are defined manually; intermediate frames are generated automatically.
- Efficient
- Widely used in modern animation tools
- Depends on interpolation quality
What makes Keyframe Animation efficient?
A: Animators only create the significant poses (Keyframes); the computer automates the rest.
8.3.3 Procedural Animation (Rules / Math-Based)
Motion is generated using mathematical formulas or algorithms.
- No predefined frames
- Motion emerges from rules
Example: Oscillating motion
$$y(t) = A \sin(\omega t)$$
Used in waves, fire, crowd motion, environment effects.
How does Procedural Animation differ from Keyframing?
A: Procedural uses mathematical formulas/rules (e.g., sine waves for water) to generate motion, rather than manual poses.
8.3.4 Behavioral Animation (AI / Rule-Based)
Objects decide how to move based on rules, goals, or environment.
- Common in games and simulations
- Uses artificial intelligence concepts
Example: A character avoids obstacles while moving toward a target.
What drives motion in Behavioral Animation?
A: Rules or AI governing interactions (e.g., "avoid obstacles", "follow the leader").
8.3.5 Motion Capture (MoCap)
Real human motion is recorded and mapped onto digital characters.
- High realism
- Used in films and AAA games
- Requires sensors and cleanup
Transforms physical motion data into animation parameters.
What is the primary advantage of Motion Capture (MoCap)?
A: It captures nuanced, realistic human movement that is very difficult to animate manually.
8.3.6 Dynamics Animation (Physics-Based)
Motion is governed by physical laws.
Based on Newton’s laws:
$$F = m a$$
- Gravity
- Collisions
- Forces and constraints
Used in falling objects, cloth, fluids, rigid-body simulations.
If you wanted to simulate a falling rock, which animation type would you use?
A: Dynamics Animation (Physics-based), utilizing gravity and collision laws (\(F=ma\)).
Animation Dynamics
- Animation: Illusion of motion created by rapid sequence of still frames; relies on Persistence of Vision.
- Keyframing: Defining only the start and end poses (important states) manually at specific time indices.
- Tweening (In-betweening): Automatic generation of intermediate frames between keyframes using interpolation.
- Interpolation: Mathematical calculation of values (position, rotation, color) for intermediate frames (Linear vs. Non-linear/Ease-in-out).
- Morphing: Smooth transformation of one shape into another by establishing point-to-point correspondence.
- Procedural Animation: Motion generated by algorithms/math rules (e.g., waves, fire) rather than manual keyframes.
- Dynamics: Physics-based animation using laws of motion (\(F=ma\)) for gravity, collisions, and cloth simulation.
