CS 445 Greg Humphreys, Spring 2003 Ray Tracing 2: Acceleration.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
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.
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.
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
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.
RT06 conferenceVlastimil Havran On the Fast Construction of Spatial Hierarchies for Ray Tracing Vlastimil Havran 1,2 Robert Herzog 1 Hans-Peter Seidel.
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
Ray Casting Ray-Surface Intersections Barycentric Coordinates Reflection and Transmission [Shirley, Ch.9] Ray Tracing Handouts Ray Casting Ray-Surface.
Bounding Volume Hierarchies and Spatial Partitioning Kenneth E. Hoff III COMP-236 lecture Spring 2000.
Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 14: Ray Tracing
ECS 298 Photorealistic Image Synthesis Rendering Acceleration Brian Budge Center for Image Processing and Integrated Computing Computer Science Department.
Estruturas de Dados Espaciais MC-930 MO-603. Speeding Up Ray Tracing.
Advanced Computer Graphics (Fall 2010) CS 283, Lecture 2: Basic Ray Tracing Ravi Ramamoorthi Some slides courtesy.
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.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
1 SD-Rtree: A Scalable Distributed Rtree Witold Litwin & Cédric du Mouza & Philippe Rigaux.
1 Speeding Up Ray Tracing Images from Virtual Light Field Project ©Slides Anthony Steed 1999 & Mel Slater 2004.
David Luebke10/9/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
On a Few Ray Tracing like Algorithms and Structures. -Ravi Prakash Kammaje -Swansea University.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Foundations of Computer Graphics (Spring 2012) CS 184, Lectures 16, 18: Nuts and bolts of Ray Tracing Acknowledgements:
Ray Intersection Acceleration
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.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
CIS 350 – I Game Programming Instructor: Rolf Lakaemper.
Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.
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.
Constructive Solid Geometry Ray Tracing CSG Models
Maths & Technologies for Games Spatial Partitioning 2
Advanced topics Advanced Multimedia Technology: Computer Graphics Yung-Yu Chuang 2006/01/04 with slides by Brian Curless, Zoran Popovic, Mario Costa Sousa.
Virtual Light Field Group University College London Ray Tracing with the VLF (VLF-RT) Jesper Mortensen
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2015.
CSE554Contouring IISlide 1 CSE 554 Lecture 3: Contouring II Fall 2011.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2013.
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”
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)
Real-Time Hierarchical Scene Segmentation and Classification Andre Uckermann, Christof Elbrechter, Robert Haschke and Helge Ritter John Grossmann.
CSE 554 Lecture 5: Contouring (faster)
Bounding Volume Hierarchies and Spatial Partitioning
CSE 167 [Win 17], Lecture 15: Ray Tracing Ravi Ramamoorthi
Bounding Volume Hierarchies and Spatial Partitioning
Deformable Collision Detection
Real-Time Ray Tracing Stefan Popov.
Ray Tracing Acceleration Techniques
Digital Image Synthesis Yung-Yu Chuang 10/1/2008
Anti-aliased and accelerated ray tracing
Digital Image Synthesis Yung-Yu Chuang 10/5/2006
LCTS: Ray Shooting using Longest Common Traversal Sequences
CS679 - Fall Copyright Univ. of Wisconsin
Deformable Collision Detection
Presentation transcript:

CS 445 Greg Humphreys, Spring 2003 Ray Tracing 2: Acceleration

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Ray Tracing Acceleration Techniques Too Slow! Uniform grids Spatial hierarchies K-D Octtree BSP Hierarchical grids Hierarchical bounding volumes (HBV) Tighter bounds Faster intersector Early ray termination Adaptive sampling Beam tracing Cone tracing Pencil tracing Faster intersection N1 Fewer raysGeneralized rays

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Uniform Grids Preprocess scene 1.Find bounding box

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Uniform Grids Preprocess scene 1.Find bounding box 2.Determine grid resolution

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Uniform Grids Preprocess scene 1.Find bounding box 2.Determine grid resolution 3.Place object in cell if its bounding box overlaps the cell

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Uniform Grids Preprocess scene 1.Find bounding box 2.Determine grid resolution 3.Place object in cell if its bounding box overlaps the cell 4.Check that object overlaps cell (expensive!)

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Uniform Grids Preprocess scene Traverse grid 3D line = 3D-DDA 6-connected line

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Caveat: Overlap Optimize objects that overlap multiple cells Caveat 1 (correctness): Intersection must lie within current cell Caveat 2 (efficiency): Redundant intersection tests “Mailboxes”  Assign each ray a number  Object intersection cache (“mailbox”) Store ray number, intersection information

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Spatial Hierarchies A B C D A B C D Leaf nodes correspond to unique regions in space

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Spatial Hierarchies A B C D A B C D Point location by recursive search

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Variations KD tree octtreeBSP tree

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Creating Spatial Hierarchies insert(node,prim) { if( overlap(node->bound,prim) ) if( leaf(node) ) { if( node->nprims > MAXPRIMS && node->depth < MAXDEPTH ) { subdivide(node); foreach child in node insert(child,prim) } else list_insert(node->prims,prim); } else foreach child in node insert(child,prim) } // Typically MAXDEPTH=16, MAXPRIMS=2-8

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Median-Cut Build hierarchy bottom-up Chose direction and position carefully Surface-area heuristic

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff 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: Example: Sphere

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Surface Area and Rays Probability of a ray hitting an object that is completely inside a cell is:

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff 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)

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Hierarchical Grids Good compromise preferred by many practitioners IMAGE

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Hierarchical Bounding Volumes Create tree of bounding volumes Children are contained within parent Creation preprocess  From model hierarchy  Automatic clustering Search intersect(node,ray,hits) { if( intersectp(node->bound,ray) if( leaf(node) ) intersect(node->prims,ray,hits) else for each child intersect(child,ray,hits) }

Greg Humphreys, Spring 2003Intro Graphics Raytracing Stuff Comparison SchemeSpheresRingsTree Uniform gridD= D= Hierarchical grid Vlastimil Havran, Best Efficiency Scheme Project