Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TODO] Implement spatial split BVH builder #15

Open
syoyo opened this issue Sep 7, 2017 · 8 comments
Open

[TODO] Implement spatial split BVH builder #15

syoyo opened this issue Sep 7, 2017 · 8 comments

Comments

@syoyo
Copy link
Contributor

syoyo commented Sep 7, 2017

No description provided.

@syoyo
Copy link
Contributor Author

syoyo commented Sep 7, 2017

Partial implementation is done in sbvh branch : https://github.com/lighttransport/nanort/tree/sbvh

@ghost
Copy link

ghost commented Apr 9, 2020

Would an LBVH algorithm count as a spatial split BVH? I have an existing LBVH header only library that builds Sponza in parallel in about 25 ms, under the MIT license. You could use that, if you'd like. It's based on this paper. Even though it has a linear structure though, I'd hesitate to call it GPU friendly, even though it's not recursive, since it requires interleaving integer and floating point types.

There's also this header only BVH library, which provides high quality BVHs with SAH and builds them in parallel as well. On my laptop, which has four logical cores, it builds Sponza in about 133ms. With eight logical cores, that time goes down to about 70ms. The author is also very knowledgeable about BVHs in general. I think the 18ms build time he mentions on the page is from a pretty decent processor. The numbers I gave are from a pretty low end laptop.

@syoyo
Copy link
Contributor Author

syoyo commented Apr 10, 2020

Would an LBVH algorithm count as a spatial split BVH?

No. LBVH does not consider spatial splitting. I have also implemented LBVH in another project(and it also does not consider spatial splitting)
https://github.com/avr-aics-riken/SURFACE/blob/master/render/render_prefix_tree_util.h

As you may know, spatial splitting requires PrimRef data structure(indirect access to primitive).

There's also this header only BVH library, which provides high quality BVHs with SAH and builds them in parallel as well

this BVH library looks nice, but it also does not implement spatial split BVH.

@ghost
Copy link

ghost commented Apr 10, 2020

Hey! I'm terrible sorry! It's probably obvious at this point that I didn't know exactly what spatial splitting was when I wrote that comment. My bad!

@cesss
Copy link

cesss commented Nov 20, 2020

this BVH library looks nice, but it also does not implement spatial split BVH.

It seems they did implement SBVH now! (actually, the commit seems to be from April 17). However, if you look at the performance comparison chart, you'll see that SBVH is not substantially faster than other algorithms they provide...

@syoyo
Copy link
Contributor Author

syoyo commented Nov 22, 2020

@cess Oh nice! > It seems they did implement SBVH now!

@cesss
Copy link

cesss commented Nov 22, 2020

@cess Oh nice! > It seems they did implement SBVH now!

Yes, but I encourage you to improve nanort anyway, because that other BVH library is very demanding in terms of C++ version (it requires C++17, and I prefer to have the freedom of not being tied to too new C++ versions --in fact I decided to move from C++ to C for my main work, because I like C more... I'm wrapping the BVH library for the moment, with a C layer on top of it)

@syoyo
Copy link
Contributor Author

syoyo commented Nov 22, 2020

@cess Yes, we plan to cleanup NanoRT code but it still stick with C++11(e.g. more modern use of C++11 templates, better Python integration with pybind11). After of it we may consider backport madmann91/bvh to nanort(still NanoRT uses C++11). Fortunately the code of madmann91/bvh is rather simple and easy to tweak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants