mambastudio / RayTracing

3 stars 1 forks source link

HLBVH #1

Open jimbok8 opened 4 years ago

jimbok8 commented 4 years ago

I have seen your HLBVH code, and would just like to please ask if this is related to: "HLBVH: Hierarchical LBVH Construction for Real-Time Ray Tracing of Dynamic Geometry" by J. Pantaleoni and and D. Luebke?

Thanks Jim

mambastudio commented 1 year ago

Hi!

Sorry for my late reply. Hope it's not too late to give you a response to your question. Yes it is. It was my failed attempt to try experiment with various bvh. Later on, I decided to implement PLOC bvh with great results (unfortunately, the bvh has a high cost ray traversal). The code in this repository is just an attempt on trying to experiment with various bvh for future porting to GPU. I would recommend you to try look at another repository that is experimenting various bvh builds with great success. Here is the link.

I'll consider porting the various bvh implemented there such as the Sweeping SAH bvh which might be a good candidate for GPU porting.

Thank you.

jimbok8 commented 1 year ago

Thanks for the reply. I am not interested in ray-tracing, for me the goal is collision detection! I have been looking at various methods for creating BVH's (probably from point clouds). Your project is about the only one I can find, implementing these algorithms, written in Java! So thanks for that - it may give me a starting point to move forward - I would be keen to implement the routines in parallel using the Aparapi library.

mambastudio commented 1 year ago

Oh nice!!! Since I think you're the first person to have interest in it, I'll try to polish up some algorithms for the bvh and probably port some other codes that I've identified elsewhere on GitHub (Sweep SAH Bvh, seems like the best candidate for GPU). Also, port Irregular Grids, which I think is the best accelerator for both animation and raytracing but super hard to implement. It will be my objective to do that this year. Be checking out the repository in a few months. If you need some clarification on the code and the principles behind the implementation, don't hesitate to ask (these algorithms should be known by many, and shouldn't be technical - my aim is to make them as simple to implement as possible for easier portability to other languages). Also, check on PLOC, it's quite a very good Bvh for collision detection & animation, and very super easy to implement, and fast to build in GPU - my benchmarks were like 2 to 5 seconds GPU build, unoptimised, for complex scenes.