Coder Social home page Coder Social logo

Comments (5)

madmann91 avatar madmann91 commented on May 18, 2024

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 x86intrin.h)?

_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?
Edit: Nevermind, I think I managed to reproduce that bug with an orthographic camera on one of my test scenes.

from bvh.

madmann91 avatar madmann91 commented on May 18, 2024

I'm working on a fix. It seems that bvh::RobustNodeIntersector is not affected by the issue. You can try using that in the mean time. To do that, create the single ray traverser with that as a template parameter:

bvh::SingleRayTraverser<Bvh, 64, bvh::RobustNodeIntersector<Bvh>>

from bvh.

madmann91 avatar madmann91 commented on May 18, 2024

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 bvh::FastNodeIntersector is anyway an intersector that loses precision for ray directions that are close to zero. That should not be a problem in most use cases, but you may want to switch to the robust intersector when you observe artefacts due to the ray missing the geometry. Could you please check that the issue is fixed on your end as well?

from bvh.

stephomi avatar stephomi commented on May 18, 2024

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).

from bvh.

madmann91 avatar madmann91 commented on May 18, 2024

Alright, then I'm closing this.

from bvh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.