Spatial Data Structures for Computer Graphics

Size: px
Start display at page:

Download "Spatial Data Structures for Computer Graphics"

Transcription

1 Spatial Data Structures for Computer Graphics Page 1 of 65 sharat November 2008

2 Spatial Data Structures for Computer Graphics Page 1 of 65 sharat November 2008 Acknowledgements: Joint work with Biswarup Choudhury and Rhushabh Goradia

3 Spatial Data Structures for Computer Graphics Page 1 of 65 sharat November 2008 Acknowledgements: Joint work with Biswarup Choudhury and Rhushabh Goradia Most examples are from ViGIL IIT Bombay. 1-1 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

4 Talk Overview Object Pose Solution Background about this talk Exhibit B: Which picture do you like? Page 2 of 65

5 Talk Overview Object Pose Solution Background about this talk Application in Vision Exhibit A: Exhibit B: Which picture do you like? Page 2 of 65

6 Talk Overview Object Pose Solution Background about this talk Application in Vision Exhibit A: Application in Imaging Exhibit B: Octrees Exhibit B: Which picture do you like? Page 2 of 65

7 Talk Overview Object Pose Solution Background about this talk Application in Vision Exhibit A: Page 2 of 65 Exhibit B: Which picture do you like? Application in Imaging Exhibit B: Octrees Application in Graphics Exhibit C: Space Filling Curves, Compressed Octrees 1-2 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

8 Level 3 Level 2 Level 1 Visible Background Why this talk: Role of traditional CS and CSE in graphics NODE N Visible Page 3 of 65 Visible Visible Exhibit C:

9 Level 3 Level 2 Level 1 Visible Visible NODE N Background Why this talk: Role of traditional CS and CSE in graphics Not a theory talk (algorithms are correct, but may not be optimal in a big-oh sense) Page 3 of 65 Visible Visible Exhibit C:

10 Page 3 of 65 Level 3 Level 2 Level 1 Visible Visible NODE N Visible Visible Background Why this talk: Role of traditional CS and CSE in graphics Not a theory talk (algorithms are correct, but may not be optimal in a big-oh sense) Use of images, and points as primitives in computer graphics Exhibit C:

11 Page 3 of 65 Level 3 Level 2 NODE N Visible Level 1 Visible Visible Exhibit C: Visible Background Why this talk: Role of traditional CS and CSE in graphics Not a theory talk (algorithms are correct, but may not be optimal in a big-oh sense) Use of images, and points as primitives in computer graphics Please feel free to interrupt and ask questions at any stage

12 Page 3 of 65 Level 3 Level 2 NODE N Visible Level 1 Visible Visible Exhibit C: Visible Background Why this talk: Role of traditional CS and CSE in graphics Not a theory talk (algorithms are correct, but may not be optimal in a big-oh sense) Use of images, and points as primitives in computer graphics Please feel free to interrupt and ask questions at any stage Vision, Graphics, and Imaging: Forward and Inverse Problems 1-3 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

13 Talk Overview Object Pose Solution Background about this talk Application in Vision Exhibit A: Application in Imaging Exhibit B: Octrees Application in Graphics Exhibit C: Space Filling Curves, Compressed Octrees Page 4 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

14 Problem Definition: Object Pose Object Pose Solution Object Pose: Given images of a static object, how to create the illusion of realistic motion of the object along any arbitrary path composed realistically in arbitrary environments? Page 5 of 65

15 Problem Definition: Object Pose Object Pose Solution Object Pose: Given images of a static object, how to create the illusion of realistic motion of the object along any arbitrary path composed realistically in arbitrary environments? Page 5 of 65 [Play Video] 1-5 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

16 Problem Definition: Object Pose Object Pose: Given images of a static object, how to create the illusion of realistic motion of the object along any arbitrary path composed realistically in arbitrary environments? Page 6 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

17 1. Object Pose Solution Object Pose Solution Image Acquisition (Studio) Path specification (Run-Time) Page 7 of 65 Computing Shape Computing Color

18 1. Object Pose Solution Image Acquisition (Studio) Path specification (Run-Time) Page 7 of 65 Computing Shape Computing Color Clearly, we need to compute the shape and color from previously acquired close by images... nearest neighbour computation in two dimensions

19 1. Object Pose Solution Image Acquisition (Studio) Path specification (Run-Time) Page 7 of 65 Computing Shape Computing Color Clearly, we need to compute the shape and color from previously acquired close by images... nearest neighbour computation in two dimensions [Play Video] 1-7 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

20 View Interpolation via Visual Hull Object Pose Solution Page 8 of 65 Start 1-8 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

21 The Visual Hull Page 9 of 65 Carve Carve again 1-9 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

22 2. Page 10 of 65 Hull Compared to the real thing 1-10 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

