alecjacobson/computer-graphics-bounding-volume-hierarchy

How fast is fast enough?

Opened this issue · 2 comments

Hello again.

I've set up the AABB tree structure but my build and quarry times are different than the example posted on the assignment page. My tree builds faster but querying takes longer. I'm using the DFS approach as was suggested to me in my previous post regarding the AABB tree.

Are the times that I'm getting fast enough or should I be trying to make a more balanced tree?

image

Don't worry about exact times, since they're highly sensitive to factors out of your control like your OS's scheduler. The main purpose is that your tree queries should be an order of magnitude faster than your brute force queries, which they are. Also, the effect becomes more pronounced on larger meshes (O(log n) vs O(n) growth), so try larger meshes and observe the growth over time of your BVH queries relative to your brute force queries.

Thank you for replying so quickly!