Estruturas de Dados Espaciais MC-930 MO-603. Speeding Up Ray Tracing.

Slides:



Advertisements
Similar presentations
Visibilidade MO603/MC930. Visibilidade Algoritmos básicos de visibilidade Algoritmo pintor Z-buffer Estilos de Shading Ray-casting.
Advertisements

1 Binary Space Partition Trees ©Anthony Steed, Yiorgos Chrysanthou
GR2 Advanced Computer Graphics AGR
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.

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.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
CS 445 Greg Humphreys, Spring 2003 Ray Tracing 2: Acceleration.
Hidden Surface Removal Why make the effort?  Realistic models.  Wasted time drawing. OpenGL and HSR  OpenGL does handle HSR using the depth buffer.
Korea Univ. Graphics Lab. 3D Game Engine Design Chapter 12. Spatial Sorting Chung Ji Hye
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Ray Tracing Acceleration Structures Solomon Boulos 4/16/2004.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
Specialized Acceleration Structures for Ray-Tracing Warren Hunt Bill Mark.
Introduction General Data Structures - Arrays, Linked Lists - Stacks & Queues - Hash Tables & Binary Search Trees - Graphs Spatial Data Structures -Why.
CS6500 Adv. Computer Graphics © Chun-Fa Chang, Spring 2003 Space Partitions.
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
ECS 298 Photorealistic Image Synthesis Rendering Acceleration Brian Budge Center for Image Processing and Integrated Computing Computer Science Department.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
Lecture 8 Advanced Rendering – Ray Tracing, Radiosity & NPR.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
Hidden Surface Removal
Graphics Pipeline Hidden Surfaces CMSC 435/634. Visibility We can convert simple primitives to pixels Which primitives (or parts of primitives) should.
Graphics Pipeline Hidden Surface CMSC 435/634. Visibility We can convert simple primitives to pixels/fragments How do we know which primitives (or which.
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.
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
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
CS 325 Introduction to Computer Graphics 04 / 26 / 2010 Instructor: Michael Eckmann.
Implementing Scene Graphs, CSG Trees Glenn G. Chappell U. of Alaska Fairbanks CS 481/681 Lecture Notes Monday, January 26, 2004.
Visible-Surface Detection Jehee Lee Seoul National University.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
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.
第五课 Ray Tracing. Overview of the Section Why Ray Tracing? What is Ray Tracing? How to tracing rays? How to accelerating ray-tracing?
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.
Where We Stand At this point we know how to: –Convert points from local to window coordinates –Clip polygons and lines to the view volume –Determine which.
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.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
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”
Visibility Determination – List Priority Methods Chapter 11.
Ray Tracing Acceleration (3)
Hidden Surface Removal. 2 Goal: Determine which surfaces are visible and which are not. Z-Buffer is just one of many hidden surface removal algorithms.
CS552: Computer Graphics Lecture 28: Solid Modeling.

Bounding Volume Hierarchies and Spatial Partitioning
Bounding Volume Hierarchies and Spatial Partitioning
Hidden Surfaces Dr. Scott Schaefer.
Modeliranje kompleksnih modelov
Graphics Pipeline Hidden Surfaces
CSCE 441: Computer Graphics Hidden Surface Removal
Anti-aliased and accelerated ray tracing
Lecture 32: Visible Surface Detection
An Adaptive Octree for Ray Tracing by
Modeliranje kompleksnih modelov
Lecture 31: Visible Surface Detection
Visible-Surface Determination
Presentation transcript:

Estruturas de Dados Espaciais MC-930 MO-603

Speeding Up Ray Tracing

Estruturas de Dados Espaciais

Bounding Volumes

Hierarquical Bounding Volume

Grids Data structure: a 3-D array of cells (voxels) that tile space –Each cell points to list of all surfaces intersecting that cell

Mais sobre Grids Be Careful! The fact that a ray passes through a cell and hits na object doesn’t mean the ray hit that object in that cell Optimization: cache intersection point and ray id in “mailbox” associated with each object Grids are a poor choice when the world is nonhomogeneous (clumpy) –e.g. a teapot in a stadium: many polygons clustered in a small space How many cells to use? –too few Þ many objects per cell Þ slow –too many Þ many empty cells to step through Þ slow Grids work well when you can arrange that each cell lists a few (ten, say) objects Better strategy for some scenes: nested grids

Octrees

Which Structure is Best for Ray Tracing?

K-d Trees and BSP Trees

Building a BSP Tree the subdivision of space it implies a BSP tree using 2 as root abcd a b c d viewpoint

Building the Tree 2 1 2a 2b 3 3 2a 2b 1 viewpoint Using line 3 for the root requires a split

Building a Good Tree - the tricky part

Uses for Binary Space Partitioning (BSP) Trees

Painter’s Algorithm with BSP trees

Drawing a BSP Tree front_to_back(tree, viewpt) { if (tree == null) return; if (positive_side_of(root(tree), viewpt)) { front_to_back(positive_branch(tree, viewpt); display_polygon(root(tree)); front_to_back(negative_branch(tree, viewpt); } else { …draw negative branch first…} }

Drawing Back to Front 1 2a 2b 3 3 2a 2b 1 viewpoint Hidden surface removal

Clipping BSP Trees

Clipping Using Spatial Data Structures