23 More details on the method Page 11 of 65 Question: Can we use the studio pictures ALSO for color computation? 1-11 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

24 Color Computation Object Pose Solution JJ II J I Page 12 of 65 Requires solution to: Given images of an object captured under a set of lighting conditions, how to efficiently render the scene under new illumination configurations? 1-12 Very Few Rights Reserved CC BY: \ $ Sharat Chandran kgp 2008 October 22

25 Color Computation Object Pose Solution JJ II J I Page 13 of 65 Requires solution to: Nearest Neighbors, and Bi-chromatic Nearest Neighbors 1-13 Very Few Rights Reserved CC BY: \ $ Sharat Chandran kgp 2008 October 22

26 Output Frame Page 14 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

27 Page 15 of Dimension of data is k (but common to say k-d tree of dimension 3 instead of 3d-tree). are binary trees Designed to handle spatial data in a simple way For n points, O(n) space, O(log n) height (if balanced), supports range and nearest-neighbor queries. Node consists of Two child pointers, Satellite information (such as name). A key: Either a single float representing a coordinate value, or a pair of floats (representing a dimension of a rectangle) 1-15 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

28 Page 16 of 65 Construct a binary tree Basic Idea Behind At each step, choose one of the coordinate as a basis of dividing the rest of the points For example, at the root, choose x as the basis Like binary search trees, all items to the left of root will have the x-coordinate less than that of the root All items to the right of the root will have the x-coordinate greater than (or equal to) that of the root Choose y as the basis for discrimination for the root s children And choose x again for the root s grandchildren Note: Equality (corresponding to right child) is significant 1-16 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

29 Example: Construct kd-tree Given Points Object Pose Solution Coordinates of points are (35, 90), (70,80), (10,75) (80,40), (50,90), (70,30), (90,60), (50,25), (25,10), (20,50), and (60,10) (10,75) (35,90) (50,90) (70,80) (90,60) Page 17 of 65 Points may be given one a time, or all at once. Data best visualized as shown below (20,50) (50,25) (70,30) (80,40) (25,10) (60,10) 1-17 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

30 Example: kdtree Insertion (35,90) (50,90) (35,90) (10,75) (70,80) (10,75) (70,80) (90,60) (25,10) (80,40) (50,90) (20,50) (20,50) (70,30) (90,60) (70,30) (80,40) (50,25) Page 18 of 65 (50,25) (60,10) (25,10) (60,10) 1-18 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

31 Page 19 of 65 Nearest Neighbors: The scenario Find the nearest Pizza Hut. (Compare with the McDonald problem). Assume kd-tree T given, and C is the region associated with a node. Input p is a point Searching for point p in T helps In one dimension, T is very useful: the closest neighbor is from the set of nodes visited (MANY nodes are pruned) In higher dimensions, T is not as useful (the closest neighbor may be far away). Nevertheless, pruning is possible. General strategy: Collect partial results, judicial traversal, and prune Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

32 What If We Locate Point? (10,75) (35,90) (50,90) (70,80) (10,75) (35,90) (70,80) Page 20 of 65 (20,50) (25,10) (50,25) (60,10) (70,30) (80,40) (90,60) (20,50) We visit (35,90), (70,80),..., and fall off (70,30) st point is nowhere near this path. We must visit both subtrees. (25,10) (50,25) (70,30) (60,10) (80,40) (90,60) (50,90) 1-20 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

33 Page 21 of 65 Nearest Neighbor: Pruned version Maintain the rectangle r associated with a node Compute a lower bound on the distance from the query q to the rectangle Distance between q and any point in r is at least lowerbound(r, q) Do not compute all distances between q and every point in r lowerbound() helps because if the lower bound is larger than the distance computed so far, we do not consider many points Must compute lowerbound() quickly 1-21 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

34 Page 22 of 65 Nearest Neighbor: Pruned Version f l o a t lowerbound ( Rectangle r, Point p ) { i f ( r. i n s i d e ( p ) ) r e t u r n 0; i f ( r. l e f t ( p ) ) r e t u r n r. minx p. x ;... } Result process (KDNode k, i n t cd, Rectangle r, Result re i f ( k == n u l l ) r e t u r n res ; i f ( lowerbound ( r, query ) >= res. distance ) r e t u r n res... } If the lower bound is larger than the distance computed so far, exit! Otherwise compute the distance with the current node Process the two children in order! 1-22 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

35 Pruned Version: Root (35,90) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (40,50)) (90,60) (70,30) (80,40) Page 23 of 65 (50,25) (10,75) (35,90) (70,80) (25,10) (80,40) (50,90) (25,10) (60,10) (20,50) (50,25) (70,30) (90,60) (60,10) 1-23 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

36 Pruned Version: (70,80) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) Page 24 of 65 (50,25) (70,30) (80,40) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-24 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

