BVH construction strategy

Hi, I know this isn’t really the perfect place for such a question but it seems like the place with the most relevant experience.

I have come here to ask about how Cycles does BVH construction and to see whether I can get pointers to files of interest and/or resources that were used as reference during the making of the BVH construction code.

I’m building a hobby render engine and am having a hard time finding good resources on this topic, especially regarding AABB BVH for complex scenes.

Questions I have are things like: are all triangles treated equally (are triangles from separate objects potentially grouped together, or does separation happen at the object level first, then further subdivision happens within each object)? Does construction happen from the ‘top down’ with one big box that then (using some yet unknown strategy) determines a suitable place to put its children, or does it happen from the bottom up where triangles are grouped, then clusters are made from those groups etc, up to the scene level?

Cycles BVH implementation info is here:
https://wiki.blender.org/wiki/Source/Render/Cycles/BVH

1 Like

Thanks for that @brecht, I wasn’t aware of those docs. I’ll take a read.