Animation Wrapup - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

Animation Wrapup

Description:

Quality of motion appropriate for rendering style and frame ... Efficiency hacks/cheats. Fewer tests: Exploit spatial coherence. Use bounding boxes/spheres ... – PowerPoint PPT presentation

Number of Views:83
Avg rating:3.0/5.0
Slides: 34
Provided by: cds7
Category:

less

Transcript and Presenter's Notes

Title: Animation Wrapup


1
Animation Wrap-up
  • Summary of Animation
  • Collision Detection

2
Generating Motion
  • What matters?
  • Quality of motion appropriate for rendering style
    and frame rate
  • Controllable from UI
  • Controllable from AI
  • Skills of the animated character
  • Personality of the animated character

3
Keyframing
  • Fine level of control
  • Quality of motion depends on skill of animator

4
Motion Capture
  • Natural-looking motion
  • Hard to generalize motions
  • Registration is difficult
  • Often seems weightless Bill Kroyer, Rhythm
    Hues

5
Simulation (Broadly Defined)
  • Physics is hard to simulate
  • Pseudo-physics is somewhat hard
  • Control is very hard
  • Gives Generalization Interactivity

Desired Behavior
Forces and Torques
Model Numerical Integrator
User/AI
Control
State
Graphics
6
When to Use What Method?
  • Keyframing
  • Sprites and other simple animations
  • Non-human characters
  • Coarse collision detection
  • Motion Capture
  • Human figures
  • Subtle motions, long motions
  • Simulation
  • Passive simulations
  • When interactivity w/ motion is important

7
Integration of Technologies
  • Layering
  • Add hand/finger motion later
  • Facial animation
  • Use keyframing to modify data
  • Fix holes in data
  • Use motion capture to drive simulation

8
Collision Detection
  • Essential for many games
  • Shooting
  • Kicking, punching, beating, whacking, smashing,
    hitting, chopping, dicing, slicing, julienne
    fries
  • Car crashes
  • Expensive
  • tests!!

9
Collision Detection
  • For each object i containing polygons p
  • Test for intersection with object j with polygons
    q
  • (j i)
  • For polyhedral objects, test if object i
    penetrates surface of j
  • Test if vertices of i straddle polygon q of j
  • If straddle, then test intersection of polygon q
    with polygon p of object i

10
Collision Detection
  • Efficiency hacks/cheats
  • Fewer tests Exploit spatial coherence
  • Use bounding boxes/spheres
  • Hierarchies of bounding boxes/spheres

11
Bounding Boxes
  • Axis-aligned vs. Object-aligned
  • Axis-aligned BBox change as object moves
  • Approximate by rotating BBox

Swept volume
12
Collision Detection
  • Convex objects
  • Look for separating plane
  • Test all faces
  • Test each edge from obj 1 against vertex of
    obj 2
  • Save separating plane for next animation frame

13
Collision Detection
  • Concave Objects
  • Break apart
  • Convex hull
  • Automatic or artist-created

14
Collision Detection
  • To go faster
  • Sort on one dimension
  • Bucket sort (i.e. discretize in 1 dimension)
  • Exploit temporal coherence
  • Maintain a list of object pairs that are close to
    each other
  • Use current speeds to estimate likely collisions
  • Use cheaper tests

15
Collision Detection
16
Collision Detection
  • Cheaper distance calculation
  • Compare against
  • Approximation
  • Manhattan distance - Shortest side/2

17
Collision Detection Sprites
  • AND for each pixel in sprites

18
Collision Detection
  • Discretization in 3D
  • Create a voxel array
  • Store an ID in each voxel where an object is
  • Collision where voxel has an ID already
  • Difficult to determine good voxel size
  • Huge memory
  • Hash table -- gives constant time point queries

19
Inter-Object Distance
  • A related problem
  • Collision Avoidance
  • Part of motion planning is to avoid collisions
  • Many collision detection algorithms take time
    into account
  • Estimate Collision Time, distance
  • www.cs.unc.edu/geom/collision.html

20
AI in video games
  • 5-10 of CPU for Realtime
  • 25-50 of CPU for Turn-based
  • Chase/Escape behaviors
  • Group behaviors
  • Finite State machines
  • Adaptation/Learning

21
Questions
  • How good should the AI be?
  • Why are people more fun than NPCs?
  • Will networked games reduce AI?
  • New directions for AI in games?

22
Chase/Evade
  • Algorithm for the predator?

23
Enhancements to Chase
  • Speed Control
  • Velocity, Acceleration max/min
  • Limited turning Radius
  • Randomness
  • Moves
  • Patterns

24
Enhancements to Chase
  • Anticipation
  • Build a model of user behavior

McCain
Bush
25
Enhancements to Chase
  • Anticipation
  • Build a model of user behavior

26
Group Behaviors
  • Lots of background characters to create a feeling
    of motion
  • Make area appear interesting, rich, populated

27
Formations
Turning corners Obstacles
28
Flocking -- (HalfLife, Unreal)
Simple version Compute trajectory to head toward
s centroid
  • What might go wrong?

29
Group Behaviors
Craig Reynolds SIGGRAPH 1987
  • Reaction to neighbors

30
Steering Behaviors
  • Pursue
  • Evade
  • Wander
  • Obstacle Avoidance
  • Wall/Path following
  • Queuing
  • Combine behaviors with weights
  • What could go wrong?

31
What could go wrong?
Forces balance out in dead end
Exactly aligned
  • Does not handle changes in strategy

32
Perceptual Models
33
Production Rules
  • If( enemy in sight ) fire
  • If( big enemy in sight ) run away
  • If( --- ) ----
  • Selecting among multiple valid rules
  • Priority weighting for rules or sensor events
  • Random selection
  • No state (in pure form)
Write a Comment
User Comments (0)
About PowerShow.com