37 Pruned Version: (80,40) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) Page 25 of 65 (50,25) (70,30) (80,40) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-25 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

38 Pruned Version: (70,30) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) Page 26 of 65 (50,25) (70,30) (80,40) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-26 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

39 Pruned Version: (50,25) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) Page 27 of 65 (50,25) (70,30) (80,40) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-27 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

40 Pruned Version: (60,10) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (90,60) (20,50) (70,30) (80,40) Page 28 of 65 (50,25) (10,75) (35,90) (70,80) (25,10) (80,40) (50,90) (25,10) (60,10) (20,50) (50,25) (70,30) (60,10) (90,60) Note: (90,60) and (50,90) will be skipped next! 1-28 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

41 Pruned Version: (10,75) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) Page 29 of 65 (50,25) (70,30) (80,40) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-29 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

42 Pruned Version: (25,10) Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) Page 30 of 65 (50,25) (70,30) (80,40) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-30 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

43 Pruned Version: Answer Object Pose Solution (10,75) (35,90) (50,90) (70,80) (20,50) (90,60) (70,30) (80,40) Page 31 of 65 (50,25) (35,90) (10,75) (70,80) (25,10) (60,10) (20,50) (25,10) (50,25) (70,30) (80,40) (90,60) (50,90) (60,10) 1-31 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

44 Which Nodes Are Processed? Object Pose Solution (35,90) (10,75) (70,80) (25,10) (80,40) (50,90) (20,50) (70,30) (90,60) Page 32 of 65 (50,25) (60,10) 1-32 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

45 Any Improvement Possible? Nine nodes examined. Can we do better? Yes, if decision to pick a node is based on dynamic changing costs instead of initial left-right decision. Use a priority queue. (Seven nodes examined instead of nine) Page 33 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

46 Talk Overview Object Pose Solution Page 34 of 65 Background about this talk Application in Vision Exhibit A: Application in Imaging Exhibit B: Octrees Application in Graphics Exhibit C: Space Filling Curves, Compressed Octrees Exhibit B: Which picture do you like? 1-34 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

47 4. Object Pose Solution By quantization, here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors. Page 35 of 65

48 4. Object Pose Solution By quantization, here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors. Page 35 of 65 Why? Lightweight; thus easy to transmit, store, share

49 4. Object Pose Solution By quantization, here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors. Page 35 of 65 Why? Lightweight; thus easy to transmit, store, share Mechanics? Create as output a lookup table Can be done in any color space

50 4. Object Pose Solution By quantization, here we mean the process of changing the given N number of colors to K colors. In the picture below, an image with N=33694 colors is changed to one with K=64 colors. Page 35 of 65 Why? Lightweight; thus easy to transmit, store, share Mechanics? Create as output a lookup table Can be done in any color space Basic challenge: Efficient implementation of reverse lookup table, good representation of colors 1-35 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

51 Page 36 of colors have been accepted as safe to display. Some of these colors are gray Each channel can take only values 00, 33, 66, 99, CC, and FF Figures shows the colors organized in descending RGB values. Value at top left is FFFFFF; first item in the second row has the value FFCCFF Digression: Web Safe Colors 1-36 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

52 Uniform Quantization Object Pose Solution Page 37 of 65 First find the maximum and minimum range and allocate numbers R, G, and B such that R*G*B<=K Uniformly divide the range. For example, the range [r min,r max ] is divided into R parts. Map these R values to actual colors. For example, if R=4, then we might chose 1, 2, 4 and 8

53 Uniform Quantization Object Pose Solution Page 37 of 65 First find the maximum and minimum range and allocate numbers R, G, and B such that R*G*B<=K Uniformly divide the range. For example, the range [r min,r max ] is divided into R parts. Map these R values to actual colors. For example, if R=4, then we might chose 1, 2, 4 and 8 Advantages:

54 Uniform Quantization Object Pose Solution Page 37 of 65 First find the maximum and minimum range and allocate numbers R, G, and B such that R*G*B<=K Uniformly divide the range. For example, the range [r min,r max ] is divided into R parts. Map these R values to actual colors. For example, if R=4, then we might chose 1, 2, 4 and 8 Advantages: Easy to implement Drawbacks:

55 Uniform Quantization Object Pose Solution Page 37 of 65 First find the maximum and minimum range and allocate numbers R, G, and B such that R*G*B<=K Uniformly divide the range. For example, the range [r min,r max ] is divided into R parts. Map these R values to actual colors. For example, if R=4, then we might chose 1, 2, 4 and 8 Advantages: Easy to implement Drawbacks: Distribution of colors is ignored resulting in banding or false contours 1-37 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

56 Multi-pass algorithm Popularity Algorithm Page 38 of 65

57 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors Page 38 of 65

58 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors But first quantize the colors ( ) Page 38 of 65

