Bounding Volume Hierarchies. CS 6965 Fall 2011
|
|
- Matthew Ellis
- 6 years ago
- Views:
Transcription
1 Bounding Volume Hierarchies
2 2
3 Heightfield 3
4 C++ Operator? #include <stdio.h> int main() { int x = 10; while( x --> 0 ) // x goes to 0 { printf("%d ", x); } } stackoverflow.com/questions/ /what-is-the-name-of-this-operator 4
5 C++ Operator? That's not an operator -->. That's two separate operators, -- and >. Your post is decrementing x and then comparing x and 0 with the > operator To better understand, the statement could be as follows: while( (x--) > 0 ) 5
6 Program 2 6
7 Backwards Lighting 7
8 Light Direction Compute hit position (P = O + tv ) Call primitive to get normal (N ) (normalized) costheta = N V if (costheta < 0) normal =-normal Color light = scene.ambient*ka foreach light source get C L and L dist= L L, L n = L cosphi = N L n if(cosphi > 0) if(!intersect with 0 < t < dist) light += C L *(Kd * cosphi) result=light*surface color 8 costheta > 0 Means N and V are on opposite sides Should flip the normal costheta < 0 Means N and V are on the same side Keep the normal
9 Library Calls Show up as something like this: ERROR: undefined symbol: dso_handle failed to add instruction: ORI line 54 assembler returned an error, exiting This one was fixed by removing global variables Use #define or keep things locally 9
10 We do have this one! Change this line: To this line: rt.s > rt.s ${LIBDIR}/memset.s > ${TRAXOUTPUT} 10
11 Inheritance _ZTV8gpSphere: #.long 0 #.long _ZTI8gpSphere #.long _ZNK8gpSphere17intersectDetailedERK12RayPrimitiveR18IntersectionRecord #.long _ZNK8gpSphere14intersectQuickERK12RayPrimitive #.size _ZTV8gpSphere, 16 We can t handle these in simhwrt yet 11
12 Calling Convention 12
13 Calling Convention 13
14 Common Problems void draw_line(const int& framebuffer, const int& width, const Vector& V1, const Vector& V2, const int& max_pixel) { int x0 = V1[0]; int x1 = V2[0]; int y0 = V1[1]; int y1 = V2[1]; int dx = x0 - x1; if (dx < 0) dx = -dx; int dy = y0 - y1 if (dy < 0) dy = -dy; int sx, sy; if (x0 < x1) sx = 1; else sx = -1; if (y0 < y1) sy = 1; else sy = -1; int err = dx - dy; int e2; while (x0!= x1 y0!= y1) { 14
15 Common Problems int x0 = V1[0]; int x1 = V2[0]; int y0 = V1[1]; int y1 = V2[1]; trax_printi(x0); trax_printi(x1); trax_printi(y0); trax_printi(y1); int dx = x0 - x1; if (dx < 0) dx = -dx; int dy = y0 - y1 if (dy < 0) dy = -dy; int sx, sy; if (x0 < x1) sx = 1; else sx = -1; if (y0 < y1) sy = 1; else sy = -1; int err = dx - dy; int e2; trax_printi(err); 15
16 Common Problems int x0 = V1[0]; int x1 = V2[0]; int y0 = V1[1]; int y1 = V2[1]; trax_printi(x0); trax_printi(x1); trax_printi(y0); trax_printi(y1); int dx = x0 - x1; if (dx < 0) dx = -dx; int dy = y0 - y1 if (dy < 0) dy = -dy; int sx, sy; if (x0 < x1) sx = 1; else sx = -1; if (y0 < y1) sy = 1; else sy = -1; trax_printi(dx); trax_printi(dy); int err = dx - dy; int e2; 16
17 Common Problems int x0 = V1[0]; int x1 = V2[0]; int y0 = V1[1]; int y1 = V2[1]; trax_printi(x0); trax_printi(x1); trax_printi(y0); trax_printi(y1); int dx = x0 - x1; if (dx < 0) dx = -dx; int dy = y0 - y1 if (dy < 0) dy = -dy; trax_printi(dx); trax_printi(dy); int sx, sy; if (x0 < x1) sx = 1; else sx = -1; if (y0 < y1) sy = 1; else sy = -1; int err = dx - dy; int e2; 17
18 Common Problems trax_printi(x0); trax_printi(x1); trax_printi(y0); trax_printi(y1); int dx = x0 - x1; if (dx < 0) dx = -dx; // dx = abs(dx) int dy = y0 - y1 if (dy < 0) dy = -dy; // dy = abs(dy) trax_printi(dx); trax_printi(dy); 18
19 Common Problems trax_printi(x0); trax_printi(x1); trax_printi(y0); trax_printi(y1); int dx = x0 - x1; if (dx < 0) dx = -dx; // dx = abs(dx) int dy = y0 - y1 if (dy < 0) dy = -dy; // dy = abs(dy) trax_printi(dx); trax_printi(dy); // Write it a different way int dx = x0 > x1? x0 - x1 : x1 - x0; int dy = y0 > y1? y0 - y1 : y1 - y0; 19
20 Common Problems Before void draw_line(const int& framebuffer, const int& width, const Vector& V1, const Vector& V2, const int& max_pixel) { int x0 = V1[0]; int x1 = V2[0]; int y0 = V1[1]; int y1 = V2[1]; int dx = x0 - x1; if (dx < 0) dx = -dx; int dy = y0 - y1 if (dy < 0) dy = -dy; int sx, sy; if (x0 < x1) sx = 1; else sx = -1; if (y0 < y1) sy = 1; else sy = -1; int err = dx - dy; int e2; while (x0!= x1 y0!= y1) { 20 After void draw_line(const int& framebuffer, const int& width, const Vector& V1, const Vector& V2, const int& max_pixel) { int x0 = V1[0]; int x1 = V2[0]; int y0 = V1[1]; int y1 = V2[1]; int dx = x0 > x1? x0 - x1 : x1 - x0; int dy = y0 > y1? y0 - y1 : y1 - y0; int sx, sy; if (x0 < x1) sx = 1; else sx = -1; if (y0 < y1) sy = 1; else sy = -1; int err = dx - dy; int e2; while (x0!= x1 y0!= y1) {
21 Box: easy Bounding boxes bounds = Min(p1, p2), Max(p1, p2) P2 Sphere: bounds = C-Vector(radius, radius,radius) C+Vector(radius, radius, radius) P1 C 21
22 Bounding Boxes Triangle: bounds = Min(p1,p2,p3), Max(p1,p2,p3) P1 Plane infinite bounds P2 You may want to consider removing planes from your renderer at this point Or keep them outside of your accel structures P3 22
23 Bounding boxes Disc/Ring: C x ± rad N 2 2 y + N z N = 1 Similar for y/z Group: Union of object bounding boxes min of mins max of maxs 23
24 Uses for bounding boxes Quick reject for expensive primitives To fill in grid cells Directly in Bounding Volume Hierarchy or similar 24
25 Bounding Volume Hierarchy Observe that intersection is like a search We know that searching is O(n) for unsorted lists but O(log n) for sorted lists How do we sort objects from all directions simultaneously? 25
26 Bounding volume hierarchy Organize objects into a tree Group objects in the tree based on spatial relationships Each node in the tree contains a bounding box of all the objects below it 26
27 BVH traversal At each level of the tree, intersect the ray with the bounding box miss: ray misses the entire subtree hit: recurse to both children 27
28 BVH traversal At each level of the tree, intersect the ray with the bounding box miss: ray misses the entire subtree hit: recurse to both children 28
29 BVH traversal At each level of the tree, intersect the ray with the bounding box miss: ray misses the entire subtree hit: recurse to both children 29
30 BVH traversal At each level of the tree, intersect the ray with the bounding box miss: ray misses the entire subtree hit: recurse to both children 30
31 BVH optimizations Stop if the current T value is closer than the BVH node 31
32 BVH optimizations Stop if the current T value is closer than the BVH node Traverse down side of tree that is closer to origin of the ray first 32
33 BVH optimizations Stop if the current T value is closer than the BVH node Traverse down side of tree that is closer to origin of the ray first Three or more way split 33
34 Building a BVH Determining optimal BVH structure is NP-hard problem Heuristic approaches: Cost models (minimize volume or surface area) Spatial models Top down Bottom up Categories of approaches: 34 okay bad okay
35 Median cut BVH Top down approach: construction Sort objects by position on axis cycle through x,y,z use center of bounding box Insert tree node with half of objects on left and half on right 35
36 Weghorst BVH construction Bottom up construction Add objects one at a time to tree Insert to subtree that would cause smallest increase to area 36
37 Weghorst BVH construction Bottom up construction Add objects one at a time to tree Insert to subtree that would cause smallest increase to area 37
38 Weghorst BVH construction Bottom up construction Add objects one at a time to tree Insert to subtree that would cause smallest increase to area 38
39 Weghorst BVH construction Bottom up construction Add objects one at a time to tree Insert to subtree that would cause smallest increase to area 39
40 k-d tree Recursively divide space in half Alternate coordinate axes Cycle through axes or store axis split in each node What do you do with objects split by the plane? Hard part: where do you split in each dimension? 40
41 BSP tree Like a k-d tree where splitting planes can be arbitrarily located Hard part: where do you split in each dimension? Harder part: how do you orient each plane? More storage/computation, tighter bounds 41
42 BSP/k-d tree tradeoffs Build is NP-hard problem Traversal is quick Heuristic approaches are always used Storage can be lower than BVH or grid 42
43 K-d traversal Keep track of intervals on ray: min: 0 max: Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 43
44 K-d traversal Keep track of intervals on ray: Compute t of split plane If t < min: goto far child If t > max: goto near child Min: 0 Max: Otherwise: goto both children with updated intervals 44
45 K-d traversal Keep track of intervals on ray: 1 2 Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 45 Min: 0 Max: Split: 1.0 Stack: 1 New min: 0 New max: 1.0
46 K-d traversal Keep track of intervals on ray: Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals Min: 0 Max: 1.0 Split: 1.3 Stack: 1 New min: 0 New max: 1.0
47 K-d traversal Keep track of intervals on ray: 5 6 Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 47 Min: 0 Max: 1.0 Split: 0.4 Stack: 1 5 New min: 0 New max: 0.4
48 K-d traversal Keep track of intervals on ray: 7 8 Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 48 Min: 0.4 Max: 1.0 Split: 0.7 Stack: 1 8 New min: 0.4 New max: 0.6
49 K-d traversal Keep track of intervals on ray: 7 8 Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 49 Min: 0.7 Max: 1.0 Split: Stack: 1 New min: 0.4 New max: 0.6
50 K-d traversal 9 10 Keep track of intervals on ray: Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 50 Min: 1.0 Max: Split: 1.5 Stack: 10 New min: 1.0 New max: 1.5
51 K-d traversal Keep track of intervals on ray: Compute t of split plane If t < min: goto far child If t > max: goto near child Otherwise: goto both children with updated intervals 51 Min: 1.0 Max: 1.5 Split: 1.4 Stack: New min: 1.0 New max: 1.4
52 K-d tree build Optimal solution is NP-hard Cost model based (better) Cost of traversal Cost of intersection Probability of hit Spatial median split (a little like octree) Object median split (makes balanced trees) 52
53 Havran 01: K-d tree build Start with bounding box of scene Select split plane along each axis Recurse Start with spatial median Move toward bounding box of child nodes Stop if node contains 2-3 objects Stop if depth > max (20-30) Backtrack Combine children with identical content 53
54 Acceleration Structure Summary Most common: Grid, Hierarchical Grid, k-d tree, BVH Grid based: P time deterministic build Grid resolution tradeoff Tree based: NP hard build Heuristic approaches 54
55 Update SimHWRT svn up make./update.sh This one will take a while 55
Acceleration 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 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 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 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 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 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 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 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 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 informationTo Shading and Beyond. CS 6965 Fall 2011
To Shading and Beyond Program 1 Questions on program 1? Running simhwrt 2 Program 1 fix 3 simhwrt Can set scene and image size --no-scene --width 256 --height 256 Can set number of TMs and threads per
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 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 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 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 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 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 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 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 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 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 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 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 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. 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 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 informationRay 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 informationSpeeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration
Speeding Up Ray Tracing nthony Steed 1999, eline Loscos 2005, Jan Kautz 2007-2009 Optimisations Limit the number of rays Make the ray test faster for shadow rays the main drain on resources if there are
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 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 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 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 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 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 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 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 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 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 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 informationAccelerating Ray-Scene Intersection Calculations
ccelerating Ray-Scene Intersection alculations onnelly arnes S 80: Graphics cknowledgment: slides by Jason Lawrence, Misha Kazhdan, llison Klein, Tom unkhouser, dam inkelstein and avid obkin Overview cceleration
More informationCS535 Fall Department of Computer Science Purdue University
Spatial Data Structures and Hierarchies CS535 Fall 2010 Daniel G Aliaga Daniel G. Aliaga Department of Computer Science Purdue University Spatial Data Structures Store geometric information Organize geometric
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 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 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 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 Intersection Acceleration
Ray Intersection Acceleration Image Synthesis Torsten Möller Reading Physically Based Rendering by Pharr&Humphreys Chapter 2 - rays and transformations Chapter 3 - shapes Chapter 4 - intersections and
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 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 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 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 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 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 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 informationMore Hidden Surface Removal
Lecture 8 More Hidden Surface Removal Efficient Painter - binary space partition (BSP) tree Efficient Ray Casting - spatial partitioning (uniform, octrees) - bounding volumes Recall last lecture... front
More informationCS 6620 Shading. Steve Parker Peter Shirley
CS 6620 Shading Steve Parker Peter Shirley Shading models Lambert s cosine law Light reaching surface is proportional to projected area: cos θ Lambertian shading Comes from a rough surface (at microscopic
More informationA Model to Evaluate Ray Tracing Hierarchies
A Model to Evaluate Ray Tracing Hierarchies K. R. Subramanian Donald Fussell Department of Computer Sciences The University of Texas at Austin 1 Introduction In this article we develop a model to evaluate
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 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 informationPhysically Based Rendering ( ) Intersection Acceleration
Physically ased Rendering (600.657) Intersection cceleration Intersection Testing ccelerated techniques try to leverage: Grouing: To efficiently discard grous of rimitives that are guaranteed to be missed
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 informationGeometric Structures 2. Quadtree, k-d stromy
Geometric Structures 2. Quadtree, k-d stromy Martin Samuelčík samuelcik@sccg.sk, www.sccg.sk/~samuelcik, I4 Window and Point query From given set of points, find all that are inside of given d-dimensional
More informationCulling. Computer Graphics CSE 167 Lecture 12
Culling Computer Graphics CSE 167 Lecture 12 CSE 167: Computer graphics Culling Definition: selecting from a large quantity In computer graphics: selecting primitives (or batches of primitives) that are
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 informationSUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling
CS380: Introduction to Computer Graphics Ray tracing Chapter 20 Min H. Kim KAIST School of Computing Modeling SUMMARY 2 1 Types of coordinate function Explicit function: Line example: Implicit function:
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 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 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 informationScene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development
Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Chap. 5 Scene Management Overview Scene Management vs Rendering This chapter is about rendering
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 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 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 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 informationCSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018
CSE 167: Introduction to Computer Graphics Lecture #9: Visibility Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 Announcements Midterm Scores are on TritonEd Exams to be
More informationComputer Graphics II
Computer Graphics II Autumn 2017-2018 Outline Visible Surface Determination Methods (contd.) 1 Visible Surface Determination Methods (contd.) Outline Visible Surface Determination Methods (contd.) 1 Visible
More informationPoint Cloud Filtering using Ray Casting by Eric Jensen 2012 The Basic Methodology
Point Cloud Filtering using Ray Casting by Eric Jensen 01 The Basic Methodology Ray tracing in standard graphics study is a method of following the path of a photon from the light source to the camera,
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 informationCollision and Proximity Queries
Collision and Proximity Queries Dinesh Manocha (based on slides from Ming Lin) COMP790-058 Fall 2013 Geometric Proximity Queries l Given two object, how would you check: If they intersect with each other
More information9. Visible-Surface Detection Methods
9. Visible-Surface Detection Methods More information about Modelling and Perspective Viewing: Before going to visible surface detection, we first review and discuss the followings: 1. Modelling Transformation:
More informationRay Casting. COS 426, Spring 2015 Princeton University
Ray Casting COS 426, Spring 2015 Princeton University Ray Casting The color of each pixel on the view plane depends on the radiance emanating along rays from visible surfaces in scene Light Surfaces Camera
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 informationkd-trees Idea: Each level of the tree compares against 1 dimension. Let s us have only two children at each node (instead of 2 d )
kd-trees Invented in 1970s by Jon Bentley Name originally meant 3d-trees, 4d-trees, etc where k was the # of dimensions Now, people say kd-tree of dimension d Idea: Each level of the tree compares against
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 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 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 informationkd-trees for Volume Ray-Casting
kd-trees for Volume Ray-Casting Anita Schilling Special Seminar for Computer Graphics 15. January 2009 Anita Schilling kd-trees for Volume Ray-Casting 1 / 39 Outline 1 Introduction 2 Ray-Voxel Intersection
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 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 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 informationSpeeding up your game
Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers (adapted by Marc Levoy from a lecture by Tomas Möller, using material
More informationCollision Detection with Bounding Volume Hierarchies
Simulation in Computer Graphics Collision Detection with Bounding Volume Hierarchies Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volumes BV hierarchies
More informationSpatial Data Structures and Acceleration Algorithms
Spatial Data Structures and Acceleration Algorithms Real-time Renderg Performance Goals Spatial Structures Boundg Volume Hierarchies (BVH) Bary Space Partiong(BSP) Trees, Octrees Scene Graphs Cullg Techniques
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 informationקורס גרפיקה ממוחשבת 2010/2009 סמסטר א' Rendering 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור
קורס גרפיקה ממוחשבת 2010/2009 סמסטר א' Rendering 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור What is 3D rendering? Construct an image from a 3D model מצלמה תאורה View Plane
More informationSung-Eui Yoon ( 윤성의 )
CS380: Computer Graphics Clipping and Culling Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Class Objectives Understand clipping and culling Understand view-frustum, back-face
More informationDynamic Bounding Volume Hierarchies. Erin Catto, Blizzard Entertainment
Dynamic Bounding Volume Hierarchies Erin Catto, Blizzard Entertainment 1 This is one of my favorite Overwatch maps: BlizzardWorld. This is the spawn area inside the Hearthstone Tavern. 2 All the objects
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 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 informationCEng 477 Introduction to Computer Graphics Fall 2007
Visible Surface Detection CEng 477 Introduction to Computer Graphics Fall 2007 Visible Surface Detection Visible surface detection or hidden surface removal. Realistic scenes: closer objects occludes the
More information