Git Product home page Git Product logo

Comments (1)

fangq avatar fangq commented on July 27, 2024

We have identified that this abnormal distribution was introduced in this commit (198cd34) on Aug. 3, 2023. All releases since then, including v2023 and v2024.2 contains this defect

specifically, this behavior was caused by this single line of code change

198cd34#diff-a7174ac70bbab6b4d406c2a4ee9adc2c277c27d91c5eb874537219ea62145ddaL1015-R1016

-   if (p->w >= 0.f) {
+   if (fabsf(p->w) > 0.f) {

what happened was that the above commit excludes photon-packets that had numerically dropped its weight to 0 after many many scattering/long paths. In the above sample code, there are about 82 photons out of 3811706 detected photons were excluded. Because of this truncation, somehow the distribution became skewed - it is interesting to plot the nscat histogram in log-y scale, and this shows strange histogram structures, see

image

despite that this looks strikingly incorrect, in practice, I do not believe this is a big issue (as long as the data are properly analyzed).

First of all, the affected photon packets are small - they are extremely long path photons and float32 weight drops to numerical zero after over 20000 times of scattering calculations;

secondly, when a user analyze such long path or large-scattering-count photons, they should use the corresponding weight to properly weight the contribution; because these packets have nearly zero weight, they literally do not contribute to any of the statistical quantities.

regardless, reverting this line back to >= 0.f fixed the strange nscat distribution shape.

after fix, now it looks like this (in log-y scale)

image

from mcx.

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.