59 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors But first quantize the colors ( ) Second pass: For each pixel, find the closest color Page 38 of 65

60 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors But first quantize the colors ( ) Second pass: For each pixel, find the closest color Advantages: Page 38 of 65

61 Page 38 of 65 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors But first quantize the colors ( ) Second pass: For each pixel, find the closest color Advantages: Easy to implement, popular colors show up in the resulting image

62 Page 38 of 65 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors But first quantize the colors ( ) Second pass: For each pixel, find the closest color Advantages: Easy to implement, popular colors show up in the resulting image Disadvantages:

63 Page 38 of 65 Multi-pass algorithm Popularity Algorithm Count number of cells having a particular set of color, and take the top K colors But first quantize the colors ( ) Second pass: For each pixel, find the closest color Advantages: Easy to implement, popular colors show up in the resulting image Disadvantages: Expensive; clusters of unpopular but significant colors are ignored 1-38 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

64 Goal: Adaptively subdivide color block into K parts so that each sub-block has the same number of colors Median-Cut Algorithm Page 39 of 65

65 Page 39 of 65 Goal: Adaptively subdivide color block into K parts so that each sub-block has the same number of colors Median-Cut Algorithm Step 1: Divide the longest dimension by a plane into two parts so that there are equal number of colors (in this dimension) Recursively apply the same method until the number of sub-blocks is K Color reduction efficiently implemented using kd-trees Inverse color lookup is still slow 1-39 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

66 Inverse color lookup is done using the bits of the incoming color. Octree based quantization Page 40 of 65

67 Inverse color lookup is done using the bits of the incoming color. Octree based quantization Page 40 of 65 Surprisingly, color reduction is also done using the same octree 1-40 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

68 Page 41 of 65 Talk Overview Background about this talk Application in Vision Exhibit A: Application in Imaging Exhibit B: Octrees Application in Graphics Exhibit C: Space Filling Curves, Compressed Octrees 1-41 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

69 5. Page 42 of 65 Model surfaces as points Each point has attributes: [coordinates, normal, reflectance, emmisivity]

70 5. Page 42 of 65 Model surfaces as points Each point has attributes: [coordinates, normal, reflectance, emmisivity] Immediate question: Why not triangles, why points? And how do we get these points? 1-42 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

71 Polygons v/s points: LOD Level of Detail (LOD) based hierarchy is simpler in point based models Page 43 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

72 Visibility Between Point Pairs VISIBILITY IN POLYGONAL MODELS VISIBILITY IN POINT MODELS Page 44 of 65

73 Visibility Between Point Pairs VISIBILITY IN POLYGONAL MODELS VISIBILITY IN POINT MODELS View dependent visibility versus view independent visibility Page 44 of 65

74 Visibility Between Point Pairs VISIBILITY IN POLYGONAL MODELS VISIBILITY IN POINT MODELS View dependent visibility versus view independent visibility Page 44 of 65 Although view dependent visibility based point based rendering solutions exist,

75 Visibility Between Point Pairs VISIBILITY IN POLYGONAL MODELS VISIBILITY IN POINT MODELS View dependent visibility versus view independent visibility Page 44 of 65 Although view dependent visibility based point based rendering solutions exist, we present the first global illumination solution for point models based on the view independent paradigm 1-44 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

76 Visibility Between Point Pairs View Independent Visibility calculation between point pairs is essential to give correct Global Illumination results as a point receives energy from other point only if it is visible Page 45 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

77 Hierarchical Visibility Hierarchical Visibility enables quick answers to visibility queries, thus enabling a faster GI solution Level 3 Level 2 Level 1 Page 46 of Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

78 Object Pose Solution Hierarchical Visibility Key Notion: We define a (V-map) for the resulting tree to enable quick answers to visibility queries. JJ II J I Page 47 of Very Few Rights Reserved CC BY: \ $ Sharat Chandran kgp 2008 October 22

79 6. The visibility map for a tree is a collection of visibility links for every node in the tree The visibility link for any node N is a set L of nodes Level 3 Level 2 Level 1 Visible Every point in any node in L is guaranteed to be visible from every point in N NODE N Visible Visible Visible Page 48 of 65 NODE N V1 V2 V3 V4 VISIBILITY LINK 1-48 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

80 What is a (V-map)? LEVEL 0 (ROOT) LEVEL 1 Page 49 of 65 With respect to at any level, COMPLETELY INVISIBLE COMPLETELY VISIBLE PARTIALLY VISIBLE 1-49 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

81 What is a (V-Map)? LEVEL 0 (ROOT) LEVEL LEVEL 2 Page 50 of 65 With respect to at any level, COMPLETELY INVISIBLE COMPLETELY VISIBLE PARTIALLY VISIBLE 1-50 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

