collision detection
play

Collision Detection 1 2 Many Different Situations Many Different - PDF document

2/12/2012 Many Different Situations Few moving objects, but complex geometry Collision Detection 1 2 Many Different Situations Many Different Situations Thin moving objects, with simple geometry Many simple objects 3 4 Many Different


  1. 2/12/2012 Many Different Situations Few moving objects, but complex geometry Collision Detection 1 2 Many Different Situations Many Different Situations Thin moving objects, with simple geometry Many simple objects 3 4 Many Different Situations Many Different Situations Many simple objects Many contacts, deformable objects, ... 5 6 1

  2. 2/12/2012 Many Different Situations Collision Detection Methods Real-time detection � Many different methods � We will focus on two of them: – Grid method: good for many simple moving objects of about the same size (e.g., many moving discs with similar radii) – Bounding Volume Hierarchy (BVH) method: good for few moving objects with complex geometry 7 8 Grid Method Grid Method d d � Subdivide space into a regular grid of cubic or Running time is proportional to square bins number of moving objects � Index each object in a bin 9 10 Bounding Volume Hierarchy Method Bounding Volume Hierarchy Method � Enclose objects into bounding volumes (spheres or boxes) � Enclose objects into bounding volumes (spheres or boxes) � Check the bounding volumes first � Check the bounding volumes first � Decompose an object into two 11 12 2

  3. 2/12/2012 Bounding Volume Hierarchy Method Bounding Volume Hierarchy Method � Enclose objects into bounding volumes (spheres or boxes) � Enclose objects into bounding volumes (spheres or boxes) � Check the bounding volumes first � Check the bounding volumes first � Decompose an object into two � Decompose an object into two � Proceed hierarchically � Proceed hierarchically 13 14 BVH in 3D Bounding Volume Hierarchy Method • BVH is pre-computed for each object 15 16 Collision Detection Collision Detection Search tree A A AA C C B B pruning D E F G D E F G Two objects described by their A precomputed BVHs A 17 18 3

  4. 2/12/2012 Collision Detection Collision Detection A A B C B C Search tree Search tree AA AA E F E F D G D G BB BC CB CC BB BC CB CC pruning A A 19 20 Collision Detection Collision Detection A C B � Pruning discards subsets of the two Search tree objects that are separated by the BVs AA D E F G � Each path is followed until pruning or � Each path is followed until pruning or BB BC CB CC until two leaves overlap FD FE GD GE � When two leaves overlap, their contents are tested for overlap If the pieces contained in G and D G D overlap � collision 21 Search Strategy Performance Several thousand collision checks per If there is no collision, all paths must eventually � second for 2 three-dimensional be followed down to pruning or a leaf node objects each described by 500,000 But if there is collision, it is desirable to detect � triangles, on a 1-GHz PC it as quickly as possible q y p � Greedy best-first search strategy with � f(N) = d/(r X +r Y ) Faster when objects are well separated or have much overlap. [Expand the node XY r Y Slower when objects barely overlap or are very close. with largest relative d r X Why? Y overlap (most likely to X contain a collision)] 24 4

  5. 2/12/2012 Desirable Properties of Bad Case for BVH BVs and BVHs BVs: BVH: � Separation � Tightness � Balanced tree B l d t � Efficient testing ? � Invariance 26 Desirable Properties of Spheres BVs and BVHs � Invariant � Efficient to test BVs: BVH: � Separation � But tight? � Tightness � Balanced tree B l d t � Efficient testing � Invariance 27 28 Axis-Aligned Bounding Box (AABB) Axis-Aligned Bounding Box (AABB) � Not invariant � Efficient to test � Not tight 29 30 5

  6. 2/12/2012 Oriented Bounding Box (OBB) Oriented Bounding Box (OBB) � Invariant � Less efficient to test � Tight 31 32 Desirable Properties of Comparison of BVs BVs and BVHs Sphere AABB OBB BVs: BVH: � Separation � Tightness Tightness - -- + ? ? � Balanced tree B l d t � Efficient testing Testing + + o � Invariance Invariance yes no yes No type of BV is optimal for all situations 33 34 Desirable Properties of Construction of a BVH BVs and BVHs � Top-down construction � At each step, create the two children of a BV BVs: BVH: � Example: � Separation � Tightness For OBB, split longest side at midpoint p g p � Balanced tree B l d t � Efficient testing � Invariance 35 36 6

  7. 2/12/2012 Usual Approach to Dynamic Static vs. Dynamic Checking (in PRM Planning) Collision Detection 1) Discretize path at some fine resolution ε Dynamic checks Static checks 2) Test statically each intermediate configuration 3 2 2 3 1 3 2 3 � ε too large � collisions are missed < ε � ε too small � slow test of local paths Examples of Difficult Dynamic Collision Checking � ε too large � collisions are missed � ε too small � slow test of local paths Greedy Distance Computation Adaptive Bisection (same recursion as collision detection) Greedy-Distance(A,B) Ideas: 1. If dist(A,B) > 0, then return dist(A,B) a) Relate configuration changes to path 2. If A and B are both leaves, then return distance between their contents lengths in workspace 3. 3. Switch A and B if A is a leaf, or if B is bigger and Switch A and B if A is a leaf, or if B is bigger and b) Use distance computation rather than not a leaf pure collision checking 4. Set A 1 and A 2 to be A’s children c) Bisect adaptively 5. d 1 � Greedy-Distance(A 1 ,B) 6. If d 1 > 0 then a. d 2 � Greedy-Distance(A 2 ,B) b. If d 2 > 0 then return Min(d 1 , d 2 ) 7. Return 0 7

  8. 2/12/2012 What about deformable objects? 43 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend