Previous | Next --- Slide 41 of 50
Back to Lecture Thumbnails
allai5

For real-time renderers, how is the selection of spatial acceleration structures implemented (is the optimal structure selected every couple frames, etc.)? And what is the cost of switching between different structures if the scene geometry drastically changes from highly uniform to highly non-uniform geometric detail in a very short amount of time?

justaddwater

Similar question to the previous comment, how would we know whether mix-matching data structures (having uniform node inside a bvh,..) or to use spatial vs BVH? The naive way would be to use all of these different combinations and compare them but the cost would increase?

siqiwan2

It says primitives partitioning works well when primitives change position. But suppose in a highly dynamic scene, if we use BVH and keep growing the bounding box, it will make every bounding box very big and interact with each other, so there is no acceleration. I guess to some point, we need to partly or totally reconstruct the BVH. But cost of construct it so high.

JimL

@siqi I think there are some reasons supporting that primitives partitioning works well when primitives change position compare to spatial partitioning. We can build sub BVH for meshes in their model spaces. The sub BVH will not change if one mesh moves as a whole. Therefore, compare to spatial partitioning, we will only need to update their outer AABB to determine whether the ray hits the mesh or not. But still, for the outer BVH(outer AABBs) in the scene, as @siqiwan2 states, we need to partly or totally reconstruct the outer BVH.

Max

@allai5 @siqiwan2 at least until recently, none of these structures were really suitable for rendering dynamic objects in real-time: either the cost of rebuilding the structure or the loss of acceleration due to expanding bounding boxes was too much, especially considering the non-local memory access patterns inherent to tree structures. However, uniform grids are certainly used in some cases (e.g. tiled forward/deferred rendering, where lights are binned into parts of the view frustum), and the new RTX vulkan extension/DXR provide facilities to build a BVH on the GPU that's fast enough to update every frame.

@justaddwater This is more of an art than a science; it really just depends on what kind of scene you are optimizing for and is likely chosen by someone instead of determined algorithmically.

@JimL yeah, this is a very useful technique when you know that some subset of the BVH does not move relative to itself. In code, you could just represent it as one 'scene object' that is itself a BVH in model space, and then when a ray intersects its global AABB you transform the ray into model space before proceeding.