82 What is a (V-Map)? Object Pose Solution LEVEL 0 (ROOT) LEVEL LEVEL 2 Page 51 of 65 With respect to at any level, COMPLETELY INVISIBLE LEVEL 3 (LEAF) COMPLETELY VISIBLE PARTIALLY VISIBLE 1-51 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

83 Page 52 of 65 Queries? Visibility map entertain efficient answers: 1. Is point x visible from point y? 2. What is the visibility status of u points around x with respect to v points around y? Repeat a primitive point-point visibility query uv times V-map gives the answer with O(1) point-point visibility queries. 3. Given a point x and a ray R, determine the first object of intersection. 4. Is point x in the shadow (umbra) of a light source? All queries answered with a simple octree traversal 1-52 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

84 Quadtrees Given a set of points, we need to know how to build octrees, or Page 53 of 65

85 Quadtrees Given a set of points, we need to know how to build octrees, or for that matter, quadtrees Page 53 of 65 A quadtree built on a set of 10 points in 2D

86 Quadtrees Given a set of points, we need to know how to build octrees, or for that matter, quadtrees Page 53 of 65 A quadtree built on a set of 10 points in 2D Important: Interested in a parallel algorithm for building octrees 1-53 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

87 Compressed Quadtrees Page 54 of 65 Each node in compressed octree is either a leaf or has at least two children This is going to be very useful 1-54 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

88 7. We recursively bisect space into 2 k 2 k 2 k non-overlapping cells of equal size. Key Idea: Mapping of these cells to a 1D linear ordering Page 55 of 65

89 7. We recursively bisect space into 2 k 2 k 2 k non-overlapping cells of equal size. Key Idea: Mapping of these cells to a 1D linear ordering Page 55 of 65 Each cell is thus assigned an index which can be done cleverly The Sfc index for k=2 for a cell in 3 Dimensions (d=3) with coordinates (3,1,2) = (11,,10) is 1110 = Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

90 Octrees and Sfcs Object Pose Solution Leaves when sorted by Sfc indices represent bottom traversal In fact, this represents a post order traversal of a quadtree Page 56 of 65

91 Octrees and Sfcs Object Pose Solution Leaves when sorted by Sfc indices represent bottom traversal In fact, this represents a post order traversal of a quadtree Page 56 of 65 Better still, can be viewed as multiple Sfcs at various resolutions Even better, parent can be generated from child s Sfc Given two nodes c 1 and c 2,

92 Octrees and Sfcs Object Pose Solution Leaves when sorted by Sfc indices represent bottom traversal In fact, this represents a post order traversal of a quadtree Page 56 of 65 Better still, can be viewed as multiple Sfcs at various resolutions Even better, parent can be generated from child s Sfc Given two nodes c 1 and c 2, The longest common prefix of the Sfc indices (that s a multiple of the dimension d) represents the Sfc index 1-56 Very Few Rights Reserved CC of the LCA. $\ BY: Sharat Chandran kgp 2008 October 22

93 Talk Summary Spatial data structures is core in Vi,G,I Parallel algorithms on GPU are doable Application in Vision (Exhibit A: ) Application in Imaging (Exhibit B: Octrees) Application in Graphics (Exhibit C: Compressed Octrees) Page 57 of 65 Hope you liked it.. questions to iitb.ac.in 1-57 Very Few Rights Reserved CC BY: $\ Sharat Chandran kgp 2008 October 22

Algorithms for GIS:! Quadtrees

Algorithms for GIS:! Quadtrees Algorithms for GIS: Quadtrees Quadtree A data structure that corresponds to a hierarchical subdivision of the plane Start with a square (containing inside input data) Divide into 4 equal squares (quadrants)

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer 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 information

Spatial 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 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 information

Ray Tracing Acceleration Data Structures

Ray 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 information

Spatial Data Structures

Spatial 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 information

Spatial Data Structures

Spatial 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 information

Acceleration Data Structures

Acceleration 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 information

Computer Graphics. Bing-Yu Chen National Taiwan University

Computer 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 information

kd-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 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 information

Spatial Data Structures

Spatial 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 information

Parallel 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 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 information

Intersection Acceleration

Intersection 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 information

Spatial Data Structures

Spatial 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 information

Geometric Structures 2. Quadtree, k-d stromy

Geometric 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 information

Announcements. 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 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 information

Ray Tracing. Cornell CS4620/5620 Fall 2012 Lecture Kavita Bala 1 (with previous instructors James/Marschner)

Ray 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 information

Lecture 25 of 41. Spatial Sorting: Binary Space Partitioning Quadtrees & Octrees

Lecture 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 information

Spatial Data Structures

Spatial 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 information

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts MSc Computer Games and Entertainment Maths & Graphics II 2013 Lecturer(s): FFL (with Gareth Edwards) Fractal Terrain Based on

More information

