Lecture 9: Ray Tracing & Acceleration Structures (39)
jayc809

I thought this heuristic is very interesting and was trying to figure out why it is 27. I first thought of 3^3 = 27, which in 3D, could imply a 3 by 3 cube. Now if we put our object in the center cube at (1, 1, 1), we have now partitioned our space into exactly all the directions/positions a ray can hit our cube, excluding the cube our object is in of course. This extends well into more objects as it provides us a upper estimate. Suppose 2 objects happen to be as far away as possible from each other, we can then do the same partitioning and get 54 non-overlapping cubes. Suppose they happen to be next to each other, we will lose some simplicity but still guaranteed to capture every possible ray direction and position.

pranavkolluri

I was wondering if wone could size the grid by taking the size of the smallest object and then scaling the grid square to hit that. In this scenario, I think that would work, but I guess there may be issues if you have a seen with many small elements (say, grass)?

MillerHollinger

@pranavkolluri I think an approach like that could work, but you'd have to do some kind of averaging or weighting of objects, I'd think. I'd have to imagine that just using the smallest object could cause issues in scenes with greatly varied geometry scale. Like, imagine rendering a city scene, and there's a set of keys on a bench -- the keys are a millionth the size of the building, and so if that became the grid size, it'd slow down processing. I think the spatial hierarchy model could help with this issue.

You must be enrolled in the course to comment