Here are a little more details, so that we can try to make everything clear...
I'm using path tracing integrator, on a very simple scene :
I'm looking at a matte plane at normal incidence with a perspective camera.
I attached my input files... I have two lightgroups : lightGroupCount=0 will be the gaussian spot light, lightGroupCount=1 the sunsky lightgroup.
I modified path.cpp in order to extract the computed values for L[1] here in the code :
path.cpp (lines 186-193)
- Code: Select all
nrContribs += hints.SampleLights(scene, sample, p, n, wo, bsdf, pathLength, pathThroughput, Ld, &Vd);
for (u_int i = 0; i < lightGroupCount; ++i) {
L[i] += Ld[i];
V[i] += Vd[i] * VContrib;
}
// My edit
sunContribution = L[1];
ofstream outfile;
outfile.open("sun_data.txt",ios_base::app);
outfile << L[1] << endl;
outfile.close();
// end
And here is the result : the average value of L[i] for the sunsky lightgroup grows linearly with the world radius...
I don't undrestand :
- why it grows
- why it grows
linearly, all dependencies to the variable worldRadius are squared in the code you just sent me...
Thanks a lot for helping me understand !
Thomas