Ray Tracing Acceleration Techniques

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.
Restart Trail for Stackless BVH Traversal Samuli Laine NVIDIA Research.
CSE 681 Bounding Volumes. CSE 681 Bounding Volumes Use simple volume enclose object(s) tradeoff for rays where there is extra intersection test for object.
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.
A Coherent Grid Traversal Algorithm for Volume Rendering Ioannis Makris Supervisors: Philipp Slusallek*, Céline Loscos *Computer Graphics Lab, Universität.
CS 445 Greg Humphreys, Spring 2003 Ray Tracing 2: Acceleration.
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Ray Tracing Variants Distributed ray tracing Generalized rays Cone Tracing Beam Tracing Pencil.
Week 14 - Monday.  What did we talk about last time?  Bounding volume/bounding volume intersections.
Collision Detection CSE 191A: Seminar on Video Game Programming Lecture 3: Collision Detection UCSD, Spring, 2003 Instructor: Steve Rotenberg.
Ray Tracing Acceleration Structures Solomon Boulos 4/16/2004.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
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.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Acceleration Digital Image Synthesis Yung-Yu Chuang 10/4/2005 with slides by Mario Costa Sousa and Pat Hanrahan.
Computer Graphics 2 Lecture x: Acceleration Techniques for Ray-Tracing Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
MIT EECS 6.837, Durand and Cutler Acceleration Data Structures for Ray Tracing.
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)
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Memory Management and Parallelization Paul Arthur Navrátil The University of Texas at Austin.
Interactive Ray Tracing of Dynamic Scenes Tomáš DAVIDOVIČ Czech Technical University.
第五课 Ray Tracing. Overview of the Section Why Ray Tracing? What is Ray Tracing? How to tracing rays? How to accelerating ray-tracing?
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
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.
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
MIT EECS 6.837, Durand and Cutler Acceleration Data Structures for Ray Tracing.
Ray Tracing Optimizations
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
RENDERING : Global Illumination
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”
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 (1). Acceleration of Ray Tracing Goal: Reduce the number of ray/primitive intersections.
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.
Advanced Computer Graphics
Computer Graphics CSE 167 [Win 17], Lectures 16, 17:
Bounding Volume Hierarchies and Spatial Partitioning
CSE 167 [Win 17], Lecture 15: Ray Tracing Ravi Ramamoorthi
Photorealistic Rendering vs. Interactive 3D Graphics
Hybrid Ray Tracing and Path Tracing of Bezier Surfaces using a mixed hierarchy Rohit Nigam, P. J. Narayanan CVIT, IIIT Hyderabad, Hyderabad, India.
Bounding Volume Hierarchies and Spatial Partitioning
Ray Tracing Dr. Scott Schaefer.
Real-Time Ray Tracing Stefan Popov.
3D Graphics Rendering PPT By Ricardo Veguilla.
3D Object Representations
Parts of these slides are based on
Digital Image Synthesis Yung-Yu Chuang 10/1/2008
Anti-aliased and accelerated ray tracing
CMSC 635 Ray Tracing.
Digital Image Synthesis Yung-Yu Chuang 10/5/2006
Collision Detection.
CSCE 441: Computer Graphics Ray Tracing
Ray Tracing on Programmable Graphics Hardware
Anti-aliased and accelerated ray tracing
Ray Tracing Sung-Eui Yoon (윤성의) CS580: Course URL:
GEARS: A General and Efficient Algorithm for Rendering Shadows
Presentation transcript:

Ray Tracing Acceleration Techniques Approaches Faster Intersection Fewer Rays Generalized N 1 Tighter bounds Faster intersector Uniform grids Spatial hierarchies k-d, oct-tree, bsp hierarchical grids Hierarchical bounding volumes (HBV) Early ray termination Adaptive sampling Beam tracing Cone tracing Pencil tracing Readings Arvo and Kirk Arvo, Metahierarchies Havran and “Best Efficiency Scheme” Beam tracing techniques fail for two reasons: Intersection calculations are too complicated; imagine cone-algebraic surface Beams don’t remain closed under reflection and refraction off curved surfaces Bounds First test bounds, then do detailed intersection calculation Trade-off on how tight the bounds are; the tighter the bound, the higher the Probability of a real intersection given an intersection with the bound, but the higher the cost of rejection.

Primitives pbrt primitive base class Shape Material and emission (area light) Primitives Basic geometric primitive Primitive instance Transformation and pointer to basic primitive Aggregate (collection) Treat collections just like basic primitives Incorporate acceleration structures into collections May nest accelerators of different types Types: grid.cpp and kdtree.cpp

Uniform Grids Preprocess scene 1. Find bounding box Two reasons for using a grid. Cull out objects not near the ray. Only consider those objects in the voxels along the ray’s path Early termination. Stop when you find the point of closest intersection.

