Ray Intersection Acceleration
|
|
- Laureen Terry
- 5 years ago
- Views:
Transcription
1 Ray Intersection Acceleration Image Synthesis Torsten Möller
2 Reading Physically Based Rendering by Pharr&Humphreys Chapter 2 - rays and transformations Chapter 3 - shapes Chapter 4 - intersections and acceleration An Introduction to Ray tracing by Glassner
3 Topics today Review of ray-tracing acceleration approaches pbrt Object-space World-space 3
4 Review of ray-tracing 4
5 First imaging algorithm Directly derived from the synthetic camera model Follow rays of light from a point light source Determine which rays enter the lens of the camera through the imaging window Compute color of projection Why is this not a good idea? Machiraju/Zhang/Möller 5
6 Ray tracing When following light from a light source, many (reflected) rays do not intersect the image window and do not contribute to the scene reflected ray shadow ray rays eye pixel Image plane refracted ray Reverse the process Cast one ray per pixel from the eye and shoot it into the scene Machiraju/Zhang/Möller 6
7 Ray tracing: the basics A point on an object may be illuminated by Light source directly through shadow ray Light reflected off an object through reflected ray Light transmitted through a transparent object through refracted ray reflected ray shadow ray eye Machiraju/Zhang/Möller pixel Image plane refracted ray 7
8 Ray tracing: the algorithm for each pixel on screen determine ray from eye through pixel if ray shoots into infinity, return a background color if ray shoots into light source, return light color appropriately find closest intersection of ray with an object Most cast off shadow ray (towards light sources) expensive if shadow ray hits a light source, compute light contribution according to some illumination model cast reflected and refracted ray, recursively calculate pixel color contribution return pixel color after some absorption Machiraju/Zhang/Möller 8
9 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray Image plane Eye Compute ray. (More linear algebra.) Compute ray-object intersection. Spawn more rays for reflection and refraction
10 pbrt acceleration architecture 10
11 Ray Tracing Architecture Scene LRT Parse Sample Generator Film TIFF Image Primitives Camera Radiance Shape Rays intersect Eye rays Lights Material Surf Integrator Shadow, reflection, refraction rays
12 Optimizing Ray Tracing Main computation load is ray-object intersection 50-90% of run time when profiled Test for possible intersection before committing to computing intersections
13 Acceleration Strategies Fast/efficient intersection computation (single raysingle object) Not much leeway for acceleration Test fewer rays Trace fewer primary rays Fewer secondary rays Fewer intersection computations Intersection with thick rays Cone tracing Beam tracing Avoid computations with far away objects Space partitioning Direction partitioning 13
14 Pbrt and Intersections Primitive base class Shapes are subclasses of primitive Methods WorldBound CanIntersect Intersect IntersectP Refine First four return Intersection structures Last returns Primitives Primitives Shape Lights Material
15 Intersection Geometry Shape independent representation for intersections DifferentialGeometry Intersection::dg Point P Normal N Parametric (u,v) Partial derivatives Tangents: dpdu, dpdv change in normal: dndu, dndv
16 Object-Based Acceleration Reduce the intersection time for individual objects Objects can be complex! must intersect all triangles But we can quickly estimate if a ray could intersect the object 16
17 Bounding Volumes Surround object with a simple volume Test ray against volume first Test object-space or world-space bound? (pros and cons) Cost model - N*cb + pi*n*co N (number of rays) is given pi fraction of rays intersecting bounding volume Minimize cb (cost of intersecting bounding volume) and co (cost of intersecting object) Reduce ray path Bounding sphere Difficult to compute good one Easy to test for intersection Bounding box Easy to compute for given object More difficult to intersect Reduce ray path
18 Pbrt s Bounding Boxes Virtual BBox ObjectBound() const=0; Virtual BBox WorldBound() const { return ObjectToWorld(ObjectBound()); } Bool BBox::IntersectP(const Ray &ray, float *hitt0, float *hitt1) const { }
19 Bounding Box Compute min/max for x,y,z 3 options Compute in world space Chance of ill fitting b-box Compute in object space and transform w/ object Object space b-box probably better fit than world space Need to intersect ray with arbitrary hexagon in world sp. Compute in object space and test in object space Inverse transform ray into object space
20 Bounding Box Treat BB as three perpendicular slabs Clip the ray against each slab if the clipped region is valid, then intersection! 20
21 Bounding Box Find t near and t far for each pair of parallel planes. See PBRT p
22 Bounding Sphere Find min/max points in x,y,z -> 3 pairs Use maximally separated pair to define initial sphere For each point If point is outside of current sphere, increase old sphere to just include new point
23 P R C R P P rad C P rad newrad = (R+rad)/2 R newc P P P newrad newrad newc C P R newc = P+(newrad/R)(C-P)
24 Bounding Sphere Intersection is very fast! Does not need to be axis aligned 24
25 Bounding Slabs More complex to compute Better fit of object Use multiple pairs of parallel planes to bound object Can add more slabs to get tighter fit 2004 Pharr, Humphreys
26 Bounding Slabs Intersection is a generalization of the bounding box computation. Axis-aligned optimizations aren t possible. Potentially more slabs In practice, rarely used 26
27 Approximate Convex Hull Find highest vertex Find plane through vertex parallel to ground plane Find second vertex that makes minimum angle with first vertex and up vector Find third vertex that makes plane whose normal makes minimum angle with up vector 1989 Glassner More effort to compute, better fit
28 Convex Hull Intersection is fairly complex Use a sidedness test for all planes Rarely useful 28
29 Bounding Volume Hierarchies Create tree of bounding volumes Children are contained within parent Creation preprocess From model hierarchy Automatic clustering Each object only appears in one leaf volume.
30 BVH - Issues Subtrees overlap Does not contain all objects it overlaps Balance Tree Organization
31 BVH - Construction Take the bounding volume of the scene (or complex object) If too many primitive exist in the volume, create child volumes (split the volume) Recurse until the end criteria is met 31
32 Splitting strategies Choose the axis, that has the largest spread of midpoints Split based on the midpoint of the centroids of one axis Split in equal amounts Problem - overlaps 32
33 The Surface Area Heuristic cost of intersecting all N primitives: NX t isect (i) i=1 cost of splitting into groups N A +N B = N t trav - traversal time of node p A / p B - prob that ray passes through each child node 33
34 The Surface Area Heuristic assume, that t isect (i) is the same for all primitives for convex objects A contained in B, the probability of a ray intersecting A if it intersects B is: p(a B) = s A s B find the axis with the minimal SAH cost 34
35 35
36 BVH Intersection intersect(node,ray,hits) { if( intersectp(node->bound,ray) if( leaf(node) ) intersect(nodeprims,ray,hits) else for each child intersect(child,ray,hits) } Return the closest of all hits! 36
37 Spatial Subdivision Subdivide world space Intersectable objects are placed in spatial voxels A ray is traversed through the subdivisions in the order of near to far No overlapping voxels but objects may be in multiple voxels 37
38 Uniform Grids Simplest spatial subdivision Very easy to create and traverse Good, but not optimal performance much better than brute force 38
39 Uniform Grids Preprocess scene Find bounding box
40 Uniform Grids Preprocess scene Find bounding box Determine grid resolution
41 Uniform Grids Preprocess scene Find bounding box Determine grid resolution Place object in cell if its bounding box overlaps the cell
42 AABB/Voxel Intersection Easy to compute Compute which voxel contains each vertex All voxels between the min and max voxels contain the AABB 42
43 Uniform Grids Preprocess scene Find bounding box Determine grid resolution Place object in cell if its bounding box overlaps the cell Check that object overlaps cell (expensive!)
44 Triangle/Voxel overlap Search for a separating axis. 1. [3 tests] e0 = (1, 0, 0), e1 = (0, 1, 0), e2 = (0, 0, 1) (the normals of the AABB). Test the AABB against the minimal AABB around the triangle. 2. [1 test] n, the normal of. We use a fast plane/aabb overlap test [5, 6], which only tests the two diagonal vertices, whose direction is most closely aligned to the normal of the triangle. 3. [9 tests] aij = ei fj, i, j {0, 1, 2}, where f0 = v1 v0, f1 = v2 v1, and f2 = v0 v2. These tests are very similar and we will only show the derivation of the case where i = 0 and j = 0 (see below). Tomas Akenine-Möller Fast 3D triangle-box overlap testing. In ACM SIGGRAPH 2005 Courses (SIGGRAPH '05), John Fujii (Ed.). ACM, New York, NY, USA,, Article 8. DOI= /
45 Add Sorting If objects/voxels/cells are processed in front-to-back sorted order along the ray, stop processing when first intersection is detected
46 Spatial Subdivision Identifying voxels hit is like a line drawing algorithm
47 Uniform Grids Preprocess scene Traverse grid 3D line = 3D-DDA
48 Amanatides & Woo Algorithm J. Amanatides and A. Woo, "A Fast Voxel Traversal Algorithm for Ray Tracing", Proc. Eurographics '87, Amsterdam, The Netherlands, August 1987, pp 1-10.
49 A&W Algorithm X/Y/Z: Current voxel number. stepx/y/z: 1 or -1. Is the slope +/-? tmaxx/y/z: distance to cross next vert/horiz/depth plane. tdeltax/y/z: distance along ray to travel one whole width/height/depth of a voxel
50 Uniform Grid Shirley P., Marschner S. Fundamentals of Computer Graphics
51 A&W Algorithm Results Rendering time for different levels of subdivision
52 Objects Across Multiple Voxels Mailboxes mailboxes eliminate redundant intersection tests objects have mailboxes mailbox contains ID of last ray that intersected it check ray against objects last tested ray ID Object splitting Split objects at voxel boundaries Sub-objects only appear in one voxel 1989 Glassner
53 Complexity? Problems? Uniform Grid 53
54 Uniform Grid Increase resolution Increases traversal cost May only need higher resolution in a small area 54
55 Hierarchical Data structures 55
56 Comparison Scheme Spheres (time) Rings (time) Tree (time) Uniform grid D= D= Hierarchical grid See A Proposal for Standard Graphics Environments, IEEE Computer Graphics and Applications, vol. 7, no. 11, November 1987, pp. 3-5
57 Hierarchical Spatial Subdivision Recursive subdivision of space 1-1 Relationship between scene points and leaf nodes Solves the lack-of-adaptivity problem DDA works Effective in practice /~jmchen/compg/slides/Octree%20Traversal.ppt
58 Creating Spatial Hierarchies insert(node,prim) { if( overlap(node->bound,prim) ) if( leaf(node) ) { if( node->nprims > MAXPRIMS && node->depth < MAXDEPTH ) { } } else subdivide(node); The interesting bit foreach child in node insert(child,prim) } else list_insert(node->prims,prim); foreach child in node insert(child,prim)
59 Hughes J., et al. Computer Graphics Principles and Practice Oct-Tree
60 Oct-tree Similar to a binary tree Each node has 8 children Always split the node in the middle of each axis Allows fast skipping of empty space Better efficiency than uniform grid, but still not the best Traversal is still relatively easy Complexity? 60
61 Oct-tree Traversal can be implemented similar to 3D-DDA Use smallest voxel as a basis, and skip multiple while inside an internal node Top-down approach Intersect root and find intersected children recursively Bottom-up approach Find first leaf voxel intersected. Use neighbour finding to find next voxels 61
62 Binary Space Partitioning (BSP) General case uses arbitrary splitting planes Space is partitioned into half spaces All bins are convex Difficult to build, traversal isn t too bad Generally not used for rendering (maybe for physics simulation) See: T. Ize, I. Wald and S. G. Parker, "Ray tracing with the BSP tree," Interactive Ray Tracing, RT IEEE Symposium on, Los Angeles, CA, 2008, pp doi: /RT
63 Octree BSP tree KD tree
64 KD-Tree A binary tree in K dimensions Split one dimension at a time Each node may only have 2 children Easy to build and traverse How to choose which dimension to split? How to choose where to split? 64
65 KD-tree 65
66 KD-tree Use SAH to choose the split location. Same as BVH 66
67 KD-tree 67
68 KD-tree Traversal (stack) intersect with scene bounding box while no intersection && in the scene if node is a leaf intersect with all contained primitives else compute near and far child intersect with near child, push far child to a stack if no intersection, then pop a node from the stack continue until intersection, or exit the scene 68
69 69
70 KD-tree Other traversal cases: ray traverses the children in reverse order ray starts inside the node ray only intersects one child Fast traversal is very important it will happen frequently recursive is possible, but directly using a stack can be faster Complexity? 70
71 KD-tree Possible improvements? Stackless traversal! each voxel contains pointers to it s neighbours traverse the tree directly, without using a stack avoid moving up and down the tree unnecessarily costs additional memory and precompute time very good for highly parallel (GPU) implementations 71
72 KD-tree Popov, S., Günther, J., Seidel, H.-P. and Slusallek, P. (2007), Stackless KD-Tree Traversal for High Performance GPU Ray Tracing. Computer Graphics Forum, 26: doi: /j x 72
73 Final Thoughts Acceleration structures have a HUGE influence on performance In practice BVH and KD-tree have similar performance Optimizations exist for both Memory organization can have a big performance impact. Especially for parallel computing 73
74 74
Ray Intersection Acceleration
Ray Intersection Acceleration CMPT 461/761 Image Synthesis Torsten Möller Reading Chapter 2, 3, 4 of Physically Based Rendering by Pharr&Humphreys An Introduction to Ray tracing by Glassner Topics today
More informationReading Ray Intersection Chapter 2: Geometry and Transformations Acceleration Covers basic math and PBRT implementation: read on your own
eading ay Intersection Acceleration eadings Chapter 2 Geometry & Transformations Chapter 3 Shapes Chapter 4 rimitives & Intersection Acceleration Covers basic math and BT implementation: read on your own
More informationAccelerating Ray-Tracing
Lecture 9: Accelerating Ray-Tracing Computer Graphics and Imaging UC Berkeley CS184/284A, Spring 2016 Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric Modeling
More informationTopics. Ray Tracing II. Intersecting transformed objects. Transforming objects
Topics Ray Tracing II CS 4620 Lecture 16 Transformations in ray tracing Transforming objects Transformation hierarchies Ray tracing acceleration structures Bounding volumes Bounding volume hierarchies
More informationAcceleration Data Structures
CT4510: Computer Graphics Acceleration Data Structures BOCHANG MOON Ray Tracing Procedure for Ray Tracing: For each pixel Generate a primary ray (with depth 0) While (depth < d) { Find the closest intersection
More informationTopics. Ray Tracing II. Transforming objects. Intersecting transformed objects
Topics Ray Tracing II CS 4620 ations in ray tracing ing objects ation hierarchies Ray tracing acceleration structures Bounding volumes Bounding volume hierarchies Uniform spatial subdivision Adaptive spatial
More informationAccelerated Raytracing
Accelerated Raytracing Why is Acceleration Important? Vanilla ray tracing is really slow! mxm pixels, kxk supersampling, n primitives, average ray path length of d, l lights, 2 recursive ray casts per
More informationAnti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell
Anti-aliased and accelerated ray tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell Reading Required: Watt, sections 12.5.3 12.5.4, 14.7 Further reading: A. Glassner.
More informationParallel Physically Based Path-tracing and Shading Part 3 of 2. CIS565 Fall 2012 University of Pennsylvania by Yining Karl Li
Parallel Physically Based Path-tracing and Shading Part 3 of 2 CIS565 Fall 202 University of Pennsylvania by Yining Karl Li Jim Scott 2009 Spatial cceleration Structures: KD-Trees *Some portions of these
More informationRay Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)
CS4620/5620: Lecture 37 Ray Tracing 1 Announcements Review session Tuesday 7-9, Phillips 101 Posted notes on slerp and perspective-correct texturing Prelim on Thu in B17 at 7:30pm 2 Basic ray tracing Basic
More informationRay Tracing Acceleration. CS 4620 Lecture 20
Ray Tracing Acceleration CS 4620 Lecture 20 2013 Steve Marschner 1 Will this be on the exam? or, Prelim 2 syllabus You can expect emphasis on topics related to the assignment (Shaders 1&2) and homework
More informationComputer Graphics. - Spatial Index Structures - Philipp Slusallek
Computer Graphics - Spatial Index Structures - Philipp Slusallek Overview Last lecture Overview of ray tracing Ray-primitive intersections Today Acceleration structures Bounding Volume Hierarchies (BVH)
More informationIntersection Acceleration
Advanced Computer Graphics Intersection Acceleration Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volume hierarchies uniform grids kd-trees octrees
More informationAnti-aliased and accelerated ray tracing. University of Texas at Austin CS384G - Computer Graphics
Anti-aliased and accelerated ray tracing University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell eading! equired:! Watt, sections 12.5.3 12.5.4, 14.7! Further reading:! A. Glassner.
More informationRay Tracing Acceleration. CS 4620 Lecture 22
Ray Tracing Acceleration CS 4620 Lecture 22 2014 Steve Marschner 1 Topics Transformations in ray tracing Transforming objects Transformation hierarchies Ray tracing acceleration structures Bounding volumes
More informationAccelerating Ray Tracing
Accelerating Ray Tracing Ray Tracing Acceleration Techniques Faster Intersections Fewer Rays Generalized Rays Faster Ray-Object Intersections Object bounding volumes Efficient intersection routines Fewer
More informationRay Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University
Ray Tracing III Wen-Chieh (Steve) Lin National Chiao-Tung University Shirley, Fundamentals of Computer Graphics, Chap 10 Doug James CG slides, I-Chen Lin s CG slides Ray-tracing Review For each pixel,
More informationSpatial Data Structures
CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration
More informationCS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:
CS580: Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/gcg/ Recursive Ray Casting Gained popularity in when Turner Whitted (1980) recognized that recursive ray casting could
More informationChapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.
Chapter 11 Global Illumination Part 1 Ray Tracing Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.3 CG(U), Chap.11 Part 1:Ray Tracing 1 Can pipeline graphics renders images
More informationINFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!
INFOGR Computer Graphics J. Bikker - April-July 2015 - Lecture 11: Acceleration Welcome! Today s Agenda: High-speed Ray Tracing Acceleration Structures The Bounding Volume Hierarchy BVH Construction BVH
More informationimproving raytracing speed
ray tracing II computer graphics ray tracing II 2006 fabio pellacini 1 improving raytracing speed computer graphics ray tracing II 2006 fabio pellacini 2 raytracing computational complexity ray-scene intersection
More informationSpatial Data Structures
CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/
More informationLecture 2 - Acceleration Structures
INFOMAGR Advanced Graphics Jacco Bikker - November 2017 - February 2018 Lecture 2 - Acceleration Structures Welcome! I x, x = g(x, x ) ε x, x + න S ρ x, x, x I x, x dx Today s Agenda: Problem Analysis
More informationSpatial Data Structures
15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) March 28, 2002 [Angel 8.9] Frank Pfenning Carnegie
More informationRay Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305
Ray Tracing with Spatial Hierarchies Jeff Mahovsky & Brian Wyvill CSC 305 Ray Tracing Flexible, accurate, high-quality rendering Slow Simplest ray tracer: Test every ray against every object in the scene
More informationSpatial Data Structures
15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie
More informationEDAN30 Photorealistic Computer Graphics. Seminar 2, Bounding Volume Hierarchy. Magnus Andersson, PhD student
EDAN30 Photorealistic Computer Graphics Seminar 2, 2012 Bounding Volume Hierarchy Magnus Andersson, PhD student (magnusa@cs.lth.se) This seminar We want to go from hundreds of triangles to thousands (or
More informationRay Tracing Acceleration Data Structures
Ray Tracing Acceleration Data Structures Sumair Ahmed October 29, 2009 Ray Tracing is very time-consuming because of the ray-object intersection calculations. With the brute force method, each ray has
More informationComputer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)
Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Raytracing Global illumination-based rendering method Simulates
More informationSpatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology
Spatial Data Structures and Speed-Up Techniques Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Spatial data structures What is it? Data structure that organizes
More informationAccelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016
Accelerating Geometric Queries Computer Graphics CMU 15-462/15-662, Fall 2016 Geometric modeling and geometric queries p What point on the mesh is closest to p? What point on the mesh is closest to p?
More informationAnnouncements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday
Announcements Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday 1 Spatial Data Structures Hierarchical Bounding Volumes Grids Octrees BSP Trees 11/7/02 Speeding Up Computations
More informationComputer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo
Computer Graphics Bing-Yu Chen National Taiwan University The University of Tokyo Hidden-Surface Removal Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm
More informationComputer Graphics. - Ray-Tracing II - Hendrik Lensch. Computer Graphics WS07/08 Ray Tracing II
Computer Graphics - Ray-Tracing II - Hendrik Lensch Overview Last lecture Ray tracing I Basic ray tracing What is possible? Recursive ray tracing algorithm Intersection computations Today Advanced acceleration
More informationLogistics. CS 586/480 Computer Graphics II. Questions from Last Week? Slide Credits
CS 586/480 Computer Graphics II Dr. David Breen Matheson 408 Thursday 6PM Æ 8:50PM Presentation 4 10/28/04 Logistics Read research paper and prepare summary and question P. Hanrahan, "Ray Tracing Algebraic
More informationCPSC / Sonny Chan - University of Calgary. Collision Detection II
CPSC 599.86 / 601.86 Sonny Chan - University of Calgary Collision Detection II Outline Broad phase collision detection: - Problem definition and motivation - Bounding volume hierarchies - Spatial partitioning
More informationSpatial Data Structures
Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) [Angel 9.10] Outline Ray tracing review what rays matter? Ray tracing speedup faster
More informationCOMPUTER GRAPHICS COURSE. Ray Tracing
COMPUTER GRAPHICS COURSE Ray Tracing Georgios Papaioannou - 2015 RAY TRACING PRINCIPLES What is ray tracing? A general mechanism for sampling paths of light in a 3D scene We will use this mechanism in
More informationQuestions from Last Week? Extra rays needed for these effects. Shadows Motivation
CS 431/636 Advanced Rendering Techniques Dr. David Breen University Crossings 149 Tuesday 6PM 8:50PM Presentation 4 4/22/08 Questions from Last Week? Color models Light models Phong shading model Assignment
More informationCS 431/636 Advanced Rendering Techniques
CS 431/636 Advanced Rendering Techniques Dr. David Breen University Crossings 149 Tuesday 6PM 8:50PM Presentation 4 4/22/08 Questions from Last Week? Color models Light models Phong shading model Assignment
More informationRecall: Inside Triangle Test
1/45 Recall: Inside Triangle Test 2D Bounding Boxes rasterize( vert v[3] ) { bbox b; bound3(v, b); line l0, l1, l2; makeline(v[0],v[1],l2); makeline(v[1],v[2],l0); makeline(v[2],v[0],l1); for( y=b.ymin;
More informationBounding Volume Hierarchies. CS 6965 Fall 2011
Bounding Volume Hierarchies 2 Heightfield 3 C++ Operator? #include int main() { int x = 10; while( x --> 0 ) // x goes to 0 { printf("%d ", x); } } stackoverflow.com/questions/1642028/what-is-the-name-of-this-operator
More informationRay Casting. Outline in Code. Outline. Finding Ray Direction. Heckbert s Business Card Ray Tracer. Foundations of Computer Graphics (Fall 2012)
Foundations of Computer Graphics (Fall 2012) CS 184, Lectures 17, 18: Nuts and bolts of Ray Tracing Heckbert s Business Card Ray Tracer http://inst.eecs.berkeley.edu/~cs184 Acknowledgements: Thomas Funkhouser
More informationRay Tracing I: Basics
Ray Tracing I: Basics Today Basic algorithms Overview of pbrt Ray-surface intersection Next lecture Techniques to accelerate ray tracing of large numbers of geometric primitives Light Rays Three ideas
More informationAcceleration Data Structures. Michael Doggett Department of Computer Science Lund university
Acceleration Data Structures Michael Doggett Department of Computer Science Lund university Ray tracing So far ray tracing sampling object intersections Today How do we make it faster? Performance = rays
More informationSpatial Data Structures. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017
Spatial Data Structures Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017 Ray Intersections We can roughly estimate the time to render an image as being proportional to the number of ray-triangle
More informationAcceleration Structures. CS 6965 Fall 2011
Acceleration Structures Run Program 1 in simhwrt Lab time? Program 2 Also run Program 2 and include that output Inheritance probably doesn t work 2 Boxes Axis aligned boxes Parallelepiped 12 triangles?
More informationComputer Graphics. Bing-Yu Chen National Taiwan University
Computer Graphics Bing-Yu Chen National Taiwan University Visible-Surface Determination Back-Face Culling The Depth-Sort Algorithm Binary Space-Partitioning Trees The z-buffer Algorithm Scan-Line Algorithm
More informationRay Tracing. Computer Graphics CMU /15-662, Fall 2016
Ray Tracing Computer Graphics CMU 15-462/15-662, Fall 2016 Primitive-partitioning vs. space-partitioning acceleration structures Primitive partitioning (bounding volume hierarchy): partitions node s primitives
More informationRay Casting. To Do. Outline. Outline in Code. Foundations of Computer Graphics (Spring 2012) Heckbert s Business Card Ray Tracer
Foundations of Computer Graphics (Spring 2012) CS 184, Lectures 16, 18: Nuts and bolts of Ray Tracing To Do Finish homework 3 Prepare for Midterm (Monday) Everything before this week (no raytracing) Closed
More informationLast Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows
Last Time: Acceleration Data Structures for Ray Tracing Modeling Transformations Illumination (Shading) Viewing Transformation (Perspective / Orthographic) Clipping Projection (to Screen Space) Scan Conversion
More informationRay Genealogy. Raytracing: Performance. Bounding Volumes. Bounding Volume. Acceleration Classification. Acceleration Classification
Raytracing: Performance OS 4328/5327 Scott. King Ray Genealogy 1 Ray/pixel at 1k 1k image = 1M? rays rays. Say on avg. 6 secondary rays = 7M?rays rays 100k objects with 10 ops for intersection =? Operations
More informationComputer Graphics Ray Casting. Matthias Teschner
Computer Graphics Ray Casting Matthias Teschner Outline Context Implicit surfaces Parametric surfaces Combined objects Triangles Axis-aligned boxes Iso-surfaces in grids Summary University of Freiburg
More informationReal Time Ray Tracing
Real Time Ray Tracing Programação 3D para Simulação de Jogos Vasco Costa Ray tracing? Why? How? P3DSJ Real Time Ray Tracing Vasco Costa 2 Real time ray tracing : example Source: NVIDIA P3DSJ Real Time
More informationCPSC GLOBAL ILLUMINATION
CPSC 314 21 GLOBAL ILLUMINATION Textbook: 20 UGRAD.CS.UBC.CA/~CS314 Mikhail Bessmeltsev ILLUMINATION MODELS/ALGORITHMS Local illumination - Fast Ignore real physics, approximate the look Interaction of
More informationToday. Acceleration Data Structures for Ray Tracing. Cool results from Assignment 2. Last Week: Questions? Schedule
Today Acceleration Data Structures for Ray Tracing Cool results from Assignment 2 Last Week: koi seantek Ray Tracing Shadows Reflection Refraction Local Illumination Bidirectional Reflectance Distribution
More informationAcceleration. Digital Image Synthesis Yung-Yu Chuang 10/11/2007. with slides by Mario Costa Sousa, Gordon Stoll and Pat Hanrahan
Acceleration Digital Image Synthesis Yung-Yu Chuang 10/11/2007 with slides by Mario Costa Sousa, Gordon Stoll and Pat Hanrahan Classes Primitive (in core/primitive.*) GeometricPrimitive InstancePrimitive
More informationRay-Box Culling for Tree Structures
JOURNAL OF INFORMATION SCIENCE AND ENGINEERING XX, XXX-XXX (2012) Ray-Box Culling for Tree Structures JAE-HO NAH 1, WOO-CHAN PARK 2, YOON-SIG KANG 1, AND TACK-DON HAN 1 1 Department of Computer Science
More informationCS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella
CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella Introduction Acceleration Techniques Spatial Data Structures Culling Outline for the Night Bounding
More informationLecture 11: Ray tracing (cont.)
Interactive Computer Graphics Ray tracing - Summary Lecture 11: Ray tracing (cont.) Graphics Lecture 10: Slide 1 Some slides adopted from H. Pfister, Harvard Graphics Lecture 10: Slide 2 Ray tracing -
More informationRay-tracing Acceleration. Acceleration Data Structures for Ray Tracing. Shadows. Shadows & Light Sources. Antialiasing Supersampling.
Ray-tracing Acceleration Acceleration Data Structures for Ray Tracing Thanks to Fredo Durand and Barb Cutler Soft shadows Antialiasing (getting rid of jaggies) Glossy reflection Motion blur Depth of field
More informationAdvanced Ray Tracing
Advanced Ray Tracing Thanks to Fredo Durand and Barb Cutler The Ray Tree Ni surface normal Ri reflected ray Li shadow ray Ti transmitted (refracted) ray 51 MIT EECS 6.837, Cutler and Durand 1 Ray Tree
More informationMSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur
MSBVH: An Efficient Acceleration Data Structure for Ray Traced Motion Blur Leonhard Grünschloß Martin Stich Sehera Nawaz Alexander Keller August 6, 2011 Principles of Accelerated Ray Tracing Hierarchical
More informationIntro to Ray-Tracing & Ray-Surface Acceleration
Lecture 12 & 13: Intro to Ray-Tracing & Ray-Surface Acceleration Computer Graphics and Imaging UC Berkeley Course Roadmap Rasterization Pipeline Core Concepts Sampling Antialiasing Transforms Geometric
More informationSung-Eui Yoon ( 윤성의 )
CS380: Computer Graphics Ray Tracing Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand overall algorithm of recursive ray tracing Ray generations Intersection
More informationB-KD Trees for Hardware Accelerated Ray Tracing of Dynamic Scenes
B-KD rees for Hardware Accelerated Ray racing of Dynamic Scenes Sven Woop Gerd Marmitt Philipp Slusallek Saarland University, Germany Outline Previous Work B-KD ree as new Spatial Index Structure DynR
More informationConsider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye
Ray Tracing What was the rendering equation? Motivate & list the terms. Relate the rendering equation to forward ray tracing. Why is forward ray tracing not good for image formation? What is the difference
More informationBounding Volume Hierarchies
Tutorial: Real-Time Collision Detection for Dynamic Virtual Environments Bounding Volume Hierarchies Stefan Kimmerle WSI/GRIS University of Tübingen Outline Introduction Bounding Volume Types Hierarchy
More informationSpatial Data Structures for Computer Graphics
Spatial Data Structures for Computer Graphics Page 1 of 65 http://www.cse.iitb.ac.in/ sharat November 2008 Spatial Data Structures for Computer Graphics Page 1 of 65 http://www.cse.iitb.ac.in/ sharat November
More informationUsing Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects
Part 7: Collision Detection Virtuelle Realität Wintersemester 2007/08 Prof. Bernhard Jung Overview Bounding Volumes Separating Axis Theorem Using Bounding Volume Hierarchies Efficient Collision Detection
More informationSolid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects
Solid Modeling Thomas Funkhouser Princeton University C0S 426, Fall 2000 Solid Modeling Represent solid interiors of objects Surface may not be described explicitly Visible Human (National Library of Medicine)
More informationAcceleration Data Structures for Ray Tracing
Acceleration Data Structures for Ray Tracing Travis Fischer and Nong Li (2007) Andries van Dam November 10, 2009 Acceleration Data Structures 1/35 Outline Introduction/Motivation Bounding Volume Hierarchy
More informationHomework 1: Implicit Surfaces, Collision Detection, & Volumetric Data Structures. Loop Subdivision. Loop Subdivision. Questions/Comments?
Homework 1: Questions/Comments? Implicit Surfaces,, & Volumetric Data Structures Loop Subdivision Shirley, Fundamentals of Computer Graphics Loop Subdivision SIGGRAPH 2000 course notes Subdivision for
More informationRay Tracing: Intersection
Computer Graphics as Virtual Photography Ray Tracing: Intersection Photography: real scene camera (captures light) photo processing Photographic print processing Computer Graphics: 3D models camera tone
More informationCOMP 175: Computer Graphics April 11, 2018
Lecture n+1: Recursive Ray Tracer2: Advanced Techniques and Data Structures COMP 175: Computer Graphics April 11, 2018 1/49 Review } Ray Intersect (Assignment 4): questions / comments? } Review of Recursive
More informationLecture 4 - Real-time Ray Tracing
INFOMAGR Advanced Graphics Jacco Bikker - November 2017 - February 2018 Lecture 4 - Real-time Ray Tracing Welcome! I x, x = g(x, x ) ε x, x + න S ρ x, x, x I x, x dx Today s Agenda: Introduction Ray Distributions
More informationSAH guided spatial split partitioning for fast BVH construction. Per Ganestam and Michael Doggett Lund University
SAH guided spatial split partitioning for fast BVH construction Per Ganestam and Michael Doggett Lund University Opportunistic triangle splitting for higher quality BVHs Bounding Volume Hierarchies (BVH)
More information11 - Spatial Data Structures
11 - Spatial Data Structures cknowledgement: Marco Tarini Types of Queries Graphic applications often require spatial queries Find the k points closer to a specific point p (k-nearest Neighbours, knn)
More informationGeometry proxies (in 2D): a Convex Polygon
Geometry proxies (in 2D): a Convex Polygon Intersection of half-planes each delimited by a line Stored as: Test: a collection of (oriented) lines a point is inside iff it is in each half-plane A very good
More informationRay Tracing. Foley & Van Dam, Chapters 15 and 16
Ray Tracing Foley & Van Dam, Chapters 15 and 16 Ray Tracing Visible Surface Ray Tracing (Ray Casting) Examples Efficiency Issues Computing Boolean Set Operations Recursive Ray Tracing Determine visibility
More informationRay Tracing Foley & Van Dam, Chapters 15 and 16
Foley & Van Dam, Chapters 15 and 16 (Ray Casting) Examples Efficiency Issues Computing Boolean Set Operations Recursive Determine visibility of a surface by tracing rays of light from the viewer s eye
More informationHolger Dammertz August 10, The Edge Volume Heuristic Robust Triangle Subdivision for Improved BVH Performance Holger Dammertz, Alexander Keller
Holger Dammertz August 10, 2008 The Edge Volume Heuristic Robust Triangle Subdivision for Improved BVH Performance Holger Dammertz, Alexander Keller Page 2 The Edge Volume Heuristic Robust Triangle Subdivision
More informationEffects needed for Realism. Ray Tracing. Ray Tracing: History. Outline. Foundations of Computer Graphics (Spring 2012)
Foundations of omputer Graphics (Spring 202) S 84, Lecture 5: Ray Tracing http://inst.eecs.berkeley.edu/~cs84 Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water,
More informationLecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees
Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees William H. Hsu Department of Computing and Information Sciences, KSU KSOL course pages: http://bit.ly/hgvxlh / http://bit.ly/evizre Public
More informationRay Casting. 3D Rendering. Ray Casting. Ray Casting. Ray Casting. Ray Casting
Rendering Ray asting The color of each pixel on the view plane depends on the radiance emanating from visible surfaces dam inkelstein rinceton University OS 6, Spring 00 Simplest method is ray casting
More informationINFOMAGR Advanced Graphics. Jacco Bikker - February April Welcome!
INFOMAGR Advanced Graphics Jacco Bikker - February April 2016 Welcome! I x, x = g(x, x ) ε x, x + S ρ x, x, x I x, x dx Today s Agenda: Introduction Ray Distributions The Top-level BVH Real-time Ray Tracing
More informationRay Tracing II. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology
Ray Tracing II Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Modified by Ulf Assarsson, 2004 Overview Spatial data structures Bounding volume hierarchies (BVHs)
More informationHidden Surface Elimination: BSP trees
Hidden Surface Elimination: BSP trees Outline Binary space partition (BSP) trees Polygon-aligned 1 BSP Trees Basic idea: Preprocess geometric primitives in scene to build a spatial data structure such
More informationSpatial Data Structures and Speed-Up Techniques. Ulf Assarsson Department of Computer Science and Engineering Chalmers University of Technology
Spatial Data Structures and Speed-Up Techniques Ulf Assarsson Department of Computer Science and Engineering Chalmers University of Technology Exercises l Create a function (by writing code on paper) that
More informationCS 465 Program 5: Ray II
CS 465 Program 5: Ray II out: Friday 2 November 2007 due: Saturday 1 December 2007 Sunday 2 December 2007 midnight 1 Introduction In the first ray tracing assignment you built a simple ray tracer that
More informationPage 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms
Visible Surface Determination Visibility Culling Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms Divide-and-conquer strategy:
More informationSoft Shadow Volumes for Ray Tracing with Frustum Shooting
Soft Shadow Volumes for Ray Tracing with Frustum Shooting Thorsten Harter Markus Osswald Chalmers University of Technology Chalmers University of Technology University Karlsruhe University Karlsruhe Ulf
More informationThe Traditional Graphics Pipeline
Last Time? The Traditional Graphics Pipeline Reading for Today A Practical Model for Subsurface Light Transport, Jensen, Marschner, Levoy, & Hanrahan, SIGGRAPH 2001 Participating Media Measuring BRDFs
More informationAdvanced 3D-Data Structures
Advanced 3D-Data Structures Eduard Gröller, Martin Haidacher Institute of Computer Graphics and Algorithms Vienna University of Technology Motivation For different data sources and applications different
More informationRay Tracing. Outline. Ray Tracing: History
Foundations of omputer Graphics Online Lecture 9: Ray Tracing 1 History and asic Ray asting Ravi Ramamoorthi Effects needed for Realism (Soft) Shadows Reflections (Mirrors and Glossy) Transparency (Water,
More informationExploiting Local Orientation Similarity for Efficient Ray Traversal of Hair and Fur
1 Exploiting Local Orientation Similarity for Efficient Ray Traversal of Hair and Fur Sven Woop, Carsten Benthin, Ingo Wald, Gregory S. Johnson Intel Corporation Eric Tabellion DreamWorks Animation 2 Legal
More informationVIII. Visibility algorithms (II)
VIII. Visibility algorithms (II) Hybrid algorithsms: priority list algorithms Find the object visibility Combine the operations in object space (examples: comparisons and object partitioning) with operations
More informationThe Traditional Graphics Pipeline
Last Time? The Traditional Graphics Pipeline Participating Media Measuring BRDFs 3D Digitizing & Scattering BSSRDFs Monte Carlo Simulation Dipole Approximation Today Ray Casting / Tracing Advantages? Ray
More informationCOMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.
COMP 4801 Final Year Project Ray Tracing for Computer Graphics Final Project Report FYP 15014 by Runjing Liu Advised by Dr. L.Y. Wei 1 Abstract The goal of this project was to use ray tracing in a rendering
More information