Collision Detection - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Collision Detection

Description:

'A Survey on Collision Detection', ???, VR Lab Tech Memo 98-18, 1998. ... What is collision? ... Collision Response ... – PowerPoint PPT presentation

Number of Views:201
Avg rating:3.0/5.0
Slides: 39
Provided by: kwangy
Category:

less

Transcript and Presenter's Notes

Title: Collision Detection


1
Collision Detection
  • Nov. 6. 2001
  • SonOu Lee

2
Contents
  • Introduction
  • Basic algorithm and its problems
  • Categorizing previous methods
  • State of the art
  • Reference
  • A Survey on Collision Detection, ???, VR Lab
    Tech Memo 98-18, 1998.
  • Real-Time Rendering by Tomas Möller and Eric
    Haines
  • CS492 Textbook

3
Introduction
  • What is collision?
  • a status that two or more objects have occupied
    or will occupy the same space at the same time
  • Why collision detection is important?
  • real world vs. virtual world
  • Which research domain deals collision detection?
  • robotics, computational geometry, computer
    graphics, VR

4
DDR?
  • Collision Detection
  • detects whether two objects collide
  • Collision Determination
  • finds the actual intersections between a pair of
    objects
  • See Real-Time Rendering for more information
  • Collision Response
  • determines what actions should be taken in
    response to the collision of two objects

5
  • Collision Detection algorithm should
  • achieve interactive rates
  • handle polygon soups
  • can undergo rigid-body motion
  • provide efficient bounding volume
  • have static simulation methods

6
Basic Algorithm
  • Comparison time
  • for objects
  • NC2NM
  • N moving, M static objects
  • for features
  • K2
  • K features per objects
  • total comparison time
  • (NC2NM) K2

7
Problems of Basic Algorithm
  • 3 types of weaknessHubbard95
  • fixed-time step weakness
  • related with ?td
  • all-pairs weakness
  • related with of objects
  • pair-processing weakness
  • related with of features

8
Categorizing previous methods
  • In regard to the CS492 textbook
  • broad / narrow / single phase
  • In regard to pruning methods VR Lab Tech Memo
    98-18
  • global pruning
  • local pruning
  • time-domain pruning
  • Other categorizing features
  • accuracy
  • speed
  • generality

9
Global Pruning
  • Reducing the number of comparisons for objects
  • reducing N of (NC2NM) K2
  • Related with all-pairs weakness
  • Previous work
  • bounding box test
  • sweep and prune Barff92Ponamgi95
  • space subdivision
  • uniform space subdivision Turk88 Kim97a
  • octree decomposition Moore88Shaffer92Smith95

10
Local Pruning
  • Reducing the number of comparisons for features
  • reducing K of (NC2NM) K2
  • Related with pair-processing weakness
  • Previous work
  • BSP Thibault87
  • superquadrics Sclaroff91
  • regular grid Garsia-Alonso94
  • closest feature Lin93
  • OBB tree Gottschalk96b
  • hierarchical sphere tree Hubbard95
  • hierarchical convex tree Kim97b

11
Time-domain Pruning
  • Reducing the for given number of comparisons time
  • Related with fixed-timestep weakness
  • Previous work
  • space-time bounds Hubbard96
  • with predefined time-variable function
  • root finding Canny86
  • interval analysis Duff92Snyder93
  • without predefined time-variable function
  • using bound on velocity and distance for
    increasing ?td Culley86
  • 4D structureFoisy90

12
State of the Art
  • Sweep and Prune Baraff92Ponamgi95
  • Incremental Algorithm Lin93
  • OBBTree Gottschalk96b
  • Space-Time Bounds Hubbard96
  • Hierarchical Sphere Tree Hubbard95
  • k-DOPTree Klosowski98

13
Sweep and Prune
  • Known as sort and sweep or sweep and prune
  • Using AABBs(Axis-Aligned Bounding Box)
  • dynamic AABB
  • fixed AABB
  • Dimension reduction
  • if two bounding boxes collide in 3D, then their
    orthogonal projections on the x,y, and z axes
    must overlap

14
  • Algorithm overview
  • project each AABB onto the x,y, and z axes
  • projection results in intervals
  • or project each AABB onto the x-y,y-z, and x-z
    planes
  • projection results in rectangles
  • determine overlaps of these intervals
  • a pair of bounding boxes can overlap iff their
    intervals overlap in all three dimensions
  • general sorting method
  • O(NlogN)
  • keep sorted list and using insertion sort or
    bubble sort
  • expected O(N)

15
Incremental Algorithm
  • Lin-Canny Closest Feature Algorithm
  • Preprocessing
  • Voronoi Region
  • a Voronoi region associates with a feature is a
    set of points closer to that feature than any
    others
  • Cell
  • structure for Voronoi region of single feature
  • has a set of constraint plane and pointers to the
    neighboring cells.

16
  • Closest feature test
  • finding closest feature pairs based on Voronoi
    regions
  • start with a candidate pair of features
  • check whether the closest points line on these
    features
  • if true
  • calculate distance between two features and
    determine collision
  • else
  • find neighboring feature of one or both
    candidates and try again

17
  • Example

