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

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

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).

Posts: 4796
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

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 editsunContribution = 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.
ThomasR

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

ThomasR

Posts: 24
Joined: Wed Apr 20, 2011 2:03 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 ?

Posts: 4796
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

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

### Who is online

Users browsing this forum: No registered users and 1 guest