You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 9: Raytracing (64)
avinashnandakumar

I'm a little confused on what this slide is saying. Are we only supposed to check both children of the boundary box if t_min and t_max both intersect with both children bounding boxes respectively? I thought if a ray has any intersection with a bounding box we have to recursively call intersection on the children bounding boxes regardless of where the hits occurred?

jenzou

To avinashnandakumar: You're right -- we only call intersect on both children if tmint_{min} and tmaxt_{max} both intersect with both children. We don't recursively call intersection on both children in the other two cases because it's unnecessary; the ray doesn't intersect one of the children. If we called intersect on all children, this would be the same as calling intersect on every node, which doesn't optimize at all. We can rule out nodes we don't need to call intersect on by checking the positions of tmint_{min} and tmaxt_{max} in comparison to tsplitt_{split}.

You must be enrolled in the course to comment