Previous | Next --- Slide 25 of 65
Back to Lecture Thumbnails
et17

Why is the bounding volume hierarchy created before find_closest_hit is called? Why not just construct the BVH and only add leaves if you need them ?

tbell

@et17 The BVH is an acceleration data structure that allows us to make more efficient queries after we’ve created it, just like sorting an array allows us to find element faster. You are correct in noting that creating the BVH in the first place (like sorting the array) is itself a slower operation than simply solving whatever single query you may be interested in at the moment. But this overhead pays off in the long run.