Collision Detection - PowerPoint PPT Presentation

1 / 32
About This Presentation
Title:

Collision Detection

Description:

Brute Force Approach. Algebraically solve for the intersection of each pair of polygons ... Know when to revert to brute force method. Voronoi Regions ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 33
Provided by: csNps
Category:

less

Transcript and Presenter's Notes

Title: Collision Detection


1
Collision Detection
  • Jason Stine
  • CS 4473
  • 25 FEB 2000

2
What is Collision Detection?
  • Report geometric contact between objects
  • Convey enough information to determine logical
    consequences
  • A major computational bottleneck - O(N2)

3
Categories of CD Problems
  • Polygon soup - no geometric connections, no
    topology information
  • Structured polygons - solid objects
  • Constructive Solid Geometry (CSG)

4
Categories of CD Problems
  • Implicit surfaces - defined by functions
    (quadrics)
  • Parametric surfaces - defined by parametric
    functions (NURBS)

5
Convex vs. Concave Objects
  • Easy case -----------------------gt
  • Harder case ---------------------gt
  • Really difficult -----------------gt

6
What does the model need to know?
  • Simplest case - do two objects touch?
  • What parts touch?
  • What is the minimum distance between disjoint
    objects?
  • If objects penetrate, by how much?
  • When will the next contact happen?

7
Brute Force Approach
  • Algebraically solve for the intersection of each
    pair of polygons
  • Simple and good for very small models

8
Brute Force Approach
  • O(N2) quickly becomes unworkable for larger
    models
  • Improved with use of a collidable field

9
Bounding Volumes
  • Complex objects are enclosed by bounding regions
  • Easier to test mathematically
  • If volumes intersect, more exact tests may be done

10
Bounding Volume Problems
  • Still O(N2) for objects in scene
  • Very effective for rejection tests - much less
    so for close proximity
  • Revert to O(N2) for polygons if the scene becomes
    crowded
  • Too much wasted space with cubes and spheres

11
Collisions in Vega
  • Isectors define collision behavior
  • Volume associated is converted to a set of line
    segments
  • Line segments tested for intersection against the
    scene graph
  • 32 bit bitmask determines if the collision is of
    interest

12
Collisions in Vega
  • Polygons indicated are tested for exact
    intersection
  • This method determines height above terrain, HPR
    orientation, terrain following, and line of sight

13
Collisions in Java3D
  • Bounding volumes can be defined as spheres,
    boxes, or polytopes
  • Each frame, all objects that have the COLLIDABLE
    field set to true are tested for intersection
    with each other
  • Intersections return a collision event

14
Collisions in Java3D
  • Event listener structure must be used to control
    the applications response
  • Most effective when used in conjunction with
    picking
  • Picking is highly optimized in version 1.2

15
Collisions in Java3D
  • Problems
  • Discrete nature of samplings - can miss
    collisions
  • Highly inefficient for large, complex
    environments
  • Return collisions only on bounding volumes, not
    on objects

16
Advanced Approaches
  • Better bounding regions
  • Clever ordering of the virtual world
  • Know when to revert to brute force method

17
Voronoi Regions
  • A set of points closer to a feature than to any
    other feature
  • One region (plane) per face and edge
  • Constraint planes separate them

18
Voronoi Regions - 2D Example
  • Set distance from sides - region side length
    polygon side length
  • connect side region boundaries to form corner
    region boundaries

19
Voronoi Regions in Practice
  • CP eliminates Cell 1, points to Cell 2
  • VB and Pa are returned as the closest pair

20
Voronoi Regions in Practice
  • Both internal and external regions used
  • Internal not computed as carefully

21
Internal vs. External Voronoi Region
22
RAPID - Oriented Bounding Boxes
  • Developed at UNC in 1996
  • Uses a data structure for progressively more
    detailed Voronoi regions
  • RAPID includes both the OBB algorithm and a fast
    way to implement it

23
OBB Tree Development
  • Recursive partitioning along major axis
  • Stops when each box contains one polygon
  • Two-dimensional example at right

24
Sweep and Prune
  • Volumes are projected onto each axis
  • Sorted list of objects - relies on temporal,
    geometric coherence
  • 1-D example at right

25
I-COLLIDE Advanced Collision Detection
  • Requires data structure separate from rendering
    structures
  • Takes advantage of temporal and geometric
    coherence

26
Step 1Axis-Aligned Bounding Boxes
27
Step2Oriented Bounding Boxes/Voronoi Regions
  • When the sweep and prune indicates collision, OBB
    tree takes over
  • Voronoi regions allow identification of closest
    pairs

28
I-COLLIDE /RAPID Performance
29
I-COLLIDE /RAPID Performance
30
IMMPACT - Industrial Strength CD
  • For very large (107) numbers of polygons, even
    these are too slow
  • IMMPACT combines I-COLLIDE with overlap graphs of
    regions of interest

31
IMMPACT Flowchart
32
IMMPACT collisions
Write a Comment
User Comments (0)
About PowerShow.com