Lecture 9: Ray Tracing & Acceleration Structures (30)
rcorona

I was a little confused as to why this approach was preferable over computing the intersection with the six faces.

As I understand it, using the slab intersection method still requires computing 6 intersections.

Is the benefit that using the slab representation to compute intersections is simpler than faces because the slabs are unbounded planes?

oligonagon

I think maybe it's just a better way to organize the information; if the differences of the intersections between all 3 slabs are all equal to 0, then we know that the ray misses the box (someone correct me if I'm wrong though). I was also confused on this so any more explanation would be greatly appreciated.

I also have another question pertaining to this slide. tmin < 0 for the second image. Is there a consequence/side effect/special property about this case, or is it just a special edge case we would need to consider when using the slab intersection method?

joyjwlee

To address the questions above, I think we split the rectangle into slabs in order to simplify the calculations. By splitting it into 3 slabs, we are able to repeat the same process (in our case calculating the min and max) along each axis and then take the intersection of the intervals. I think from a conceptual and implementation standpoint, it's a very simple yet effective way to calculate the ray intersection of a box.

As for the second one, I think tmin<0 is a consequence of the box's location. If we were to have a ray inside the box, I'd figure that the ray intersects the box once rather than twice, if that makes sense. If someone on staff can add more clarification, that'd be helpful!

Zackoon

I'm a little confused about why (for the 2D case) we need to take the intersection of the intervals for each slab? I thought we would know the intersection result just from keeping track of where the box and ray intersect, then connecting those two dots, giving the same result.

Hamme122

To address the questions above,i think maybe this process is before "keeping track of where the box and ray intersect".We need this process to know where the ray intersect with the slab.

Zzz212zzZ

The idea is amazing that it shrinks the range of t with 3 slabs, and as long as the it exists, there must be an intersection between the ray and the bbox.

angelinelykk

To elaborate upon this slide of the 2D example, we have slabs in the x (bounded by x0 and x2) and y directions (bounded by y0 and y1). To ensure that they intersect, we need the maximum of all tmin to be smaller than or equal to the minimum of all tmax values. And for the maximum of all tmin values to be nonnegative. To explain this, we need there to be an overlap of the t intervals across the different axes so that's why we have the first condition. For the second condition, we want to ensure that the intersection happens after th ray origin.

You must be enrolled in the course to comment