RT06 conferenceVlastimil Havran On the Fast Construction of Spatial Hierarchies for Ray Tracing Vlastimil Havran 1,2 Robert Herzog 1 Hans-Peter Seidel.

Slides:



Advertisements
Similar presentations
Sven Woop Computer Graphics Lab Saarland University
Advertisements

Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Fast Algorithms For Hierarchical Range Histogram Constructions
Ray Tracing Ray Tracing 1 Basic algorithm Overview of pbrt Ray-surface intersection (triangles, …) Ray Tracing 2 Brute force: Acceleration data structures.
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.
Two-Level Grids for Ray Tracing on GPUs
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Experiences with Streaming Construction of SAH KD Trees Stefan Popov, Johannes Günther, Hans-Peter Seidel, Philipp Slusallek.
Afrigraph 2004 Interactive Ray-Tracing of Free-Form Surfaces Carsten Benthin Ingo Wald Philipp Slusallek Computer Graphics Lab Saarland University, Germany.
Ray Tracing Acceleration Structures Solomon Boulos 4/16/2004.
I/O-Algorithms Lars Arge University of Aarhus March 1, 2005.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
Lars Arge1, Mark de Berg2, Herman Haverkort3 and Ke Yi1
Ray Tracing Dynamic Scenes using Selective Restructuring Sung-eui Yoon Sean Curtis Dinesh Manocha Univ. of North Carolina at Chapel Hill Lawrence Livermore.
OBBTree: A Hierarchical Structure for Rapid Interference Detection Gottschalk, M. C. Lin and D. ManochaM. C. LinD. Manocha Department of Computer Science,
Optimized Subdivisions for Preprocessed Visibility Oliver Mattausch, Jiří Bittner, Peter Wonka, Michael Wimmer Institute of Computer Graphics and Algorithms.
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
Fast Agglomerative Clustering for Rendering Bruce Walter, Kavita Bala, Cornell University Milind Kulkarni, Keshav Pingali University of Texas, Austin.
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.
November 6, /37 cs123 INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Acceleration Data Structures CS123.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Collision Detection David Johnson Cs6360 – Virtual Reality.
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.
Improving Min/Max Aggregation over Spatial Objects Donghui Zhang, Vassilis J. Tsotras University of California, Riverside ACM GIS’01.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
Chapter 10. Sampling Strategy for Building Decision Trees from Very Large Databases Comprising Many Continuous Attributes Jean-Hugues Chauchat and Ricco.
The X-Tree An Index Structure for High Dimensional Data Stefan Berchtold, Daniel A Keim, Hans Peter Kriegel Institute of Computer Science Munich, Germany.
On a Few Ray Tracing like Algorithms and Structures. -Ravi Prakash Kammaje -Swansea University.
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.
Using BSP for CD Ref: BSP in deBerg et al ’ s book (url)url.
Saarland University, Germany B-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Interactive Rendering With Coherent Ray Tracing Eurogaphics 2001 Wald, Slusallek, Benthin, Wagner Comp 238, UNC-CH, September 10, 2001 Joshua Stough.
Fast BVH Construction on GPUs (Eurographics 2009) Park, Soonchan KAIST (Korea Advanced Institute of Science and Technology)
Stefan Popov Space Subdivision for BVHs Stefan Popov, Iliyan Georgiev, Rossen Dimov, and Philipp Slusallek Object Partitioning Considered Harmful: Space.
Bin Yao (Slides made available by Feifei Li) R-tree: Indexing Structure for Data in Multi- dimensional Space.
Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Dynamic Scenes Paul Arthur Navrátil ParallelismJustIsn’tEnough.
Ray Tracing Animated Scenes using Motion Decomposition Johannes Günther, Heiko Friedrich, Ingo Wald, Hans-Peter Seidel, and Philipp Slusallek.
Interactive Ray Tracing of Dynamic Scenes Tomáš DAVIDOVIČ Czech Technical University.
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.
Compact, Fast and Robust Grids for Ray Tracing Ares Lagae & Philip Dutré 19 th Eurographics Symposium on Rendering EGSR 2008Wednesday, June 25th.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
BSP Tree Supplement Jyun-Ming Chen. Fall Kd-Tree and BSP tree kd-tree is a special kind of bsp tree.
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.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Path/Ray Tracing Examples. Path/Ray Tracing Rendering algorithms that trace photon rays Trace from eye – Where does this photon come from? Trace from.
Ray Tracing Acceleration (3)
1 The Method of Precomputing Triangle Clusters for Quick BVH Builder and Accelerated Ray Tracing Kirill Garanzha Department of Software for Computers Bauman.
Layout by orngjce223, CC-BY Compact BVH StorageFabianowski ∙ Dingliana Compact BVH Storage for Ray Tracing and Photon Mapping Bartosz Fabianowski ∙ John.
Bounding Volume Hierarchies and Spatial Partitioning
STBVH: A Spatial-Temporal BVH for Efficient Multi-Segment Motion Blur
Two-Level Grids for Ray Tracing on GPUs
Bounding Volume Hierarchies and Spatial Partitioning
Real-Time Ray Tracing Stefan Popov.
Ray Tracing Acceleration Techniques
Efficient Distance Computation between Non-Convex Objects
LCTS: Ray Shooting using Longest Common Traversal Sequences
Collision Detection.
BVH Student: Jack Chang.
David Johnson Cs6360 – Virtual Reality
Presentation transcript:

