820 likes | 978 Views
Adapted from: 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. Collision Handling.
E N D
Adapted from: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
Collision Handling • Contact and collision between objects and between interactive tools with objects • Non-trivial to simulate collision, main problems are • Automatically report when collision happens • After collision detection, objects response in a natural way
Collision Handling • A wide range of techniques are used in collision detection on geometric models • Hierarchical trees formed with bounding boxes or spheres for efficient detect in different levels • Penetration depth should be reported to the handling process • The research issue for computational geometry and algorithms
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 • Object space techniques • Two phases • Broad phase – Compute object pairs in close proximity • Narrow phase – Check each pair for exact collision detection
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
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
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
Potential Colliding Set O1 O2 PCS = {O1,O2}
Sub-objects O1 O2 PCS = sub-objects of {O1,O2}
First Pass Rendering order: Sub-objects of O1 O2
Fully Visible First Pass
Fully Visible First Pass
Fully Visible Fully Visible Not Fully Visible First Pass
Fully Visible Fully Visible Fully Visible First Pass