Quick-CULLIDE: Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

55
Quick-CULLIDE: Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware Naga K. Govindaraju, Ming C. Lin, Dinesh Man ocha University of North Carolina at Chapel Hill [IEEE VR 2005]

description

Quick-CULLIDE: Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware. Naga K. Govindaraju, Ming C. Lin, Dinesh Manocha University of North Carolina at Chapel Hill [IEEE VR 2005]. Introduction. Commonly used Alg. Bounding volume hierarchies Work well - PowerPoint PPT Presentation

Transcript of Quick-CULLIDE: Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Page 1: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Quick-CULLIDE: Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Naga K. Govindaraju, Ming C. Lin, Dinesh ManochaUniversity of North Carolina at Chapel Hill[IEEE VR 2005]

Page 2: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Introduction

Page 3: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Commonly used Alg.

Bounding volume hierarchies Work well

Object undergoing rigid motion Challenge

Non-rigid or deformable object Intra-object or self-collisions

Page 4: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Commonly used Alg. (GPU Based)

Increasingly used Check for overlaps Involve no pre-computation

Applicable to deformable and non-rigid models

However, Restricted to closed objects Do not check for self-collisions

Page 5: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Main Contributions

Similar to CULLIDE Uses visibility queries to compute a potenti

ally colliding set (PCS) Two major extensions

Formulation generalization For both inter- and intra-object

Pruning and culling alg. improvement To compute collision-free subsets

Page 6: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Feature

No assumptions about models Low bandwidth requirements Inter- and intra-object collision Image-precision

Page 7: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Implementation environment

3.4GHz PC NVIDIA GeForce FX 6800 Ultra card Objects composed of 10K to 250K trian

gles

Page 8: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Related Work

Page 9: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Rigid Body Algorithms

Use spatial data structures Include

Spatial-partitioning structures Bounding-volume hierarchies

Built during the pre-processing stage and are used to accelerate run-time queries

Page 10: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Deformable Modelsand Cloth Simulation

Hierarchical data structures Objects undergoing non-rigid motion Fast update of hierarchies of axis-align

ed bounding boxes (AABBs) Also check for self-collisions

Page 11: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

GPU-Based Algorithms

No pre-processing Suited for handling non-rigid motion

limited to closed objectsor involve frame-buffer readbacks

Frame-buffer readbacks Slow on current graphics systems Involve graphics pipeline stalls Limited by the bandwidth to CPU

Page 12: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Hybrid Algorithms

Combine some of the benefits of the object-space approaches along with GPU-based accelerations

Heidelberger et al., 2003 Layer depth images (LDIs) Vertex-in-volume tests was extended to check for self-collisions be

tween water-tight objects

Page 13: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Collision CullingUsing Visibility Queries

CULLIDE

Page 14: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Overview

Given n objects that are potentially colliding P1, ..., Pn, CULLIDE performs the full-visibility tests and computes a potentially colliding set (PCS) of objects

The full visibility of P is a sufficient condition that P does not overlap with S

Page 15: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Algorithm

Begins with an empty frame buffer First pass: Rasterize the primitives in th

e order P1, ..., Pn and test if they are fully visible. In this pass, if a primitive Pi is fully visible, then it does not intersect with any of the objects P1, ..., Pi−1

Page 16: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Algorithm -cont’

Second pass: Perform the same operations as in the first pass but the order of rendering is changed to Pn, .., P1. In this pass, if a primitive Pi is fully visible, then it does not intersect any of the objects Pn, .., Pi+1

Pruned if fully visible in both

Page 17: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Separating surface

Page 18: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Limitations

Self-collisions CULLIDE is based on the existence of a sep

arating surface between the geometric primitives

PCS is very conservative on meshes with connected triangles

Culling performance affects performance of the overall algorith

m Two novel alg. to overcome those

Page 19: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Collision CullingUsing Visibility Queries

Self-Collision Culling using GPUs

Page 20: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Possible Contacts

Touching Contacts Primitives touch each other at a point

or an edge Penetrating Contacts

Primitives penetrate each other Touching contacts often lead to

robustness issues. Ignore. Considers only the 2nd Contacts

Page 21: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Self-Colliding

A geometric primitive P is not potentially penetrating with a set of rasterized geometric primitivesif all the fragments generated by the rasterization of P have depth values less than or equal to those of the corresponding pixels in the frame buffer

Page 22: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Lemma 1 – to compute the PCS

Given n geometric primitives P1, P2, ..., Pn, a geometric primitive Pi does not belong to the PCS of self-colliding primitives if it does not penetrate with P1, .., Pi−1, Pi+1, ..., Pn, 1 i n.This test can be easily decomposed as follows: a geometric primitive Pi does not belong to the PCS of self-colliding primitives if it does not penetrate with P1, .., Pi−1 and with Pi+1, ..., Pn, 1 i n

Page 23: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Self-intersecting

Page 24: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Quick-CULLIDE

Efficient Culling

Page 25: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Collision-free Sets

Improve the culling efficiency Remove redundant visibility computations

Improve rasterization performance Reduce the number of rendering opeartion

s Reduce the number of pair-wise collisio

n tests

Page 26: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

PCS Object Classification

BFV Fully visible in both the passes Are pruned from the PCS

FFV Fully visible only in the first pass

SFV Fully visible only in the second pass

NFV Not fully visible in both the passes

Page 27: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Properties

The objects in each of these sets are ordered based on their rendering order in the first pass of the algorithm

BFV, FFV, SFV, and NFV are disjoint Lemmas & Proofs are upcoming…

Page 28: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Lemma 2

FFV and SFV are collision-free sets

Page 29: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Proof

Let S denote the set FFV and be composed of objects {O1

S ,O2S , ...Om

S }. We now prove that no two objects Oi

