Sunlight and WorldRadius

Please use this forum for general user support and related questions.

Moderator: coordinators

Forum rules
Please include your operating system type/version, LuxRender version and Exporter version used when submitting a support post.

Make sure you have read the Release forum thread for Release and RC (Release Candidates) builds as these threads contain information on known problems and workarounds: Test Builds Forum

Sunlight and WorldRadius

Postby ThomasR » Wed Mar 21, 2012 3:17 am

Hello,

I'm using the sun and sky lights, and it appears that their radiance is growing proportionnaly to the world radius.

I don't understand the reason of that, why would the sun radiance double if the world radius doubles ???

Is this effect normal ? physically argumented ?

Thnaks for helping...
Thomas
ThomasR
 
Posts: 24
Joined: Wed Apr 20, 2011 2:03 am

Re: Sunlight and WorldRadius

Postby Dade » Wed Mar 21, 2012 3:29 am

ThomasR wrote:I don't understand the reason of that, why would the sun radiance double if the world radius doubles ???


World bounding sphere is used in the computation of infinite light sources: http://src.luxrender.net/lux/file/5eb01 ... y.cpp#l300

The idea is: a larger world requires a larger amount of radiance to keep the incoming radiance on a point constant. However, I have not understood if you have found a bug or not (i.e. the absolute incoming radiance on a point varies with the world radius).
User avatar
Dade
Developer
 
Posts: 4845
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Sunlight and WorldRadius

Postby ThomasR » Wed Mar 21, 2012 5:43 am

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
Attachments
lambertian_plane.lxs
My input. Had to merge everything so that there is only one attachment to this post.
(1.88 KiB) Downloaded 13 times
ThomasR
 
Posts: 24
Joined: Wed Apr 20, 2011 2:03 am

Re: Sunlight and WorldRadius

Postby ThomasR » Tue Apr 03, 2012 4:39 am

No news about this problem ?
ThomasR
 
Posts: 24
Joined: Wed Apr 20, 2011 2:03 am

Re: Sunlight and WorldRadius

Postby Dade » Tue Apr 03, 2012 5:02 am

ThomasR wrote:outfile << L[1] << endl;


L[1] is a SWCSpectrum, I would try to output "L[1].Y(sw)": http://src.luxrender.net/lux/file/47bb4 ... um.cpp#l32

Were you assuming L[1] was an RGB or XYZ color ?
User avatar
Dade
Developer
 
Posts: 4845
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Sunlight and WorldRadius

Postby ThomasR » Wed Apr 04, 2012 1:46 am

I knew that L[1] was a SWCSpectrum, I edited spectrum.h so that there is only one sample in the narrow spectral band I'm interested in :

Code: Select all
#define WAVELENGTH_SAMPLES 1
#define WAVELENGTH_START 549.5f
#define WAVELENGTH_END   550.5f


do you think i still need to use L[1].Y(sw) ?

Thanks again
ThomasR
 
Posts: 24
Joined: Wed Apr 20, 2011 2:03 am


Return to LuxRender User Support

Who is online

Users browsing this forum: No registered users and 5 guests