Solid Modeling. Thomas Funkhouser Princeton University C0S 426, Fall Represent solid interiors of objects

Solid 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 information

Photon Mapping. Kadi Bouatouch IRISA

Photon Mapping. Kadi Bouatouch IRISA Kadi Bouatouch IRISA Email: kadi@irisa.fr 1 Photon emission and transport 2 Photon caching 3 Spatial data structure for fast access 4 Radiance estimation 5 Kd-tree Balanced Binary Tree When a splitting

More information

Ray Intersection Acceleration

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 information

Accelerated Raytracing

Accelerated 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 information

CMSC 754 Computational Geometry 1

CMSC 754 Computational Geometry 1 CMSC 754 Computational Geometry 1 David M. Mount Department of Computer Science University of Maryland Fall 2005 1 Copyright, David M. Mount, 2005, Dept. of Computer Science, University of Maryland, College

More information

Ray Tracing III. Wen-Chieh (Steve) Lin National Chiao-Tung University

Ray 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 information

MODELING AND HIERARCHY

MODELING AND HIERARCHY MODELING AND HIERARCHY Introduction Models are abstractions of the world both of the real world in which we live and of virtual worlds that we create with computers. We are all familiar with mathematical

More information

Speeding up your game

Speeding 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 information

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Last 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 information

CS535 Fall Department of Computer Science Purdue University

CS535 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 information

Drawing the Visible Objects

Drawing the Visible Objects Drawing the Visible Objects We want to generate the image that the eye would see, given the objects in our space How do we draw the correct object at each pixel, given that some objects may obscure others

More information

Sung-Eui Yoon ( 윤성의 )

Sung-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 information

Visibility Map for Global Illumination in Point Clouds

Visibility Map for Global Illumination in Point Clouds Visibility Map for Global Illumination in Point Clouds R. Goradia 1 A. Kanakanti 1 S. Chandran 1 A. Datta 2 1 Indian Institute of Technology, Bombay Mumbai, India {rhushabh, kanil, sharat}@cse.iitb.ac.in

More information

Spatial 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 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 information

Multidimensional Indexes [14]

Multidimensional Indexes [14] CMSC 661, Principles of Database Systems Multidimensional Indexes [14] Dr. Kalpakis http://www.csee.umbc.edu/~kalpakis/courses/661 Motivation Examined indexes when search keys are in 1-D space Many interesting

More information

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz Computing Visibility BSP Trees Ray Casting Depth Buffering Quiz Power of Plane Equations We ve gotten a lot of mileage out of one simple equation. Basis for D outcode-clipping Basis for plane-at-a-time

More information

Computer 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) 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 information

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Scene 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 information

Trees. CSE 373 Data Structures

Trees. CSE 373 Data Structures Trees CSE 373 Data Structures Readings Reading Chapter 7 Trees 2 Why Do We Need Trees? Lists, Stacks, and Queues are linear relationships Information often contains hierarchical relationships File directories

More information

Today. 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: 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 information

COMP 175: Computer Graphics April 11, 2018

COMP 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 information

CS 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 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 information

Advanced Ray Tracing

Advanced 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 information

CSE 554 Lecture 5: Contouring (faster)

CSE 554 Lecture 5: Contouring (faster) CSE 554 Lecture 5: Contouring (faster) Fall 2016 CSE554 Contouring II Slide 1 Review Iso-contours Points where a function evaluates to be a given value (iso-value) Smooth thresholded boundaries Contouring

More information

improving raytracing speed

improving 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 information

More Hidden Surface Removal

More 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 information

Spatial Data Structures and Acceleration Algorithms

Spatial 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 information

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer wimmer@cg.tuwien.ac.at Visibility Overview Basics about visibility Basics about occlusion culling View-frustum culling / backface culling Occlusion

More information

Computer Graphics. - Spatial Index Structures - Philipp Slusallek

Computer 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 information

Simulation in Computer Graphics Space Subdivision. Matthias Teschner

Simulation in Computer Graphics Space Subdivision. Matthias Teschner Simulation in Computer Graphics Space Subdivision Matthias Teschner Outline Introduction Uniform grid Octree and k-d tree BSP tree University of Freiburg Computer Science Department 2 Model Partitioning

More information

Real-Time Voxelization for Global Illumination

Real-Time Voxelization for Global Illumination Lecture 26: Real-Time Voxelization for Global Illumination Visual Computing Systems Voxelization to regular grid Input: scene triangles Output: surface information at each voxel in 3D grid - Simple case:

More information

Ray Tracing: Intersection

Ray 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 information

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura Computer Graphics Lecture 9 Hidden Surface Removal Taku Komura 1 Why Hidden Surface Removal? A correct rendering requires correct visibility calculations When multiple opaque polygons cover the same screen

More information

Chapter 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. 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 information

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

CS580: 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 information

CS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions.

CS251-SE1. Midterm 2. Tuesday 11/1 8:00pm 9:00pm. There are 16 multiple-choice questions and 6 essay questions. CS251-SE1 Midterm 2 Tuesday 11/1 8:00pm 9:00pm There are 16 multiple-choice questions and 6 essay questions. Answer the multiple choice questions on your bubble sheet. Answer the essay questions in the

More information

Collision Detection based on Spatial Partitioning

Collision Detection based on Spatial Partitioning Simulation in Computer Graphics Collision Detection based on Spatial Partitioning Matthias Teschner Computer Science Department University of Freiburg Outline introduction uniform grid Octree and k-d tree

More information

Ray-tracing Acceleration. Acceleration Data Structures for Ray Tracing. Shadows. Shadows & Light Sources. Antialiasing Supersampling.

Ray-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 information

Topics. Ray Tracing II. Intersecting transformed objects. Transforming objects

Topics. 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 information

VIII. Visibility algorithms (II)

VIII. 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 information

Anti-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 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 information

Speeding Up Ray Tracing. Optimisations. Ray Tracing Acceleration

Speeding 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 information

Hidden surface removal. Computer Graphics

Hidden surface removal. Computer Graphics Lecture Hidden Surface Removal and Rasterization Taku Komura Hidden surface removal Drawing polygonal faces on screen consumes CPU cycles Illumination We cannot see every surface in scene We don t want

More information

Geometric data structures:

Geometric data structures: Geometric data structures: Machine Learning for Big Data CSE547/STAT548, University of Washington Sham Kakade Sham Kakade 2017 1 Announcements: HW3 posted Today: Review: LSH for Euclidean distance Other

More information

CS 352: Computer Graphics. Hierarchical Graphics, Modeling, And Animation

CS 352: Computer Graphics. Hierarchical Graphics, Modeling, And Animation CS 352: Computer Graphics Hierarchical Graphics, Modeling, And Animation Chapter 9-2 Overview Modeling Animation Data structures for interactive graphics CSG-tree BSP-tree Quadtrees and Octrees Visibility

More information

Hidden Surface Elimination: BSP trees

Hidden 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 information

Accelerating Geometric Queries. Computer Graphics CMU /15-662, Fall 2016

Accelerating 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 information

Topics. Ray Tracing II. Transforming objects. Intersecting transformed objects

Topics. 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 information

Comparison of hierarchies for occlusion culling based on occlusion queries

Comparison of hierarchies for occlusion culling based on occlusion queries Comparison of hierarchies for occlusion culling based on occlusion queries V.I. Gonakhchyan pusheax@ispras.ru Ivannikov Institute for System Programming of the RAS, Moscow, Russia Efficient interactive

More information

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Page 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 information

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Acceleration. Welcome!

INFOGR 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 information

Row Tracing with Hierarchical Occlusion Maps

Row Tracing with Hierarchical Occlusion Maps Row Tracing with Hierarchical Occlusion Maps Ravi P. Kammaje, Benjamin Mora August 9, 2008 Page 2 Row Tracing with Hierarchical Occlusion Maps Outline August 9, 2008 Introduction Related Work Row Tracing

More information

Data Structures and Algorithms

Data Structures and Algorithms Data Structures and Algorithms CS245-2008S-19 B-Trees David Galles Department of Computer Science University of San Francisco 19-0: Indexing Operations: Add an element Remove an element Find an element,

More information

CSE 214 Computer Science II Introduction to Tree

CSE 214 Computer Science II Introduction to Tree CSE 214 Computer Science II Introduction to Tree Fall 2017 Stony Brook University Instructor: Shebuti Rayana shebuti.rayana@stonybrook.edu http://www3.cs.stonybrook.edu/~cse214/sec02/ Tree Tree is a non-linear

More information

Recall: Inside Triangle Test

Recall: 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 information

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

Ray 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

Spatial Data Structures. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Spatial 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 information

Hello, Thanks for the introduction

Hello, Thanks for the introduction Hello, Thanks for the introduction 1 In this paper we suggest an efficient data-structure for precomputed shadows from point light or directional light-sources. Because, in fact, after more than four decades

More information

Data Mining and Machine Learning: Techniques and Algorithms

Data Mining and Machine Learning: Techniques and Algorithms Instance based classification Data Mining and Machine Learning: Techniques and Algorithms Eneldo Loza Mencía eneldo@ke.tu-darmstadt.de Knowledge Engineering Group, TU Darmstadt International Week 2019,

More information

CS301 - Data Structures Glossary By

CS301 - Data Structures Glossary By CS301 - Data Structures Glossary By Abstract Data Type : A set of data values and associated operations that are precisely specified independent of any particular implementation. Also known as ADT Algorithm

More information

CEng 477 Introduction to Computer Graphics Fall 2007

