Bounding Volume Hierarchies and Spatial Partitioning

Slides:



Advertisements
Similar presentations
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Advertisements


Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Collision Detection CSCE /60 What is Collision Detection?  Given two geometric objects, determine if they overlap.  Typically, at least one of.
Collision Detection and Resolution Zhi Yuan Course: Introduction to Game Development 11/28/
Computer graphics & visualization Collisions. computer graphics & visualization Simulation and Animation – SS07 Jens Krüger – Computer Graphics and Visualization.
Ray Tracing CMSC 635. Basic idea How many intersections?  Pixels  ~10 3 to ~10 7  Rays per Pixel  1 to ~10  Primitives  ~10 to ~10 7  Every ray.
CS 445 Greg Humphreys, Spring 2003 Ray Tracing 2: Acceleration.
CSE 381 – Advanced Game Programming Scene Management
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
Advanced Data Structures for Games and Graphics Lecture 4
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Collision Detection David Johnson Cs6360 – Virtual Reality.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
10/02/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Octrees.
Computer Graphics 2 Lecture x: Acceleration Techniques for Ray-Tracing Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Data Structures for Computer Graphics Point Based Representations and Data Structures Lectured by Vlastimil Havran.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Managing Your Objects Paul Taylor 2009 Assignment Due Fri 5/6/2009.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
CSE 381 – Advanced Game Programming Quickhull and GJK.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Institute of C omputer G raphics, TU Braunschweig Hybrid Scene Structuring with Application to Ray Tracing 24/02/1999 Gordon Müller, Dieter Fellner 1 Hybrid.
Collision/Acceleration University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2013 Tamara Munzner.
12/4/2001CS 638, Fall 2001 Today Managing large numbers of objects Some special cases.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Spatial Subdivision Techniques SAMPL Group Presentation By Gerald Dalley.
Chapter 11 Collision Detection 가상현실 입문 그래픽스 연구실 민성환.
Ray Tracing II. HW1 Part A due October 10 Camera module Object module –Read from a file –Sphere and Light only Ray tracer module: –No shading. No reflection.
Presented by Paul Phipps
Maths & Technologies for Games Spatial Partitioning 2
Ray Tracing Optimizations
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
Ray Tracing Acceleration (5). Ray Tracing Acceleration Techniques Too Slow! Uniform grids Spatial hierarchies K-D Octtree BSP Hierarchical grids Hierarchical.
David Luebke3/12/2016 Advanced Computer Graphics Lecture 3: More Ray Tracing David Luebke
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Ray Tracing Acceleration (3)
Hierarchical Data Structure in Game Programming Yanci Zhang Game Programming Practice.
CS552: Computer Graphics Lecture 28: Solid Modeling.

Computer Graphics Implementation II
Distance Computation “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presentation by Julie Letchner.
Collision Detection Spring 2004.
Bounding Volume Hierarchies and Spatial Partitioning
Deformable Collision Detection
Modeliranje kompleksnih modelov
Real-Time Ray Tracing Stefan Popov.
Parts of these slides are based on
Anti-aliased and accelerated ray tracing
Collision Detection.
Deformable Collision Detection
Ray Tracing Sung-Eui Yoon (윤성의) CS580: Course URL:
BVH Student: Jack Chang.
David Johnson Cs6360 – Virtual Reality
Modeliranje kompleksnih modelov
Data Mining CSCI 307, Spring 2019 Lecture 23
Presentation transcript:

Bounding Volume Hierarchies and Spatial Partitioning Borrowed from … Kenneth E. Hoff III COMP-236 lecture Spring 2000

Introduction Bounding Volume Hierarchies vs. Spatial Partitioning What are they and how do they compare? Motivation: Need for Speed! Demonstration through applications: View-frustum culling, ray-tracing, collision detection How can hierarchies help? Apply to example applications Building bounding volume hierarchies Building spatial partitionings What’s the best choice? Can we do better?

What are they? How do they Compare? Bounding Volume Hierarchies Hierarchical object representation Object subdivision Hierarchical clustering of objects Object levels of detail Classifies regions of space around objects Examples: OBB-trees AABB-trees Sphere-trees k-DOPs Spatial Partitioning Hierarchical spatial representation Spatial subdivision Hierarchical clustering of space Spatial levels of detail Classifies objects around regions of space Examples: Uniform grids Quadtrees & Octrees BSP-trees kD-trees

Bounding Volume Hierarchies Examples Bounding Volume Hierarchies Tightly fits objects Redundant spatial representation Spatial Partitioning Tightly fills space Redundant object representation