S and OjS in S collide with each other. W

ithout loss of generality, let i < j. Then, in the two-pass rendering algorithm, the object Oi

S is rendered prior to the object Oj

S. As the object OjS is fully

visible with respect to OiS , using Lemma 1 in CUL

LIDE, we conclude that the two objects do not collide. Therefore, FFV is collision-free. The proof for S = SFV is collision-free is similar

Page 30: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Lemma 3

For each object Oi FFV ,let Si = {Oj , j > i, Oj S} where S = SFV ∪ NFV .If an object Oi FFV does not collide with Si,then it does not collide with any of the objects in SFV or NFV and can be pruned from the PCS

Page 31: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Proof

Follows from Lemma 1 in CULLIDE.This lemma implies thatif an object Oi FFV and is fully visible in the second pass of the pruning algorithm,then it provides a sufficient condition to prune the object from the PCS

Page 32: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Lemma 4

For each object Oi SFV ,let Si = {Oj , j < i, Oj S}where S = FFV ∪ NFV .If an object Oi SFV does not collide with Si,then it does not collide with any of the objects in FFV or NFV and can be pruned from the PCS

Page 33: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Proof

Follows from Lemma 1 in CULLIDE.This lemma implies thatif an object Oi SFV and is fully visible in the first pass of the pruning algorithm,then it provides a sufficient condition to prune the object from the PCS

Page 34: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Lemma 5

Let S1 = FFV ∪ NFV be a set ordered by object indices in the increasing order and S2 = SFV ∪ NFV be a set ordered by object indices in the decreasing order. In the two-pass rendering algorithm, if we perform the first pass using objects in S1 and the second pass using objects in S2, and an object Oi is fully visible in both the passes, then it does not collide with any of the objects in FFV , SFV or NFV

Page 35: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Proof

Clearly the object Oi belongs to NFV = S1∩ S2 as it is fully visible in both the passes. It is trivial to see that the object does not collide with any of the objects in NFV .

We now prove that the object does not collide with any object Oj FFV . If j < i, then Oi does not collide with Oj as Oi is fully

visible in the first pass. If j > i, then Oj does not collide with Oi as Oj

FFV .

Similarly, we prove that the Oi does not collide with the objects in SFV

Page 36: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

QED

Using Lemmas 3, 4, and 5, it comes up with an efficient culling alg.

The first pass and second pass of CULLIDE are modified as follows…

Page 37: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

First Pass

For each object Oi in PCS, i=1,..,n If Oi SFV or Oi NFV , test whether the object

is fully visible using an occlusion query If Oi FFV or Oi NFV , render the object into t

he frame buffer For each object Oi in PCS, i=1,..,n

If Oi SFV or Oi NFV , and the occlusion query determines Oi as fully visible

If Oi SFV , then tag Oi as a member of BFV If Oi NFV , then tag Oi as a member of FFV

Page 38: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Second Pass

For each object Oi in PCS, i=n,..,1 If Oi FFV or Oi NFV , test whether the object

is fully visible using an occlusion query If Oi SFV or Oi NFV , render the object into t

he frame buffer For each object Oi in PCS, i=n,..,1

If Oi FFV or Oi NFV , and the occlusion query determines Oi as fully visible

If Oi FFV , then tag Oi as a member of BFV If Oi NFV , then tag Oi as a member of SFV

Page 39: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Both the passes

1. Objects that are fully visible in both the passes

This subset of objects belonging to NFV are pruned from the PCS(based on Lemma 5)

Page 40: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

The first pass

2. Objects that are fully visible in the first pass

NFV: These objects are removed from NFV and placed in FFV

SFV: These objects are removed from the PCS(based on Lemma 4)

FFV: Visibility computations are not performed for these objects in this pass as they are not needed

Page 41: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

The second pass

3. Objects that are fully visible in the second pass

NFV: These objects are removed from NFV and placed in SFV

FFV: These objects are removed from the PCS(based on Lemma 3)

SFV: Visibility computations are not performed for these objects in this pass as they are not needed

Page 42: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Improvement

The improved culling algorithm reduces the number of rendering operations and occlusion queries each by sizeof(FFV ∪ SFV ), as compared to CULLIDE

Page 43: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Collision Detection

1. Compute the PCS at the object level using this improved alg.

Sweep-and-prune on the PCS to compute the overlapping pairs

2. Compute the PCS at the sub-object level and the overlapping pairs

3. Perform exact interference tests between the triangles on the CPU

Page 44: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Implementation

Page 45: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Cloth

20K tri., 21 ms/f; X, Z views

Page 46: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Breaking objects

35K,250K tri., 25 ms/f; 3 axes views

Page 47: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Non-rigid objects

25 ms/f; deformable leaves

Page 48: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Performance

Page 49: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Cloth Simulation

Page 50: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Cloth Simulation

Page 51: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Performance

Page 52: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Factors

Depth complexity Depend upon the number of objects

that project onto the screen-space Order of rendering

Back-to-front works best Number of views

# of Views increase, smaller PCS

Page 53: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Advantages

Self-collisions Large number of objects Not perform framebuffer readbacks High image-space resolution Just a few milliseconds (<40ms) deformable, breaking, and non-rigid ge

ometry, as well as polygon-soup models

Page 54: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Disadvantage

No overlap information or the extent of penetration

Limited to image resolution Ignores touching contacts Best when back-to-front rendering Depends on object configurations

and the depth complexity

Page 55: Quick-CULLIDE:  Efficient Inter- and Intra-Object Collision Culling using Graphics Hardware

Future Work

Provide proximity computations Including distance and penetration depth c

omputation Explore the new programmability featu

res of GPUs