910 likes | 1.03k Views
CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware. Naga K. Govindaraju, Stephane Redon, Ming C. Lin, Dinesh Manocha University of North Carolina at Chapel Hill. Problem. Given a large environment with moving objects,
E N D
CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Naga K. Govindaraju, Stephane Redon, Ming C. Lin, Dinesh Manocha University of North Carolina at Chapel Hill
Problem • Given a large environment with moving objects, • Compute overlapping objects • Overlapping triangles in each pair
Goal Interactive collision detectionbetween complex objects • Large number of objects • High primitive count • Non-convex objects • Open and closed objects
Non-rigid Motion • Deformable objects • Changing topology
Real-time Collision Detection using our Approach Complex breaking objects on a NVIDIA GeForce FX5800 Ultra GPU
Related Work • Collision detection • Hardware accelerated techniques
Related Work • Object space techniques • Two phases • Broad phase – Compute object pairs in close proximity • Narrow phase – Check each pair for exact collision detection
Related Work • Broad phase • Spatial partitioning • Sweep-and-prune • Narrow phase • Convex objects • Spatial partitioning • Bounding volume hierarchies Surveys in [Klosowski 1998, Lin and Manocha 2003, Redon et al. 2002]
Limitations of Object-space Techniques • Considerable pre-processing • Hard to achieve real-time performance on complex deformable models
Collision Detection using Graphics Hardware • Primitive rasterization – sorting in screen-space • Interference tests
Image Space Techniques Use of graphics hardware • CSG rendering [Goldfeather et al. 1989, Rossignac et al. 1990] • Interferences and cross-sections [Baciu et al. 1998, Myszkowski 1995, Rossignac et al. 1992, Shinya and Forgue 1991] • Minkowski sums [Kim et al. 2001] • Cloth animation [Vassilev et al. 2001] • Virtual Surgery [Lombardo et al. 1999] • Proximity computation [Hoff et al. 2001, 2002]
Limitations of Current Approaches • Closed models • Frame buffer readbacks – slow
CPU Growth Rate Courtesy: Anselmo Lastra
GPU Growth Rate CPU Growth Rate Courtesy: Anselmo Lastra
GPU Growth Rate CPU Growth Rate AGP Bandwidth Growth Rate Courtesy: Anselmo Lastra
Readback Timings • NVIDIA GeForce 4 • Dell Precision Workstation • 1Kx1K depth buffer – 50ms
Outline • Overview • Pruning Algorithm • Implementation and Results • Conclusions and Future Work
Outline • Overview • Pruning Algorithm • Implementation and Results • Conclusions and Future Work
Overview • Potentially Colliding Set (PCS) computation • Exact collision tests on the PCS
GPU based PCS computation Using CPU Algorithm Object LevelPruning Sub-objectLevelPruning Exact Tests
PCS Potentially Colliding Set (PCS)
Outline • Problem Overview • Overview • Pruning Algorithm • Implementation and Results • Conclusions and Future Work
Algorithm Object LevelPruning Sub-object LevelPruning Exact Tests
Visibility Computations Lemma 1: An object O does not collide with a set of objects S if O is fully visible with respect to S • Utilize visibility for PCS computation
set S Object O Fully Visible Collision Detection using Visibility Computations
PCS Pruning Lemma 2: Given n objectsO1,O2,…,On , an object Oi does notbelong to PCS if it does notcollide with O1,…,Oi-1,Oi+1,…,On • Prune objects that do not collide
PCS Pruning O1 O2 … Oi-1 Oi Oi+1 … On-1 On O1 O2 … Oi-1OiOi+1 … On-1 On O1 O2 … Oi-1 Oi Oi+1 … On-1 On
PCS Pruning O1 O2 … Oi-1 Oi
PCS Pruning Oi Oi+1 … On-1 On
PCS Computation • Each object tested against all objects but itself • Naive algorithm is O(n2) • Linear time algorithm • Uses two pass rendering approach • Conservative solution
Render PCS Computation: First Pass O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Render Fully Visible? PCS Computation: First Pass O1
Render Yes. Does not collide withO1,O2,…,Oi-1 Fully Visible? PCS Computation: First Pass O1 O2 … Oi-1 Oi
Render Fully Visible? PCS Computation: First Pass O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Render PCS Computation: Second Pass O1 O2 … Oi-1 Oi Oi+1 … On-1 On On
Render Fully Visible? PCS Computation: Second Pass On
Render Yes. Does not collide with Oi+1,…,On-1,On Fully Visible? PCS Computation: Second Pass Oi Oi+1 … On-1 On
Render Yes. Does not collide with O1,…,On-1,On PCS Computation: Second Pass O1 O2 … Oi-1 Oi Oi+1 … On-1 On Fully Visible?
Fully Visible Fully Visible PCS Computation O1 O2 … Oi-1 Oi Oi+1 … On-1 On
O1 O2 O3 … Oi-1 Oi Oi+1 … On-2 On-1 On PCS Computation O1 O3 … Oi-1 Oi+1 … On-1
Example O1 O2 O3 O4 Scene with 4 objectsO1and O2 collideO3, O4 do not collide Initial PCS = { O1,O2,O3,O4 }
First Pass Fully Visible Fully Visible Not Fully Visible O1 O3 Fully Visible O4 O1 O2 O3 O4 Order of rendering: O1 O4
Fully Visible Fully Visible Not Fully Visible O2 O3 Fully Visible O4 Second Pass O1 O2 O3 O4 Order of rendering: O4 O1
Fully Visible Fully Visible After two passes O1 O2 O3 O4
Potential Colliding Set O1 O2 PCS ={O1,O2}
Algorithm Object LevelPruning Sub-object LevelPruning Exact Tests
Overlap Localization • Each object is composed of sub-objects • We are given n objects O1,…,On • Compute sub-objects of an object Oi that overlap with sub-objects of other objects
Overlap Localization • Our solution • Test if each sub-object of Oi overlaps with sub-objects of O1,..Oi-1 • Test if each sub-object of Oi overlaps with sub-objects of Oi+1,...,On • Linear time algorithm • Extend the two pass approach