Examples Bounding Volume Hierarchies Spatial Partitioning Tightly fits objects Redundant spatial representation Spatial Partitioning Tightly fills space Redundant object representation Volumes overlap multiple objects Objects overlap multiple volumes

Examples Bounding Volume Hierarchies Spatial Partitioning Tightly fits objects Redundant spatial representation Spatial Partitioning Tightly fills space Redundant object representation Volumes overlap multiple objects Objects overlap multiple volumes

Examples Bounding Volume Hierarchies Spatial Partitioning Tightly fits objects Redundant spatial representation Spatial Partitioning Tightly fills space Redundant object representation Volumes overlap multiple objects Objects overlap multiple volumes

Motivation: Example Applications View-frustum culling O(n) Ray-tracing O(n) per ray Collision detection O(n2) n: number of objects in the scene

How do we speed it up? More efficient intersection calculations Avoid intersection calculations Make a single intersection calculation to decide for an entire cluster of objects or space Cluster hierarchically

How can bounding volume hierarchies help? View-frustum culling Ray-tracing Collision detection

How can bounding volume hierarchies help? View-frustum culling Ray-tracing Collision detection

How can bounding volume hierarchies help? View-frustum culling Ray-tracing Collision detection

How can bounding volume hierarchies help? View-frustum culling Ray-tracing Collision detection

How can bounding volume hierarchies help? Logarithmic search for intersecting primitives!

How can spatial partitioning help? View-frustum culling Ray-tracing Uniform spatial partitioning Collision detection

How can spatial partitioning help? Performance varies for uniform partitioning, but hierarchical approaches also give logarithmic search for intersecting primitives!

What are the potential problems? What are the hidden costs? When nothing intersects? When nearly everything intersects? What are the worst cases? Is it worth it? What applications get the most benefit? What about just using my modeling hierarchy? Too shallow (not fine enough level of detail Designed for object manipulation rather than minimizing intersections Insensitive to actual positions of objects

Building Bounding Volume Hierarchies Choose a bounding volume type Axis-aligned bounding box (AABB) Oriented bounding box (OBB) Sphere Convex Hull k-DOP (discrete oriented polytope) Choose a clustering strategy Top-down: how do we partition objects among children? Bottom-up: how do we find leaf clusters and merge into parents?

Bounding Volume Type AABB OBB Sphere Convex Hull 6-DOP Intersection cost vs. tightness of fit vs. storage overhead vs. implementation complexity How do we find the best fit for a particular bounding volume? AABBs and convex hulls are clear. What about spheres, k-DOPs, and OBBs? How do we compare the quality of fit between different BVs? Min volume, min surface area, etc.

Hierarchical Clustering Strategy Top-down: how do we partition objects among children? Choosing splitting axis longest dimension, largest spread of objects, etc. Choosing split point mean, median, largest gap, etc. Bottom-up: how do we find leaf clusters and merge into parents? Leaf object clusters single primitive, specific minimum size cluster, etc. Merging children into parent Nearest neighbors: uniform subdivision, Voronoi diagram

Building Spatial Partitionings Decide how to recursively subdivide space (top-down) Uniform subdivision Quadtree kD-tree BSP-tree Decide how to classify objects into regions of space with respect to partitioning plane Store in both regions, Store with partition, or Split geometry

What’s the best choice? Depends on the application Factors: trial and error? “Gut” feeling? Careful analysis based on a cost function? Factors: Complexity of implementation Storage overhead Computational overhead Type of geometry: static or dynamic

Can we do better? Combining bounding volume hierarchies and spatial partitioning Examples: Occlusion culling: octrees of BSP-trees Radiosity: 3D BSP-trees of 2D BSP-trees Hybrid bounding volume hierarchies adaptive nodes adaptive trees performance driven metrics

Conclusion These hierarchical data structures are fundamental in a wide variety of graphics problems most common way of obtaining high performance Important to be very familiar with the possible variations these structures appear everywhere! Despite tremendous amount of previous publications, still lots of room for further research warning: difficult problems ahead!

References Andrew Glassner An Introduction to Ray Tracing David Rogers Procedural Elements for Computer Graphics Tomas Möller and Eric Haines Real-Time Rendering Alan and Mark Watt Advanced Animation and Rendering Techniques Foley, van Dam, Feiner, and Hughes Computer Graphics: Principles and Practice Stefan Gottschalk’s Dissertation: OBB-tree