CULLIDE Interactive Collision Detection Between Complex Models

Document Sample
CULLIDE Interactive Collision Detection Between Complex Models Powered By Docstoc
					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 detection
 between 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
  Algorithm

               Sub-object
Object Level
                 Level      Exact Tests
 Pruning
                Pruning


     GPU based PCS            Using
      computation             CPU
Potentially Colliding Set (PCS)




                                  PCS
Potentially Colliding Set (PCS)




                                  PCS
Outline

 Problem Overview
 Overview
 Pruning Algorithm
 Implementation and Results
 Conclusions and Future Work
  Algorithm

               Sub-object
Object Level
                 Level      Exact Tests
 Pruning
                Pruning
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
 Collision Detection using
 Visibility Computations

                                 set S




Object O
                      Fully Visible
PCS Pruning

 Lemma 2: Given n objects
 O1,O2,…,On , an object Oi does not
 belong to PCS if it does not
 collide 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
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
PCS Computation: First Pass

Render

O1 O2 … Oi-1 Oi Oi+1 … On-1 On
PCS Computation: First Pass

Render

O1


         Fully Visible?
PCS Computation: First Pass

Render                Yes. Does not
                      collide with
                      O1,O2,…,Oi-1
O1 O2 … Oi-1 Oi


                    Fully Visible?
PCS Computation: First Pass

Render

O1 O2 … Oi-1 Oi Oi+1 … On-1 On


                       Fully Visible?
PCS Computation: Second Pass

                       Render

O1 O2 … Oi-1 Oi Oi+1 … On-1 On
PCS Computation: Second Pass

                      Render

                            On


                     Fully Visible?
    PCS Computation: Second Pass

Yes. Does not                     Render
collide with
Oi+1,…,On-1,On
                        Oi Oi+1 … On-1 On


                 Fully Visible?
   PCS Computation: Second Pass

                            Render

  O1 O2 … Oi-1 Oi Oi+1 … On-1 On

                 Yes. Does not
                 collide with
Fully Visible?   O1,…,On-1,On
PCS Computation

   Fully Visible   Fully Visible

O1 O2 … Oi-1 Oi Oi+1 … On-1 On
  PCS Computation



O1 O2 O3 … Oi-1 Oi Oi+1 … On-2 On-1 On



    O1 O3 … Oi-1 Oi+1 … On-1
                                            Example
          O1

                   O2


                                      O3
Scene with 4 objects
O1and O2 collide
                                                  O4
O3, O4 do not collide




                  Initial PCS = { O1,O2,O3,O4 }
                         Fully Visible                 First Pass

           O1                      Not Fully Visible

                                                 Fully Visible
                    O2
                                                       Fully Visible


                                         O3
Order of rendering: O1      O4
                                                        O4
                         Not Fully Visible
                                                  Second Pass
                                 Fully Visible
           O1
                                                 Fully Visible
                    O2
                                                     Fully Visible


                                         O3
Order of rendering: O4      O1
                                                      O4
          After two passes
O1

                   Fully Visible
     O2
                        Fully Visible


              O3
                         O4
     Potential Colliding Set
O1

     O2


          PCS ={O1,O2}
  Algorithm

               Sub-object
Object Level
                 Level      Exact Tests
 Pruning
                Pruning
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
                First Pass
Fully Visible
Fully Visible
                                      First Pass
           Fully Visible
                  Not Fully Visible
Fully Visible
                                    First Pass
           Fully Visible
                    Fully Visible
Fully Visible
                                  First Pass
           Fully Visible


                      Fully Visible
Fully Visible
                                   First Pass
           Fully Visible
                   Fully Visible




     Fully Visible
                                     Second Pass




Rendering order: Sub-objects of O2        O1
            Second Pass



Fully Visible
                Second Pass

Fully Visible
                Second Pass
Fully Visible
                                              Second Pass
                      Not Fully Visible
                              Fully Visible




Fully Visible

                Fully Visible
                Fully Visible
                                                Second Pass

                                Fully Visible




Fully Visible

                Fully Visible
Fully Visible                        After two
                                     passes
                     Fully Visible




     Fully Visible
PCS
  Algorithm

               Sub-object
Object Level
                 level      Exact Tests
 Pruning
                Pruning

                            Exact Overlap
                            tests using CPU
Visibility Queries

 We require a query
   Tests if a primitive is fully visible or not
 Current hardware supports
 occlusion queries
   Test if a primitive is visible or not
     Visibility Queries
                       Depth function
                GEQUAL        LESS
All fragments   Pass          Fail
                Fail          Pass


                Occlusion         Query not
                query             supported
      Examples - HP_Occlusion_test, NV_occlusion_query
Bandwidth Analysis

 Read back only integer
 identifiers
  Independent of screen resolution
Optimizations

 Use object bounding volume
 Use orthographic views for
 pruning
Outline

 Overview
 Pruning Algorithm
 Implementation and Results
 Conclusions and Future Work
Implementation

 Dell Precision workstation
 Dell M50 Laptop
Test Models: Environment 1
                      100
                      deforming
                      cylinders
                      Total – 20K
                      triangles
Test Models: Environment 2
                    Deforming
                    torii
                    Each torus –
                    20K triangles
Test Model: Environment 3
                  250K Dragon
                  35K Bunny
Test Model: Environment 4




Breaking dragon – 250K triangles
Bunny – 35K triangles
Implementation

 Dell Precision workstation,
 2.4GHz Pentium IV CPU, NVIDIA
 GeForce FX 5800 Ultra GPU, 2GB
 memory running Windows 2000
          Performance

                        Number of
                        objects v/s
(in ms)




                        collision
                        time
          Performance

                        Number of
                        polygons
(in ms)




                        v/s
                        collision
                        time
          Performance

                        Screen
                        resolution
                        v/s
(in ms)




                        collision
                        time
Advantages

 No coherence
 No assumptions on motion of
 objects
 Works on generic models
 A fast pruning algorithm
 No frame-buffer readbacks
Limitations

 No distance or penetration depth
 information
 Resolution issues
 No self-collisions
 Performance varies with relative
 configurations
Live Demo of Environment 4

 Dell M50 laptop, 2.4GHz Pentium
 IV-M CPU, NVIDIA Quadro4
 700GoGL GPU, 1GB memory
 running Windows XP
Live Demo of Environment 1

Avg. frames per second = 300
Conclusions

 Novel algorithm for collision
 detection using graphics
 hardware
   No assumptions on motion
 Linear time PCS computation
 algorithm
 No frame buffer readbacks
Conclusions

 First practical solution for
 general deformable models and
 breaking objects
Future Work

 Handle self-collisions
 Apply to more interactive
 applications
 Distance and penetration depth
 computation

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:5
posted:5/19/2012
language:English
pages:82