Is there an example or tutorial for building a two level hierarchy explicitly for user defined-geometry?
So, I want to create some custom geometry and build a BVH explicitly for the bottom level.
And then another BVH over all these primitives.
Not directly, but there is the instanced_geometry tutorial which demonstrates instancing of triangles meshes, and the user_geometry tutorial which demonstrates a sphere implementation with user geometries. This sphere is also instanced, but this is implemented again using user geometries. Taking the user geometry sphere implementation from the user_geometry tutorial and putting this as instanced geometry inside the instanced_geometry tutorial is what you are looking for.