An other BVH optimization ... the Biggies back

(L) [2007/10/02] [Shadow007] [An other BVH optimization ... the Biggies] Wayback!

Finally having had some time to test an idea I had, it seems it was perhaps good enough for me to talk about it...

Basically it's just an addition to the classic SAH/BVH construction :

In addition to the 3 axis centroid position sweep, I add (they could be embedded in the former) an extent sweep.


For the axis, I can also choose to split given the primitives extent on that axis. If it's less than a found threshold, the prim is added to the left, else it's added to the right.

The


I've used Phantom's BVH base application and just added the following criteria :

For a Node, I get the maximum/minimum sizes of the primitives on each axis.

I then compute for a few "splitpos" the number of prims that are les/more than the splitpos, and compute as usual the left/right bounding boxes.

I can then compute the SA cost for that given partition.

If it's better than the previous value, that partitioning is used.


I named my "variant" the Biggies



METHODOLOGY ALERT

I used the arauna_bvh_src_august_16 package as a codebase, to which I substracted everything directX related.

I have only limited understanding of most of it, so I may have missed quite a lot of subtle (or not) points

I don't have any decent compiler (only MSVC 2003 (7.1))

I only used the Sponza scene

I only measured at the starting position/orientation ... (although the results were overall coherent using the "spline mode").


The test concerns only the rendering performance. The contruction time was considered secondary, but it should be quite straightforward to add the biggies in a performant fashion.



The results are as folows :

Without "Biggies" : 140 ms / frame

With "Biggies" : 130ms / frame


The additions are as follows :
(L) [2007/10/02] [Phantom] [An other BVH optimization ... the Biggies] Wayback!

My BVH code changed too much to simply paste your code in place. Can you send me the full files?
_________________
--------------------------------------------------------------

Whatever
(L) [2007/10/02] [Shadow007] [An other BVH optimization ... the Biggies] Wayback!

Will do [SMILEY Smile]
(L) [2007/10/03] [Shadow007] [An other BVH optimization ... the Biggies] Wayback!

I have sent the modified source package here :


[LINK http://www.zshare.net/download/398694244491f9/ savarauna_bvh_src_august16thmodifshadow007.rar - 2.06MB]

for the other assets (meshes/textures) please refer to the original arauna_bvh_src package.


Note: the biggies use can be activated/desactivated in the scene.txt file.
(L) [2007/10/04] [Phantom] [An other BVH optimization ... the Biggies] Wayback!

It helps, but splitting large triangles before building the BVH is even faster. Your approach does of course prevent the creation of extra triangles.
_________________
--------------------------------------------------------------

Whatever
(L) [2007/10/05] [Shadow007] [An other BVH optimization ... the Biggies] Wayback!

I didn't test with pre-splitting the triangles.

But for the pre-splitting, how do you choose the max area above which to split ?
(L) [2007/10/05] [Phantom] [An other BVH optimization ... the Biggies] Wayback!

I check the surface area of the bounding box of a triangle. If it exceeds a certain value, I split. This is a recursive process. Theoretically, one would expect that a more logical criterium is the ratio between bbox surface area and triangle area, but I couldn't get any improvement from this.
_________________
--------------------------------------------------------------

Whatever

back