the university of north carolina at chapel hill cullide: interactive collision detection between...
TRANSCRIPT
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
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
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Problem
Given a large environment with moving objects,
Compute overlapping objectsOverlapping triangles in each pair
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Goal
Interactive collision detectionbetween complex objects
Large number of objectsHigh primitive countNon-convex objectsOpen and closed objects
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Non-rigid Motion
Deformable objectsChanging topology
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Real-time Collision Detection using our Approach
Complex breaking objects on a NVIDIA GeForce FX5800 Ultra GPU
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Related Work
Collision detectionHardware accelerated techniques
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Related Work
Object space techniquesTwo phases
Broad phase – Compute object pairs in close proximity Narrow phase – Check each pair for exact collision detection
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Related Work
Broad phaseSpatial partitioningSweep-and-prune
Narrow phaseConvex objectsSpatial partitioningBounding volume hierarchies
Surveys in [Klosowski 1998, Lin and Manocha 2003, Redon et al. 2002]
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations of Object-space Techniques
Considerable pre-processingHard to achieve real-time performance on complex deformable models
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Collision Detection using Graphics Hardware
Primitive rasterization – sorting in screen-space
Interference tests
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Image Space Techniques
Use of graphics hardwareCSG 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]
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations of Current Approaches
Closed modelsFrame buffer readbacks – slow
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
CPU, GPU and Bandwidth Growth on Consumer PCs
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
CPU Growth Rate
Courtesy: Anselmo Lastra
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
CPU Growth Rate
GPU Growth Rate
Courtesy: Anselmo Lastra
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
GPU Growth Rate
CPU Growth Rate
AGP Bandwidth Growth Rate
Courtesy: Anselmo Lastra
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Readback Timings
NVIDIA GeForce 4Dell Precision Workstation1Kx1K depth buffer – 50ms
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
OverviewPruning AlgorithmImplementation and ResultsConclusions and Future Work
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
OverviewPruning AlgorithmImplementation and ResultsConclusions and Future Work
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overview
Potentially Colliding Set (PCS) computationExact collision tests on the PCS
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Algorithm
Object LevelPruning
Sub-objectLevel
PruningExact Tests
GPU based PCS computation
Using CPU
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Potentially Colliding Set (PCS)
PCS
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Potentially Colliding Set (PCS)
PCS
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
Problem OverviewOverviewPruning AlgorithmImplementation and ResultsConclusions and Future Work
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Algorithm
Object LevelPruning
Sub-object Level
PruningExact Tests
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
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
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
set S
Collision Detection using Visibility Computations
Fully VisibleObject O
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
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
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Pruning
O1 O2 … Oi-1 Oi Oi+1 … On-1 OnO1 O2 … Oi-1 Oi Oi+1 … On-1 OnO1 O2 … Oi-1 Oi Oi+1 … On-1 On
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Pruning
O1 O2 … Oi-1 Oi
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Pruning
Oi Oi+1 … On-1 On
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation
Each object tested against all objects but itselfNaive algorithm is O(n2)Linear time algorithm
Uses two pass rendering approachConservative solution
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: First Pass
O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Render
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: First Pass
Fully Visible?
Render
O1
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
O1 O2 … Oi-1 Oi
PCS Computation: First Pass
Fully Visible?
Render Yes. Does not collide withO1,O2,…,Oi-1
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: First Pass
O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Render
Fully Visible?
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: Second Pass
O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Render
On
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: Second Pass
Render
Fully Visible?
On
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: Second Pass
Render
Fully Visible?
Oi Oi+1 … On-1 On
Yes. Does not collide with Oi+1,…,On-1,On
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation: Second Pass
Render
Fully Visible?
O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Yes. Does not collide with O1,…,On-1,On
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation
O1 O2 … Oi-1 Oi Oi+1 … On-1 On
Fully VisibleFully Visible
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS Computation
O1 O2 O3 … Oi-1 Oi Oi+1 … On-2 On-1 On
O1 O3 … Oi-1 Oi+1 … On-1
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
ExampleO1
O2
O3
O4Scene with 4 objectsO1and O2 collideO3, O4 do not collide
Initial PCS = { O1,O2,O3,O4 }
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
O3
O1
First Pass
O2
Order of rendering: O1 O4
O3
Fully Visible
O1
Fully Visible
O4O4
Fully Visible
Not Fully Visible
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Second Pass
O1
O3
O2O2
Fully Visible
Order of rendering: O4 O1
O4O4
Fully Visible
O3
Fully Visible
Not Fully Visible
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
After two passesO1
O2
O3
O4
Fully Visible
Fully Visible
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Potential Colliding SetO1
O2
PCS ={O1,O2}
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Algorithm
Object LevelPruning
Sub-object Level
PruningExact Tests
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overlap Localization
Each object is composed of sub-objectsWe are given n objects O1,…,On
Compute sub-objects of an object Oi that overlap with sub-objects of other objects
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Overlap Localization
Our solutionTest 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 algorithmExtend the two pass approach
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Potential Colliding SetO1
O2
PCS = {O1,O2}
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
O1
Sub-objects
O2
PCS = sub-objects of {O1,O2}
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
First Pass
Rendering order: Sub-objects of O1 O2
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully VisibleFirst Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible First Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Fully Visible
Not Fully Visible
First Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Fully Visible
Fully Visible
First Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Fully Visible
Fully Visible
First Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Fully Visible
Fully Visible
Fully Visible
First Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Second Pass
Rendering order: Sub-objects of O2 O1
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Second Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Second Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully VisibleSecond Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Not Fully Visible
Fully Visible
Fully Visible
Fully Visible
Second Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Fully Visible
Fully Visible
Fully VisibleSecond Pass
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Fully Visible
Fully Visible
Fully Visible
After two passes
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
PCS
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Algorithm
Object LevelPruning
Sub-objectlevel
PruningExact Tests
Exact Overlap tests using CPU
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Visibility Queries
We require a queryTests if a primitive is fully visible or not
Current hardware supports occlusion queries
Test if a primitive is visible or not
Our solutionChange the sign of depth function
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Visibility Queries
Depth function
GEQUAL LESSAll fragments Pass FailPass
Fail
Fail
PassFail PassFail
Query not supported
Occlusion query
Examples - HP_Occlusion_test, NV_occlusion_query
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Bandwidth Analysis
Read back only integer identifiers
Independent of screen resolution
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Optimizations
First use AABBs as object bounding volumeUse orthographic views for pruningPrune using original objects
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Outline
OverviewPruning AlgorithmImplementation and ResultsConclusions and Future Work
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Implementation
Dell Precision workstationDell M50 Laptop
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Test Models: Environment 1
100 deforming cylindersTotal – 20K triangles
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Test Models: Environment 2
Deforming toriiEach torus – 20K triangles
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Test Model: Environment 3
250K Dragon35K Bunny
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Test Model: Environment 4
Breaking dragon – 250K trianglesBunny – 35K triangles
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Implementation
Dell Precision workstation, 2.4GHz Pentium IV CPU, NVIDIA GeForce FX 5800 Ultra GPU, 2GB memory running Windows 2000
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Performance
Number of objects v/s collision time
(in m
s)
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Performance
Number of polygons v/s collision time
(in m
s)
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Performance
Screen resolution v/s collision time
(in m
s)
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Advantages
No coherenceNo assumptions on motion of objectsWorks on generic modelsA fast pruning algorithmNo frame-buffer readbacks
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Limitations
No distance or penetration depth informationResolution issuesNo self-collisionsCulling performance varies with relative configurations
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Live Demo of Environment 4
Dell M50 laptop, 2.4GHz Pentium IV-M CPU, NVIDIA Quadro4 700GoGL GPU, 1GB memory running Windows XP
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Live Demo of Environment 1
Avg. frames per second = 300
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conclusions
Novel algorithm for collision detection using graphics hardware
Applicable to polygon soupsNo assumptions on motion
Linear time PCS computation algorithmNo frame buffer readbacks
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Conclusions
First practical solution for general deformable models and breaking objects
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Future Work
Handle self-collisionsApply to more interactive applicationsDistance and penetration depth computation
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Acknowledgements
Army Research OfficeNational Science FoundationOffice of Naval ResearchIntel CorporationNVIDIA CorporationStanford Graphics LaboratoryUNC GAMMA Group
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Questions?
More info: http://gamma.cs.unc.edu/CULLIDE
E-mail: [email protected]