Coder Social home page Coder Social logo

Comments (4)

wjakob avatar wjakob commented on July 30, 2024

Dear @amyspark,

we're currently 100% occupied with other research projects. It would be helpful if you could look into this yourself and post a PR to address the underlying issue.

Best,
Wenzel

from mitsuba.

amyspark avatar amyspark commented on July 30, 2024

I'm no expert, but I'll do my best.
I started by intercepting the division by zeros, which in my case were caused by the integrator attempting to calculate the incident light here:

spec *= Li(sensorRay, rRec);

When Mitsuba intersects the sampled ray with the hair, this query
RadianceQueryRecord rRec(scene, sampler);
generates an Intersection with the shading frame and UV partial position all set to zero. This is the same with any bsdf, and when it tries normalising that vector, it all fails.

from mitsuba.

amyspark avatar amyspark commented on July 30, 2024

I tried git bisecting since 1ca0413 (when you bumped Mitsuba to 0.5.0). I couldn't get Mitsuba to compile there (lots of Boost uncaught exceptions, clang complaining about libstdc++, et al) so I resorted to manually looking backwards starting from the latest commit.

Counting from today, the first working commit I could find is b8480a3. The first bad one I could find is 8365668.
git bisecting them tells me the bug was introduced by ce80ddc, which is consistent with the shading frame issue I had observed.

EDIT: I've narrowed it down to util.cpp and/or skdtree.h. The changes in hair.cpp only remove the shading frame computation.

from mitsuba.

amyspark avatar amyspark commented on July 30, 2024

I've finally found the cause of the bug. It seems that previously, Hair's shading frame was initialized to the geometry frame with no further changes:

its.shFrame = its.geoFrame;

Now, the shading frame calculation is standardized with the rest of the shapes. This was not done anywhere previously:
computeShadingFrame(its.shFrame.n, its.dpdu, its.shFrame);

EDIT: The reason why this all breaks down is because its.uv, its.dpdu and its.dpdv are never initialized at fillIntersectionRecord:
/* No UV coordinates for now */

from mitsuba.

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.