CEng 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

11 - Spatial Data Structures

11 - 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 information

Space-based Partitioning Data Structures and their Algorithms. Jon Leonard

Space-based Partitioning Data Structures and their Algorithms. Jon Leonard Space-based Partitioning Data Structures and their Algorithms Jon Leonard Purpose Space-based Partitioning Data Structures are an efficient way of organizing data that lies in an n-dimensional space 2D,

More information

Jingyi Yu CISC 849. Department of Computer and Information Science

Jingyi Yu CISC 849. Department of Computer and Information Science Digital Photography and Videos Jingyi Yu CISC 849 Light Fields, Lumigraph, and Image-based Rendering Pinhole Camera A camera captures a set of rays A pinhole camera captures a set of rays passing through

More information

Friday Four Square! 4:15PM, Outside Gates

Friday Four Square! 4:15PM, Outside Gates Binary Search Trees Friday Four Square! 4:15PM, Outside Gates Implementing Set On Monday and Wednesday, we saw how to implement the Map and Lexicon, respectively. Let's now turn our attention to the Set.

More information

1 The range query problem

1 The range query problem CS268: Geometric Algorithms Handout #12 Design and Analysis Original Handout #12 Stanford University Thursday, 19 May 1994 Original Lecture #12: Thursday, May 19, 1994 Topics: Range Searching with Partition

More information

Acceleration Data Structures for Ray Tracing

Acceleration 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 information

Warped parallel nearest neighbor searches using kd-trees

Warped parallel nearest neighbor searches using kd-trees Warped parallel nearest neighbor searches using kd-trees Roman Sokolov, Andrei Tchouprakov D4D Technologies Kd-trees Binary space partitioning tree Used for nearest-neighbor search, range search Application:

More information

Ray Tracing Acceleration. CS 4620 Lecture 20

Ray 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 information

Accelerated Ambient Occlusion Using Spatial Subdivision Structures

Accelerated Ambient Occlusion Using Spatial Subdivision Structures Abstract Ambient Occlusion is a relatively new method that gives global illumination like results. This paper presents a method to accelerate ambient occlusion using the form factor method in Bunnel [2005]

More information

An improvement in the build algorithm for Kd-trees using mathematical mean

An improvement in the build algorithm for Kd-trees using mathematical mean An improvement in the build algorithm for Kd-trees using mathematical mean Priyank Trivedi, Abhinandan Patni, Zeon Trevor Fernando and Tejaswi Agarwal School of Computing Sciences and Engineering, VIT

More information

Lecture 2 - Acceleration Structures

Lecture 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 information

Visibility and Occlusion Culling

Visibility and Occlusion Culling Visibility and Occlusion Culling CS535 Fall 2014 Daniel G. Aliaga Department of Computer Science Purdue University [some slides based on those of Benjamin Mora] Why? To avoid processing geometry that does

More information

CPSC / Sonny Chan - University of Calgary. Collision Detection II

CPSC / 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 information

Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b

Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b Advanced Algorithm Design and Analysis (Lecture 12) SW5 fall 2005 Simonas Šaltenis E1-215b simas@cs.aau.dk Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees

More information

Lecture 24: Image Retrieval: Part II. Visual Computing Systems CMU , Fall 2013

Lecture 24: Image Retrieval: Part II. Visual Computing Systems CMU , Fall 2013 Lecture 24: Image Retrieval: Part II Visual Computing Systems Review: K-D tree Spatial partitioning hierarchy K = dimensionality of space (below: K = 2) 3 2 1 3 3 4 2 Counts of points in leaf nodes Nearest

More information

Graphics 2009/2010, period 1. Lecture 8: ray tracing

Graphics 2009/2010, period 1. Lecture 8: ray tracing Graphics 2009/2010, period 1 Lecture 8 Ray tracing Original plan Finish the basic stuff (book ch 1-9) today: We will not look into signal processing (chapter 4) We will look at triangle rasterization (cf.

More information

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations

Geometric Algorithms. Geometric search: overview. 1D Range Search. 1D Range Search Implementations Geometric search: overview Geometric Algorithms Types of data:, lines, planes, polygons, circles,... This lecture: sets of N objects. Range searching Quadtrees, 2D trees, kd trees Intersections of geometric

More information

A Model to Evaluate Ray Tracing Hierarchies

A 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 information

Terrain Rendering Research for Games. Jonathan Blow Bolt Action Software

Terrain Rendering Research for Games. Jonathan Blow Bolt Action Software Terrain Rendering Research for Games Jonathan Blow Bolt Action Software jon@bolt-action.com Lecture Agenda Introduction to the problem Survey of established algorithms Problems with established algorithms

More information

Ray Tracing with Spatial Hierarchies. Jeff Mahovsky & Brian Wyvill CSC 305

Ray 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 information