-
Notifications
You must be signed in to change notification settings - Fork 81
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
Slow performance with axis aligned ray #21
Comments
Hello, and thank you for the bug report. Are you on x86? If so, can you try adding the following code before doing anything (you need to include _mm_setcsr(_mm_getcsr() | (_MM_FLUSH_ZERO_ON | _MM_DENORMALS_ZERO_ON)); Regardless if this solves your issue or not, could you point me to more information to reproduce the bug? And maybe point me to a scene I could use to reproduce this? |
I'm working on a fix. It seems that bvh::SingleRayTraverser<Bvh, 64, bvh::RobustNodeIntersector<Bvh>> |
…false positives in the node-ray intersection function
This issue should now be fixed by 3b2f3d0 (and following bug fix 354de26). This performance problem was caused by too many false positives in the ray-node intersection during BVH traversal. The fix introduced here will just prevent the traversal from processing nodes in that case, but keep in mind that |
Yes it works! I'm using the bvh to project a mesh onto another, so the rays are generated for each vertices (the ray length are very short as the 2 meshes are somewhat identical). |
Alright, then I'm closing this. |
Great lib!
However I get very low performance when casting axis-aligned rays.
It takes 7 seconds or so, instead of ~10ms (~30k rays on a ~3M meshes, the mesh has axis aligned triangles as well).
When I add a small epsilon to the ray to make sure all components are non null, things become fast again.
I didn't dig the issue further.
I can just say there is no division by 0 here
bvh/include/bvh/triangle.hpp
Line 96 in 183da93
The text was updated successfully, but these errors were encountered: