Closed germolinal closed 3 months ago
PD: I asked Greg Ward—developer of Radiance—and he told me to check my sampling and pdf values for checking the Montecarlo integration. I integrated a hemisphere of value 1, and found the expected answer of Pi
; and by integrating a unit overcast sky (i.e., L=(1. + 2. * cos(theta))/3
) gives me the expected Pi * 7/9
. I guess the error must come from elsewhere.
I'll keep digging!
All right. I have solved this issue. As it happens, my implementation was correct apparently, but some of the Radiance parameters I was using prevented it from accounting for the last bunch of—low-energy—bounces. This was particularly noticeable in one of my scenes, which had a 90% reflective surface (to take into account these things)... I guess there is a lot of value in my new implementation, based on your work: it has less and more predictable parameters.
Hello, first of all, thanks very much for this project. I am developing a ray-tracer in Rust, as a component of a larger whole-building simulation project and it would have been impossible without this.
I have been trying to compare some results of my tool with those of Radiance (i.e., the highly validated lighting simulation tool, considered the gold standard for building simulation). I have not been able to do it, and I wonder why. (I am also asking this same question on the Radiance side of things... I might be able to post the solution when I have one)
I am following the PBRT book guidelines. For now, I am using the Simple Path Tracer. Also, in order to debug the integration algorithm, for now, I am working only with diffuse materials. I am also not implementing Russian roulette or any other smarter algorithms to accelerate the calculations.
You can see the core of my integration algorithm HERE.
The results are a perfect match for direct lighting, but not for global illumination. (see the results in the two scenes below).
In global illumination, the throughput of my rays decays much more slowly than Radiance's (beta is
1/rho^n
, wheren
is the bounce, starting at 0).However, when I hack the algorithm, dividing the sampled BSDF value by 1.07, the results seem to match again. I feel like I have seen the 1.07 value before... it is unrelated to the reflectance of the materials, as there are two scenes, both using Plastic and Metal with no specularity or roughness; but with different colours (0.9 grey, and 0.5 grey).
Is there anything you can spot that might be creating this bias? Considering that the direct calculation is correct. I would really appreciate your help.