Lecture 10: Ray Tracing (65)
evan1997123

I don't get what's the point of finding out the t_split. What's the point of getting t_split and what good does it do to give us if it's less than, greater than, or in between certain aspects?

elizabethyli

I think calculating t_split helps with deciding which part of the tree to traverse next. Based on the value of t_split in relation to t_max and t_min, you know if the left or right children subtrees (or both) need to be traversed to check for intersections. Starting with the left-most diagram, this shows the case that t_split > t_max, t_min. Here, there's no chance that the ray will intersect with any object in the right subtree, since it'll be outside of the bounding box by the time it hits the split line. Then, you know you only need to traverse the left subtree for any potential intersections. In the middle case, t_min < t_split < t_max, so the ray intersects both bounding boxes and both subtrees need to be traversed.

borongzhang

Thank you, Li!

You must be enrolled in the course to comment