RT06 conferenceVlastimil Havran On the Fast Construction of Spatial Hierarchies for Ray Tracing Vlastimil Havran 1,2 Robert Herzog 1 Hans-Peter Seidel 1 1 MPI Informatik, Saarbruecken, Germany 2 Czech Technical University in Prague

RT06 conferenceVlastimil Havran Talk Outline Previous work H-trees AH-trees Performance results

RT06 conferenceVlastimil Havran Previous Work

RT06 conferenceVlastimil Havran Previous Work Kd-trees in O(N log N) Bounding volume hierarchies BVH in O(N log N) Two-level data structures for hierarchical motion (Wald et al. 03) Parallel tree traversal (Szecsi et al. 03) + Concurrent papers this year (EGSR’06, EG’06, RT06)

RT06 conferenceVlastimil Havran Approaches to Animated Scenes Set of frames, planned motion or not ? Some objects are moving (1%, 50%, or 100%?) Two Approaches Rebuild data structures from scratch for every frame Update data structures for new object positions

RT06 conferenceVlastimil Havran Most Objects Are Moving …. Rebuild from scratch? Why possibly better? High quality of data structures for ray tracing Fast rebuild from scratch is useful in general, also for larger static scenes Fast rebuild from scratch has not been addressed well in CG publications

RT06 conferenceVlastimil Havran Spatial Sorting Spatial sorting is a base of ray tracing, it is an extension to quicksort. Clearly, sorting is O(N log N) Why then radix-sort is O(N) ? Project goal: could we make faster spatial sorting in radix-sort like manner?

RT06 conferenceVlastimil Havran Some Other Issues Definition: object – 3D geometric primitive, which defines a bounding box, and operation ray-object intersection (point + normal) Binary-Interpolation Search: search over the monotonically increasing values in array, using two phases – interpolation search O(log log N) – binary search O(log N)

RT06 conferenceVlastimil Havran Intro to Spatial KD-trees (SKD-trees) Using two splitting planes Proposed by Ooi et al. in 1987 as spatial index for objects as extension to kd-trees Overlapping Configuration Disjoint Configuration

RT06 conferenceVlastimil Havran Spatial KD-trees Properties Each object is referenced just once It is not a spatial subdivision (spatial regions can overlap) More memory efficient than BVH (only two planes in a node, not six planes) Interesting candidate for ray tracing

RT06 conferenceVlastimil Havran Cost Model for Ray Tracing C_T … cost of traversing interior nodes C_L … cost of incidence operation in leaves C_R … cost of accessing the data from internal or external memory Typical cost model for a spatial hierarchy: C = C_T + C_L + C_R C = C_TS * N_TS + C_LO * N_LO + C_Access * N_Access

RT06 conferenceVlastimil Havran Cost Model Based Construction It is also referred to as SAH (surface area heuristics) Local greedy decision, where to put splitting planes + recursion + stopping criteria Cost = N_L * Prob_L + N_R * Prob_R Probability given by surface area of the box of the left and on the right child node Problem is evaluation of N_L and N_R

RT06 conferenceVlastimil Havran Normalized Cost Function for Many Objects

RT06 conferenceVlastimil Havran SKD-tree + Cost Model Using buckets to find out minimum of the cost (at most 100 buckets) Objects are put to buckets according to their centroids Recording also minima and maxima of object boxes in buckets Sweep-plane algorithm to compute tight left and right bounding boxes

RT06 conferenceVlastimil Havran Performance of Pure SKD-trees It is rather low, not competitive with kd-trees Low performance means: too many traversal steps and ray-object intersections Need for better bounding of objects A hybrid data structures using bounding primitives and SKD-tree nodes

RT06 conferenceVlastimil Havran How Many Bounding Volume Primitives in 3D ? Assumption: axis-aligned bounding planes In total 63 possibilities: – 1 plane, 6 cases – corresponds to kd-tree – 2 planes, 15 cases – we use only parallel planes (3 cases in 3D) – 3 planes, 20 cases – 4 planes, 15 cases – 5 planes, 6 cases – 6 planes, 1 case – corresponds to BVH

