Ray Tracing Acceleration (5). Ray Tracing Acceleration Techniques Too Slow! Uniform grids Spatial hierarchies K-D Octtree BSP Hierarchical grids Hierarchical.

Slides:



Advertisements
Similar presentations
2.6. B OUNDING V OLUME H IERARCHIES Overview of different forms of bounding volume hierarchy.
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.
Collision Detection CSCE /60 What is Collision Detection?  Given two geometric objects, determine if they overlap.  Typically, at least one of.
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.
CSE 381 – Advanced Game Programming Scene Management
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.
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.
Bounding Volume Hierarchy “Efficient Distance Computation Between Non-Convex Objects” Sean Quinlan Stanford, 1994 Presented by Mathieu Brédif.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
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.
November 6, /37 cs123 INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © Acceleration Data Structures CS123.
Estruturas de Dados Espaciais MC-930 MO-603. Speeding Up Ray Tracing.
Collision Detection David Johnson Cs6360 – Virtual Reality.
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.
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.
David Luebke10/9/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
Implementing Scene Graphs, CSG Trees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, January 26, 2004.
On a Few Ray Tracing like Algorithms and Structures. -Ravi Prakash Kammaje -Swansea University.
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”
Ray Intersection Acceleration
MIT EECS 6.837, Durand and Cutler Acceleration Data Structures for Ray Tracing.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
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.
1 KIPA Game Engine Seminars Jonathan Blow Ajou University December 6, 2002 Day 10.
Stefan Popov Space Subdivision for BVHs Stefan Popov, Iliyan Georgiev, Rossen Dimov, and Philipp Slusallek Object Partitioning Considered Harmful: Space.
第五课 Ray Tracing. Overview of the Section Why Ray Tracing? What is Ray Tracing? How to tracing rays? How to accelerating ray-tracing?
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
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.
Presented by Paul Phipps
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.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2015.
CSE554Contouring IISlide 1 CSE 554 Lecture 5: Contouring (faster) Fall 2013.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
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
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 (1). Acceleration of Ray Tracing Goal: Reduce the number of ray/primitive intersections.
Ray Tracing Acceleration (3)
Hierarchical Data Structure in Game Programming Yanci Zhang Game Programming Practice.
CSE 554 Lecture 5: Contouring (faster)
Bounding Volume Hierarchies and Spatial Partitioning
Collision Detection Spring 2004.
Bounding Volume Hierarchies and Spatial Partitioning
Deformable Collision Detection
Modeliranje kompleksnih modelov
Real-Time Ray Tracing Stefan Popov.
Ray Tracing Acceleration Techniques
CSCE 441: Computer Graphics Hidden Surface Removal
Anti-aliased and accelerated ray tracing
Deformable Collision Detection
BVH Student: Jack Chang.
Modeliranje kompleksnih modelov
Presentation transcript:

Ray Tracing Acceleration (5)

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

Roadmap (LRT book, ch 4 – Intersection Acceleration) Approaches To Reducing Intersections –Ray-Box Intersections –Regular Grid –Hierarchical bounding volumes –BSP trees and friends –Meta-Hierarchies –Refinements to basic approaches Hierarchical Grid Accelerator –Creation –Traversal Kd Tree –Tree Representation –Tree construction –Traversal Further Reading

Grids 3-D array of cells Each cell contains list of all objects it intersects Ray intersected with all objects in a given cell’s list Cells visited in Bresenham order

Bounding Volume Hierarchies

Hierarchical Bounding Volumes (HBV) Trees of bounding volumes are constructed in a similar way to spatial hierarchy HBV does not partition space: the bounding volumes can overlap each other. HBV can be created from existing model hierarchy or by running a clustering algorithm.

Bounding Volume Ray-bunny intersection takes 70K ray-triangle intersections even if ray misses the bunny Place a sphere around bunny –Ray A misses sphere so ray A misses bunny without checking 70K ray-triangle intersections –Ray B intersects sphere but still misses bunny after checking 70K intersections –Ray C intersects sphere and intersects bunny Can also use axis-aligned bounding box –Easier to create for triangle mesh A B C

Bounding Volume Hierarchy Associate bounding volume with each node of scene graph If ray misses a node’s bounding volume, then no need to check any node beneath it If ray hits a node’s BV, then replace it with its children’s BV’s (or geometry) Breadth first search of tree –Maintain heap ordered by ray- BV intersection t-values –Explore children of node w/least pos. ray-BV t-value A B C Bunny BV Body BV Head BV L.EarFaceR.Ear BV

Choosing Bounding Volumes

Hierarchical Bounding Volumes

Heuristics for an Effective Bounding Hierarchy

Bounding Volume Hierarchy

Find bounding box of objects

Bounding Volume Hierarchy Find bounding box of objects Split objects into two groups

Bounding Volume Hierarchy Find bounding box of objects Split objects into two groups Recurse

Bounding Volume Hierarchy Find bounding box of objects Split objects into two groups Recurse

Bounding Volume Hierarchy Find bounding box of objects Split objects into two groups Recurse

Bounding Volume Hierarchy Find bounding box of objects Split objects into two groups Recurse

Where to split objects? At midpoint OR Sort, and put half of the objects on each side OR Use modeling hierarchy

Intersection with BVH Check subvolume with closer intersection first

Intersection with BVH Don't return intersection immediately if the other subvolume may have a closer intersection

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) }

Bounding Volume Hierarchy Discussion Advantages –easy to construct –easy to traverse –binary Disadvantages –may be difficult to choose a good split for a node –poor split may result in minimal spatial pruning

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

Uniform Spatial Partition

Spatial Partition Structures

Pitfalls!

3-d Trees (K-d Trees)

Octrees

BSP Trees

Ray Tracing BSP Trees

Wrap-up Uniform Grids, Spatial Hierarchies, Hierarchical Grids, HBVs Question: Which one of the above is best? Answer: I don’t know. Here all techniques are heuristics.

Wrap-up Vlastimil Havran’s Best E.ciency Scheme Project at compares different accelerators. Basically every one of them works better in some cases and worse in some other cases. Worst case for ”Uniform Grid” is sparse scenes, –for example, a very complicated bunny model put at the center of a huge stadium.