tonag
New Member
Posts: 8
|
Post by tonag on Sept 29, 2021 14:36:34 GMT
Hi! I have just finished the first part of the bonus chapter about bounding boxes. And even though I still can render the teepot correctly the render is WAY slower. At best, atleast about 5 times slower compared to if I just am using groups without the bounding boxes implementation. So obviously I have done something wrong, but I'm having problem finding what. Have anyone had simular trouble with bounding boxes? If you need to see some code just tell me
|
|
tmb
New Member
Posts: 2
|
Post by tmb on Sept 29, 2021 20:13:01 GMT
It helps to run a profiler. However it is likely you ran into the same problem as me (and others: forum.raytracerchallenge.com/thread/209/speedup-bounding-boxes-bvh), and that is that the 'parent_space_bounds_of' function is called on each intersection with a group, which is a very costly operation. The problem is solved by pre-computing the bounds since they shouldn't change when you start rendering.
|
|
tonag
New Member
Posts: 8
|
Post by tonag on Oct 4, 2021 13:22:43 GMT
It helps to run a profiler. However it is likely you ran into the same problem as me (and others: forum.raytracerchallenge.com/thread/209/speedup-bounding-boxes-bvh), and that is that the 'parent_space_bounds_of' function is called on each intersection with a group, which is a very costly operation. The problem is solved by pre-computing the bounds since they shouldn't change when you start rendering. Sorry I thorgot to answer! Thank you so much this solved my problem!
|
|