RT06 conferenceVlastimil Havran H-trees: SKD-trees + Bounding Volumes Primitives Seven types of internal nodes 3 types (x,y,z axis) 1 type (6 planes)

RT06 conferenceVlastimil Havran H-trees: Construction Algorithm Select an axis (X, or Y, or Z) Decide if to put an bounding node based on the cost (details in the paper) Select the number of buckets N (-,10,100) Distribute the objects to the buckets - keep minima and maxima in 3 axis in the bucket By sweep-plane compute cost function for all N buckets, select minimum cost Distribute the objects into left and right child Recurse until having one object in a node (leaf)

RT06 conferenceVlastimil Havran H-trees: Results Tests on SPD scenes (30 scenes) by Eric Haines + other 12 scenes of different distributions Used by recursive ray tracing and also only ray casting (primary rays) In paper results for only 9 scenes.

RT06 conferenceVlastimil Havran Reference: kd-trees Termination criteria: 4 objects in a leaf No split clipping operation O(N log N) complexity Highly optimized C++ code (but no SSE, no multithreading) Construction: about 1,0 seconds for 100,000 objects for 3.5 leaf references per object on a PC Ray tracing: about 300,000 rays per second for completely random rays (= incoherent rays)

RT06 conferenceVlastimil Havran H-trees: Results Parts of the cost model – N_TS … number of traversal steps – N_LO … number of ray object intersection tests – N_Access … number of memory accesses Timings for H-trees construction – 2.4 to 12 times faster than kd-trees Timings for tracing rays – Comparable with kd-trees

RT06 conferenceVlastimil Havran AH-trees: Motivation Avoid resorting Modification of method Reif and Tate, 1998, for a set of points in 3D, achieving time complexity O(N log log N) Mimic radix-sort and hence possibly decrease complexity Use cost model based on SAH Use H-trees nodes

RT06 conferenceVlastimil Havran AH-trees: Avoiding Resorting Use buckets in 3D = uniform grid in 3D Classify objects as “small” and “oversize” “Small object” allows to limit the object extent by a box if we know about the presence of an object in a grid cell

RT06 conferenceVlastimil Havran AH-trees: Construction Algorithm Select a grid resolution, construct grid Classify objects as “small” and “oversize” Construct H-trees over “small” objects in predefined position given by 3D grid, in leaves – Recurse by AH-trees construction algorithm – Recurse by H-trees construction algorithm – Create references to a leaf Decide to which level belong oversize objects Create ternary child nodes processing oversize objects, creating AH-trees or H-trees

RT06 conferenceVlastimil Havran AH-trees: Ternary child example Ternary child

RT06 conferenceVlastimil Havran AH-trees: Results Parts of the cost model – N_TS … number of traversal steps – N_LO … number of ray object intersection tests – N_Access … number of memory accesses Timings for AH-trees construction – 4 to 20 times faster than kd-trees Timings for tracing rays – Up to 4 times slower than kd-trees for skewed object distribution – Comparable to kd-trees for moderately uniform object distribution

RT06 conferenceVlastimil Havran AH-trees: Consideration The deeper in the hierarchy in a single grid, the resolution of cost function evaluation is smaller The spatial sorting is approximate using the object centroids There is a tradeoff between time complexity for construction and ray tracing performance For limited object size O(N log log N)

RT06 conferenceVlastimil Havran Ray Traversal Algorithm C/C++ switch for more node types (no problem, CPU branch prediction fails anyway) Interval-based technique similar to kd-trees (but overlapping intervals) The source code is straightforward For AH-trees the ternary child subtrees are traversed first

RT06 conferenceVlastimil Havran ConclusionConclusion Hybrid spatial hierarchy H-trees introduced as SKD-tree nodes + bounding volume nodes AH-trees as way of approximate sorting for H-trees, achieving smaller construction time and worse performance (tradeoff) Performance results in the paper

RT06 conferenceVlastimil Havran Future Work Implementation work: ray packets for H-trees Research work: tuning between construction time and performance for AH-trees Hybrid trees with more types of nodes

RT06 conferenceVlastimil Havran Take Home Message Efficient ray tracing = Efficient spatial hierarchy (tree) Efficient = performance = cost model Efficient spatial hierarchy – top-down construction – cost-based model decision (with SAH) – termination criteria State of the art ?

RT06 conferenceVlastimil Havran Popper’s model of natural sciences real inputs experiments design analysis implementation Falsifiable hypothesis Asymptotic bounds induction deduction Karl Popper, 1934 (The Logic of Scientific Discovery)