Uniform Grids Preprocess scene Find bounding box Determine resolution Setting the resolution is tricky. If the resolution is too high, then you step through too many voxels. If the resolution is too low, then you perform too many intersections. Add Tim’s study of voxel density. Roughly set so that the average time spent walking voxels is equal to the average time spent test for intersection. D=3 is typical. Woo describes an algorithm for non-uniformly allocating voxels in each direction. D is the voxel density, and was introduced by Cleary and Wyvill?

Uniform Grids Preprocess scene Find bounding box Determine resolution 2. Place object in cell, if object overlaps cell

Uniform Grids Preprocess scene Find bounding box Determine resolution 3. Place object in cell, if object overlaps cell 4. Check that object intersects cell Could remove interior voxels as well.

Uniform Grids Preprocess scene Traverse grid 3D line – 3D-DDA 6-connected line Section 4.3

Caveat: Overlap Optimize for objects that overlap multiple cells Traverse until tmin(cell) > tmax(ray) Problem: Redundant intersection tests: Solution: Mailboxes Assign each ray an increasing number Primitive intersection cache (mailbox) Store last ray number tested in mailbox Only intersect if ray number is greater Mailboxes first proposed by Amanaidas and Woo Each ray is assigned a unique number. Latter rays have higher numbers than earlier rays. Store the ray number with each primitive. Don’t test rays if their ray number is less than or equal to the primitive’s ray number.

Spatial Hierarchies Letters correspond to planes (A) As questions? Kay-Kajiya Properties of hierarchical bounding volumes … A Letters correspond to planes (A) Point Location by recursive search

Spatial Hierarchies Letters correspond to planes (A, B) As questions? Kay-Kajiya Properties of hierarchical bounding volumes … Letters correspond to planes (A, B) Point Location by recursive search

Spatial Hierarchies Letters correspond to planes (A, B, C, D) As questions? Kay-Kajiya Properties of hierarchical bounding volumes … Letters correspond to planes (A, B, C, D) Point Location by recursive search

Variations kd-tree oct-tree bsp-tree Variations. Kd-tree where you set the position of the splitting plane. Oct-tree where you set the position of the center point. kd-tree oct-tree bsp-tree

Ray Traversal Algorithms Recursive inorder traversal [Kaplan, Arvo, Jansen] Intersect(L,tmin,tmax) Intersect(L,tmin,t*) Intersect(R,t*,tmax) Intersect(R,tmin,tmax)

Build Hierarchy Top-Down ? What exactly is the surface-area heuristic Choose splitting plane Midpoint Median cut Surface area heuristic

Surface Area and Rays Number of rays in a given direction that hit an object is proportional to its projected area The total number of rays hitting an object is Crofton’s Theorem: For a convex body For example: sphere

Surface Area and Rays The probability of a ray hitting a convex shape that is completely inside a convex cell equals Question after class. How is this used? Need to show in detail how this information Is used to find the optimal hierarchy.

Surface Area Heuristic Intersection time Traversal time a b What exactly is the surface-area heuristic

Surface Area Heuristic 2n splits a b What exactly is the surface-area heuristic

V. Havran, Best Efficiency Scheme Project Comparison Can’t find this data! No one method works best for all scenes Running times sensitive to parameters Uniform grids have difficulty with non-uniform object distributions Recent study showed that KD trees are very good The whole subject is religious Go to BES and RTNEWS V. Havran, Best Efficiency Scheme Project http://sgi.felk.cvut.cz/BES/

Comparison

Univ. Saarland RTRT Engine Ray-casts per second = FPS @ 1K × 1K Pentium-IV 2.5GHz laptop Kd-tree with surface-area heuristic [Havran] Wald et al. 2003 [http://www.mpi-sb.mpg.de/~wald/] RT&Shading Scene SSE no shd. simple shd. No SSE ERW6 (static) 7.1 2.3 1.37 ERW6 (dynamic) 4.8 1.97 1.06 Conf (static) 4.55 1.93 1.2 Conf (dynamic) 2.94 1.6 0.82 Soda Hall 4.12 1.8 1.055 ERW6 is 800,000 triangles SODA Hall is 2.5 MT

Interactive Ray Tracing Highly optimized software ray tracers Use vector instructions; Cache optimized Clusters and shared memory MPs Ray tracing hardware AR250/350 ray tracing processor www.art-render.com SaarCOR Ray tracing on programmable GPUs

Theoretical Nugget 1 Computational geometry of ray shooting 1. Triangles (Pellegrini) Time: Space: 2. Sphere (Guibas and Pellegrini)

Theoretical Nugget 2 y = y+1 y = -2*y if( y>0 ) Optical computer = Turing machine Reif, Tygar, Yoshida Determining if a ray starting at y0 arrives at yn is undecidable y = y+1 y = -2*y Reference: Optical computer Reference: Computational geometry results if( y>0 )