The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Geometric Computations on GPU: Proximity Queries Avneesh Sud &Dinesh Manocha.

Slides:



Advertisements
Similar presentations
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware.
Advertisements

2.5. B ASIC P RIMITIVE I NTERSECTION Details of common forms of primitive intersection test.
Complete Motion Planning
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Optimized Stencil Shadow Volumes
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
2.1. C OLLISION D ETECTION Overview. Collision detection is used within many types of application, e.g. from robotics, through engineering simulations,
Visibility Culling using Hierarchical Occlusion Maps Hansong Zhang, Dinesh Manocha, Tom Hudson, Kenneth E. Hoff III Presented by: Chris Wassenius.
Collision Detection for Deformable Models Huai-Ping Lee
Delaunay Triangulation on the GPU Dan Maljovec. CPU Delaunay Triangulation Randomized Incremental Algorithm 1.Construct Bounding triangle 2.Choose point.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Fast Penetration Depth Computation for Physically-based Animation Y. Kim, M. Otaduy, M. Lin and D.
Collision Detection on the GPU Mike Donovan CIS 665 Summer 2009.
UNC Chapel Hill M. C. Lin References Collision Detection between Geometric Models: A Survey, by M. Lin and S. Gottschalk, Proc. of IMA Conference on Mathematics.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
Adapted from: CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Naga K. Govindaraju, Stephane.
Fast Computation of Generalized Voronoi Diagrams Using Graphics Hardware Kenneth E. Hoff III, Tim Culver, John Keyser, Ming Lin, and Dinesh Manocha University.
02/22/ Manocha Interactive Modeling and Simulation using Graphics Processors Dinesh Manocha University of North Carolina at Chapel Hill
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Continuous Collision Detection David Knott COMP 259 class presentation.
Interactive Shadow Generation in Complex Environments Naga K. Govindaraju, Brandon Lloyd, Sung-Eui Yoon, Avneesh Sud, Dinesh Manocha Speaker: Alvin Date:
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
UNC Chapel Hill M. C. Lin Overview of Last Lecture About Final Course Project –presentation, demo, write-up More geometric data structures –Binary Space.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Constraint-Based Motion Planning using Voronoi Diagrams Maxim Garber and Ming C. Lin Department of Computer.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Collision Detection for Deformable Objects Xin Huang 16/10/2007.
Collision Detection David Johnson Cs6360 – Virtual Reality.
Parallel Graphics Rendering Matthew Campbell Senior, Computer Science
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Hidden Surface Removal
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
Database and Stream Mining using GPUs Naga K. Govindaraju UNC Chapel Hill.
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
Visibility Queries Using Graphics Hardware Presented by Jinzhu Gao.
REAL-TIME VOLUME GRAPHICS Markus Hadwiger VRVis Research Center, Vienna Eurographics 2006 Real-Time Volume Graphics [04] GPU-Based Ray-Casting.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
Cg Programming Mapping Computational Concepts to GPUs.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Quick-CULLIDE: Efficient Inter- and Intra- Object Collision Culling using Graphics Hardware Naga K. Govindaraju, Ming C. Lin, Dinesh Manocha University.
Occlusion Query. Content Occlusion culling Collision detection (convex) Etc. Fall
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Interactive Geometric Computations using Graphics Processors Naga K. Govindaraju UNC Chapel Hill.
Collision and Proximity Queries Dinesh Manocha Department of Computer Science University of North Carolina
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Accelerated Stereoscopic Rendering using GPU François de Sorbier - Université Paris-Est France February 2008 WSCG'2008.
UNC Chapel Hill M. C. Lin Introduction to Motion Planning Applications Overview of the Problem Basics – Planning for Point Robot –Visibility Graphs –Roadmap.
Delaunay Triangulation on the GPU
Graphics Interface 2009 The-Kiet Lu Kok-Lim Low Jianmin Zheng 1.
Fateme Hajikarami Spring  What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations.
Computer Graphics I, Fall 2010 Implementation II.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
CULLIDE: Interactive Collision Detection Between Complex Models in Large Environments using Graphics Hardware Presented by Marcus Parker By Naga K. Govindaraju,
Interactive Continuous Collision Detection for Polygon Soups Xin Huang 11/20/2007.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
Computer Graphics Implementation II
Week 2 - Friday CS361.
Graphics Processing Unit
References Additional lecture notes for 2/18/02.
GPGPU: Distance Fields
Implementation II Ed Angel Professor Emeritus of Computer Science
Graphics Processing Unit
Visibility Computations
Collision Detection.
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Geometric Computations on GPU: Proximity Queries Avneesh Sud &Dinesh Manocha

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL This Lecture Proximity Queries: Overview Visibility computations using GPUs Reliable GPU-based Computations Collision Detection Proximity Queries using Discrete Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Proximity Queries Collision Detection

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Proximity Queries Penetration Depth  Contact forces

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Proximity Queries Separation Distance  Repulsive force, time of contact

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Motivation: Driving Applications Computer animation Surgical simulation Robotics Haptics Bioinformatics

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Motivation Interactive proximity computation among general deformable models Inter-object queries among multiple models

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Motivation Interactive proximity computation among general deformable models Intra-object (self- proximity) queries in cloth simulation

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL This Lecture Proximity Queries: Overview Visibility computations using GPUs Reliable GPU-based Computations Collision Detection Proximity Queries using Discrete Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Graphics Processing Units (GPUs) Well-designed for visibility computations Rasterization – image-space visibility Massively parallel Render millions of polygons per second Well suited for image-based algorithms High growth rate

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Recent growth rate of Graphics Processing Units CardMillion triangles/sec Radeon 9700 Pro325 GeForce FX Radeon 9800 XT412 GeForce FX GeForce GeForce GeForce 8800?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL GPUs: Geometric Computations Used for geometric applications Minkowski sums [ Kim et al. 02 ] CSG rendering [ Goldfeather et al. 89, Rossignac et al. 90 ] Voronoi computation [ Hoff et al. 01, 02, Sud et al. 04 ] Isosurface computation [ Pascucci 04 ] Map simplification [ Mustafa et al. 01 ] Collision Detection [ Govindaraju03, Govindaraju04 ] Proximity Computations [ Sud06 ]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Graphics Processing Units (GPUs) Well-designed for visibility computations Rasterization – image-space visibility Massively parallel Render millions of polygons per second Well suited for image-based algorithms High growth rate

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Setup Engine Stream of transformed vertices Setup of setup commands and state Vertex Processing Engines Pixel Processing Engines Stream of visible pixels Alpha test Stencil test Depth test Stream of vertices IEEE Floating Point (32-bit) Limited Resolution! Draw stream of triangles CPU GPU Visibility of triangles GPU

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Draw stream of triangles CPU GPU Visibility of triangles Vertex Processing Engines Setup Engine Stream of vertices Stream of visible pixels Alpha test Pixel Processing Engines Stencil test Depth test Stream of transformed vertices Setup of setup commands and state count of visible pixels GPU

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL GPUs for Geometric Computations: Issues Precision Frame-buffer readbacks

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Pixel Processing Engines Stream of visible pixels Limited Resolution! Resolution along X, Y,Z X – 13 bits fixed precision Y – 13 bits fixed precision Z – 24 bits fixed precision* On CPU – 32-bit or 64-bit floating-point precision Frame-Buffer Precision

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Frame-Buffer Readback Involve stalls Affect throughput Slow!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Frame-Buffer Readback Performance Data Courtesy: June 2004www.techreport.com Readback of 1Kx1K frame-buffer takes 18 ms over PCI-Express

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 Solutions Frame-Buffer Readbacks  Minimize readback data (eg Visibility information) Precision  Refine answer on CPU

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL NV Occlusion Query Extension name: NV_occlusion_query Returns pixel count – the no. of pixels that pass Provides an interface to issue multiple queries at once before asking for the result of any one Applications can now overlap the time it takes for the queries to return with other work increasing the parallelism between CPU and GPU

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL NV Occlusion Query – How to Use (1) (Optional) Disable Depth/Color Buffers (Optional) Disable any other irrelevant non-geometric state Generate occlusion queries Begin i th occlusion query Render i th (bounding) geometry End occlusion query Do other CPU computation while queries are being made (Optional) Enable Depth/Color Buffers (Optional) Re-enable other state Get pixel count of i th query If (count > MAX_COUNT) render i th geometry

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL NV Occlusion Query – How to Use (2) Generate occlusion queries Gluint queries[N]; GLuint pixelCount; glGenOcclusionQueriesNV(N, queries); Loop over queries for (i = 0; i < N; i++) { glBeginOcclusionQueryNV(queries[i]); // render i th geometry glEndOcclusionQueryNV(); } Get pixel counts for (i = 0; i < N; i++) { glGetOcclusionQueryuivNV(queries[i], GL_PIXEL_COUNT_NV, &pixelCount); if (pixelCount > MAX_COUNT) // do work for i th geometry }

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL This Lecture Proximity Queries: Overview Visibility computations using GPUs Reliable GPU-based Computations Collision Detection Proximity Queries using Discrete Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL GPU: Culling Coprocessor AABB Culling Exact Tests 2.5D Overlap Tests Voronoi-Based Culling Collision Distance Potential Neighbor Set N-Objects GPU-Based Culling Potential Colliding Set

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Inaccuracies in GPU-Based Algorithms Image sampling Depth buffer precision [Govindaraju, Lin, Manocha, Special Issue on Best Papers of ACM VRST’04 in IEEE TVCG]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Image Sampling Occurs when a primitive does not cover any pixels

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Image Sampling Primitives are rasterized but no intersecting points are sampled by hardware Viewport C = pixel center Intersecting point

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Depth Buffer Precision Intersecting points are sampled but precision is not sufficient Viewport C = pixel center Intersecting point T1T1

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Overcome Image Sampling Sufficiently fatten the triangles Use Minkowski sums Minkowski Sum A B = A B = {a + b: a A, b B}

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PLPL Minkowski Sum: Example P L

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL This Lecture Proximity Queries: Overview Visibility computations using GPUs Reliable GPU-based Computations Collision Detection Proximity Queries using Discrete Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Goal Interactive collision detection between complex objects Large number of objects High primitive count Non-convex objects Open and closed objects

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Non-rigid Motion Deformable objects Changing topology Self-collisions

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL CULLIDE: Overview Potentially Colliding Set (PCS) computation Exact collision tests on the PCS [Govindaraju, Redon, Lin, Manocha, ACM Graphics Hardware 2003]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Algorithm Object-Level Pruning Subobject- Level Pruning Exact 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 Algorithm Object-Level Pruning Subobject- Level Pruning Exact 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

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility of Objects An object is fully visible if it is completely in front of the remaining objects O1O1 O View O2O2

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility for Collisions: Geometric Interpretation Sufficient but not a necessary condition for existence of separating surface with unit depth complexity O1O1 O View O2O2

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Pruning Prune objects that do not collide

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Pruning O 1 O 2 … O i-1 O i O i+1 … O n-1 O n

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation Each object tested against all objects but itself Naive algorithm is O(n 2 ) Linear time algorithm Uses two pass rendering approach Conservative solution

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i O i+1 … O n-1 O n Render

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL O 1 O 2 … O i-1 O i PCS Computation: First Pass Fully Visible? Render Yes. Does not collide with O 1,O 2,…,O i-1

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i O i+1 … O n-1 O n Render Fully Visible?

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: Second Pass O 1 O 2 … O i-1 O i O i+1 … O n-1 O n Render

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: Second Pass Render Fully Visible? O i O i+1 … O n-1 O n Yes. Does not collide with O i+1,…,O n-1,O n

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: Second Pass Render Fully Visible? O 1 O 2 … O i-1 O i O i+1 … O n-1 O n

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation O 1 O 2 … O i-1 O i O i+1 … O n-1 O n Fully Visible

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation O 1 O 2 O 3 … O i-1 O i O i+1 … O n-2 O n-1 O n O 1 O 3 … O i-1 O i+1 … O n-1

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Algorithm Object-Level Pruning Subobject- Level Pruning Exact Tests

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL CULLIDE Algorithm Object-Level Pruning Subobject- Level Pruning Exact Tests Exact overlap tests using CPU

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Full Visibility Queries on GPUs We require a query Tests if a primitive is fully visible or not Current hardware supports occlusion queries Test if only part of a primitive is visible or not Our solution Change the sign of the depth function

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Full Visibility Queries on GPUs Depth function GEQUALLESS All fragments Pass FailPass Fail PassFailPassFail 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 Computation at high screen resolutions

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Demo: CULLIDE

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Quick-CULLIDE Improved two-pass algorithm Utilize visibility relationships among objects across different views Handle intra-object collisions [Govindaraju, Lin, Manocha, IEEE Virtual Reality 2005]

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Quick-CULLIDE: Visibility Sets Decompose PCS into four disjoint sets FFV (First pass Fully Visible) SFV (Second pass Fully Visible) NFV (Not Fully Visible in either passes) BFV (Both passes Fully Visible) Visibility sets have five interesting properties!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility Sets: Properties FFV and SFV are collision-free sets

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i … O j … O n-1 O n Render

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i … O j … O n-1 O n Render Fully Visible

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility Sets: Properties It is sufficient to test visibility of objects in FFV in second pass only

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i O i+1 … O n-1 O n

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL O 1 O 2 … O i-1 O i PCS Computation: First Pass Render

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i O i+1 … O n-1 O n Not Colliding Collision tested in Second pass

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility Sets: Properties It is sufficient to render objects in FFV in first pass only!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation: First Pass O 1 O 2 … O i-1 O i O i+1 … O n-1 O n

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL O 1 O 2 … O i-1 O i PCS Computation: First Pass Render

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL PCS Computation O 1 O 2 … O i-1 O i O i+1 … O n-1 O n Not Colliding Render

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility Sets: Properties It is sufficient to test the visibility of objects in SFV in first pass only!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Visibility Sets: Properties It is sufficient to render objects in SFV in second pass only!

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Quick-CULLIDE: Advantages Better culling efficiency Lower depth complexity than CULLIDE Always better than CULLIDE Faster computational performance Lower number of visibility queries and rendering operations Can handle self-collisions

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Self-Collisions: Definition Pairs of overlapping triangles in an object that are not neighboring

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Self-Collisions: Definition Pairs of overlapping triangles in an object that are not neighboring

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Self-Collisions Occur in most deformable simulations Image Courtesy: Baraff and Witkin, SIGGRAPH 2003 Artifacts

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Solution Classification of contacts between triangles in an object Touching contacts Penetrating contacts

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Contacts: Classification (a) (b)(c) Touching Contacts Penetrating Contact

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Solution Ignore touching contacts Consider only penetrating contacts Redefine fully visible We pass a fragment when a touching contact occurs Pass all fragments with depth ≤ corresponding depths in frame-buffer

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Demo: Quick-CULLIDE

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x Given a primitive P P

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x P x is the portion of P projecting inside pixel X Pixel X PxPx

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL S Reliability z x S is a sphere centered at origin bounding pixel X Pixel X PxPx

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x If we compute Minkowski sum P x S = P x S, Pixel X PxSPxS PxPx

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x PxPx then the rasterization of the Minkowski sum P x S generates two fragments Pixel X PxSPxS Sample Depths

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x PxPx and the fragments bound depth values in P x Pixel X PxSPxS Sample Depths

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x P1P1 Given two primitives P 1 and P 2 Pixel X P2P2

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability d x P1P1 If P 1 and P 2 intersect in 3-D, Pixel X P2P2 P 1 and P 2 intersect in 3-D

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability d x P1P1 and we compute their Minkowski sums with a pixel-sized sphere centered at origin Pixel X P2P2

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Reliability z x P1P1 rasterization of the Minkowski sums overlap in image-space Pixel X P2P2

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL z x Pixel X P1P1 P2P2 P1SP1S P2SP2S

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Bounding Offsets of a Triangle Exact Offsets Three edge-aligned cylinders, three spheres, two triangles Can be rendered using fragment programs Expensive! Oriented Bounding Box (OBB)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Union of OBBs

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Demo: R-CULLIDE

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL This Lecture Proximity Queries: Overview Visibility computations using GPUs Reliable GPU-based Computations Collision Detection Proximity Queries using Discrete Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL N-Body Distance Query Given a set of sites, find all closest pairs Nearest-neighbor for each site 1  5 2  1 3  1 4  1 5  1 6 

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Goal Compute N-Body distance efficiently Culling For each site, compute Potential Neighbor Set (PNS) of sites  5

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Goal Compute N-Body distance efficiently For each site, compute Potential Neighbor Set (PNS) of sites Contains nearest neighbor PNS(1) = {5,3}

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Outline Related work N-Body distance queries Culling using second order discrete Voronoi diagrams Results

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Voronoi Culling for N-Body Query AABB Culling Voronoi-based Culling N-Objects Stage IStage II Exact Distance Tests Potential Neighbor Set Stage III

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Second-order Voronoi Diagram Governors = 2 closest sites

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Benefit of Second-order Voronoi Diagram Voronoi diagram: Spatial partition based on proximity Second-order Voronoi diagram: Proximity to two sites Nearest neighbor information

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Culling using Second-order Voronoi Diagram Polygonal Objects

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Culling using Second-order Voronoi Diagram PNS(1) = Sites whose second order Voronoi regions intersect Second order Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Culling using Second-order Voronoi Diagram PNS(1) = Sites whose second order Voronoi regions intersect 1 PNS(1) = {2,3} Second order Voronoi diagram provides PNS for all sites 123 PNS(1)

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Culling using Second-order Voronoi Diagram PNS(1) = Sites whose second order Voronoi regions intersect 1 Second order Voronoi diagram provides PNS for all sites PNS(1) = {2,3} PNS(2) = {1,4,9} 12 PNS(2) 9 4

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Culling using Second-order Voronoi Diagram PNS(1) = Sites whose second order Voronoi regions intersect 1 Second order Voronoi diagram provides PNS for all sites PNS(1) = {2,3} PNS(2) = {1,4,9} … PNS(9) = {2,8} 2 PNS(9) 9 8

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Proximity Culling using Discrete Voronoi Diagram Computing exact Voronoi diagram difficult

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Proximity Culling using Discrete Voronoi Diagram Computing exact Voronoi diagram difficult Compute Discrete Voronoi Diagram (DVD) Interactive computation using GPU Second order  details in thesis Discrete Voronoi Diagram

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Distance Bounds for Conservative Computation Under-sampling errors Provides approximate separation distance (SD) SD’ SD

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Distance Bounds for Conservative Computation Theorem (Distance bounds): SD’

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Distance Bounds for Conservative Computation Theorem (Distance bounds): SD’ -  < SD < SD’ +  SD’ = Approximate Separation Distance SD = Exact Separation Distance  = Grid resolution SD

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Distance Bounds for Conservative Computation Compute PNS using distance bounds Exact tests on CPU

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Collision Detection Well studied Computer graphics, computational geometry etc. Widely used in games, simulations, virtual reality applications Often a computational bottleneck

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Interactive Collision Detection

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Interactive Collision Detection Visibility to reduce number of pair-wise overlap tests