Previous | Next --- Slide 22 of 58
Back to Lecture Thumbnails
liangcyn

I think we still need to do this in the case that the bounding boxes intersect and the closest hit would be in child2 instead?

dan

I have watched this part of the lecture multiple times and I am still confused why we would send out a ray in both directions. Don't we just want the closest intersection? What is the benefit of the ray going in the opposite direction?

azul

I agree @liangcyn. Intersecting with one bounding box first does not necessarily mean the closest hit is in that bounding box. That is why we are checking if second_child.t is less than closest.t.

ethanyanjiali

@dan In the code above, I don't see where we send out a ray in both direction. It's only checking if one bbox is closer than the other to determine the priority of traversing. I think the reason of two rays in the figure above is just to illustrate that different ray could intersect children nodes in different order, so this prioritization is important.

brocklin

Exactly this. If I recall correctly, in class we simply used the two rays in the context of showing which rays intersected which primitives and bounding boxes first in each direction.

Please log in to leave a comment.