18
OBBTree
  • OBB (Oriented Bounding Box) Tree
  • binary tree structure
  • known as fastest algorithm practically
  • OBB was originally used extensively to speed up
    ray tracing and interference detection
    computationArvo89

19
  • Building an OBBTree
  • constructing tree structure
  • top-down approach
  • split longest axis of a box with a plane
    orthogonal to one of its axes
  • making OBBs
  • Simple but erroneous method

20
  • Using convex hull to get more correct result
  • Consider only surface primitives

21
  • OBBT Example

22
  • Fast overlap test for OBB Tree
  • general method
  • 144 times comparison (12edges x 6 faces x 2
    boxed)
  • separating axis test
  • separating axis theorem Gottschalk96a
  • need 15 times separating axis test

23
k-DOPTree
  • k-DOP?
  • Generalization of AABB
  • Why k-DOP?
  • Has both a faster BV/BV overlap test than the OBB
    and a tighter fit
  • How can determine value k?
  • Scenario-dependent
  • k 18 gave the best execution times
    experimentally

24
  • Hierarchy Building
  • Top-down approach
  • Binary tree
  • Subdivide criteria
  • Min Sum
  • Min Max
  • Splatter
  • Longest Side

25
  • Updating the k-DOPTree
  • Due to a rigid-body motion
  • Approximation method
  • vertices locations at the corners of the original
    k-DOPs are transformed and used
  • Hill climbing method
  • Store convex hull information and use local
    updating

26
Space-Time Bounds HST
  • Overview Hubbard95,96

27
  • Broad Phase
  • upper bound on the objects accelerations to
    build a set of space-time bounds
  • gives a conservative estimate of where an object
    could be in the future
  • address the fixed-timestep weakness
  • Narrow Phase
  • progressively refines the accuracy
  • sphere-tree
  • address the pair-processing weakness

28
Space-Time Bounds
0
y
y
0
1
1
t
t
x
  • This means that a 3D bound on objects position
    at t is a sphere of radius centered
    at
  • parabolic horn shape

29
  • Simplify parabolic horn shape
  • hypertrapezoid
  • encloses an objects parabolic horn
  • consists of six 4D faces, one for each 3D face of
    its cross-sectional cubes
  • each constant-t cross section of a 4D face is an
    isothetic 3D square
  • 4D Cutting Plane
  • If acceleration is limited to only certain
    direction

30
  • Space-Time Bounds are conservative
  • if two objects collide at simulation time t,
    their space-time bounds must intersect at some ti
    ? t
  • Check intersection between two space-time bounds
  • let Bi be a space-time bound consisting of
    hypertrapezoid Ti and cutting plane Pi and assume
    that T1 and T2 are disjoint at t0
  • intersection between f1 of T1 and f2 of T2
  • intersection between f1 of T1 and P2
  • intersection between P1 and P2

31
Hierarchical Sphere Tree
  • Time-critical collision detection
  • negotiated graceful degradation
  • trade accuracy for speed
  • maintain real-time performance
  • approximation of objects real surfaces
  • Requirement for preprocess
  • must be automatic
  • each hierarchy is effective search structure
  • generate hierarchies in which each level fits the
    object as tightly as possible

32
  • Medial-axis
  • skeleton or stick figure representation of a
    two-dimensional object.
  • Medial-axis surface
  • extension of medial-axis to 3D
  • Building medial-axis surfaces
  • not simple
  • only exact algorithm by Hoffmann90
  • complicate and limited to CSG objects
  • approximating medial-axis surface
  • using voronoi diagram

33
  • Building process
  • places the set of points P on the polyhedrons
    surface using the algorithm by Turk91
  • building voronoi diagram for the points
  • identify voronoi vertices
  • record vertices adjacency
  • Generating spheres
  • using each voronoi vertex and its forming
    vertices

34
  • Merging spheres
  • building a hierarchy
  • optimization problem
  • greedy method (not optimal)
  • choose the minimum cost merger which most
    preserves the levels tightness around the
    polyhedron
  • cost function
  • Hausdorff distance
  • maxaminb d(a,b)
  • no algorithm for concave polyhedra
  • approximating Hausdorff distance

35
  • Examples

Octree
Medial axis
36
Speed up Trick?
  • Not all application needs detailed collision
    detection
  • Especially in games domain
  • Collision detection with rays
  • Environment with BSP tree
  • Hierarchical collision detection method
  • Reject with cheap computation

37
General HierarchicalCollision Detection
  • Hierarchy building
  • Bottom-up
  • BOXTREE, HSBT
  • Top-down
  • OBBT, k-DOPT
  • Hierarchy can be created lazily -gt time saving
    for off-line calculation such as path planning ,
    non-real-time animation, and more
  • k-ary tree
  • Binary tree is welcome
  • minimized work to be done when traversing a
    single path from the root to the worst-case leaf
    Klosowski
  • easy to compute hierarchy
  • Well balanced trees always provide good
    performance?
  • No!

38
Conclusion
  • There is no perfect collision detection algorithm
    for all domain
  • Tight bounding volume vs. fast BV overlap test
Write a Comment
User Comments (0)
About PowerShow.com