Intensity of Sun and Sky

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: Dade, jromang, tomb, zcott, coordinators

Intensity of Sun and Sky

Postby crosley09 » Mon Feb 13, 2017 10:20 am

I've had a hunch that the sun / sky lights seemed much brighter than they should be relative to artificial light sources, but I've been unable to test my hunch until the new irradiance AOV. I was encouraged that @abhiram was experiencing a similar confusion here: viewtopic.php?f=16&t=12519&start=10#p119075

So, I have created a simple test to compare Irradiance AOV output with expected values using real world times and location information.
- first, sun angles were calculated from the NREL SPA calculator, and converted into xyz vectors : https://www.nrel.gov/midc/solpos/spa.html
- I then rendered a time lapse at 10 min intervals of a simple scene. One horizontal plane with an environment camera looking straight down.
- I averaged all of the pixels output from the irradiance AOV at each frame and saved to a .csv file.
- I found the corresponding expected values from two tools:
- Extraterrestrial Global Irradiance (pre-atmospheric distortion) from the SOLPOS tool : https://www.nrel.gov/midc/solpos/solpos.html
- Total Integral GHI from the Bird Model (using the excel download) : http://rredc.nrel.gov/solar/models/spectral/

Here are the results:
snip.JPG


I've attached the scene as well as the excel file with the results. Sorry about the odd time stamps, this data was taken in part from stuff I already had.

As you can see, there is a significant difference in the actual and expected irradiance coming out of the AOV. The sun / sky environment seems to be 1-2 orders of magnitude brighter.

I'm not sure where to go from here, or how I can be of help. I will gladly provide more data and help speculate on what may be going on...

Maybe it as simple as a bad unit conversion somewhere?
Attachments
test.zip
(13.59 KiB) Downloaded 15 times
i7 5930k, GTX 980 ti, 32 GB ddr4, 512 GB PCIe SSD...Windows 10
User avatar
crosley09
 
Posts: 199
Joined: Fri Oct 07, 2011 1:00 pm
Location: Indiana, USA

Re: Intensity of Sun and Sky

Postby Abel » Mon Feb 13, 2017 1:46 pm

crosley09 wrote:I
As you can see, there is a significant difference in the actual and expected irradiance coming out of the AOV. The sun / sky environment seems to be 1-2 orders of magnitude brighter.

Nice work! I would say that now the first question is if this is just the sun and sky, or if other light sources are also off. If other light sources are fine, that would then certainly mean that the sun/sky system needs to be checked.
User avatar
Abel
Developer
 
Posts: 1847
Joined: Sat Oct 20, 2007 8:13 am
Location: Stuttgart, Germany

Re: Intensity of Sun and Sky

Postby jeanphi » Mon Feb 13, 2017 6:16 pm

Hi,

The AOV is most probably the illuminance and not the irradiance because when Lux converts a spectrum to the XYZ colorspace, the values are multiplied by 683 to account for the fact that Y curve has a value of 1 at 555nm.
Another issue is that the current sun model is not really well calibrated. A sun model is proposed alongside the model used for sky2, but it has never been implemented, so the results are most probably off if you take the sun into account.
There might also be other elements explaining the offset.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Intensity of Sun and Sky

Postby Dade » Tue Feb 14, 2017 4:42 am

jeanphi wrote:The AOV is most probably the illuminance and not the irradiance because when Lux converts a spectrum to the XYZ colorspace, the values are multiplied by 683 to account for the fact that Y curve has a value of 1 at 555nm.


Are you mixing LuxCore and classic Lux ? LuxCore doesn't use XYZ color space at all and classic Lux hasn't AOV/etc.

Anyway Irradiance AOV is ... well ... irradiance: the radiance incoming the first eye path hit is multiplied by Abs(Dot(incoming direction , surface normal)) and divided by PI.

jeanphi wrote:Another issue is that the current sun model is not really well calibrated. A sun model is proposed alongside the model used for sky2, but it has never been implemented, so the results are most probably off if you take the sun into account.
There might also be other elements explaining the offset.


Yes, there are so many factors could be wrong (including the one in reference results). I would start with a lot simpler case like a point light where the results can be verified by hand. Or Crosley09, do you have a specific interest only in outdoor renderings ?
User avatar
Dade
Developer
 
Posts: 8318
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Intensity of Sun and Sky

Postby crosley09 » Tue Feb 14, 2017 3:21 pm

Dade wrote:Anyway Irradiance AOV is ... well ... irradiance: the radiance incoming the first eye path hit is multiplied by Abs(Dot(incoming direction , surface normal)) and divided by PI.

I'm assuming this also accounts for the color and reflective properties of the material?

Dade wrote:Yes, there are so many factors could be wrong (including the one in reference results). I would start with a lot simpler case like a point light where the results can be verified by hand. Or Crosley09, do you have a specific interest only in outdoor renderings ?


I do not currently have access to a radiometer or photometer, but I will soon. When I get it I can provide some simple tests with it as well. I chose the sun / sky model approach because I had access to the data, which I think is likely pretty accurate.

I can do a simple test with a lamp when I get the photometer to see if the main issue is with the sun/sky or something else.
i7 5930k, GTX 980 ti, 32 GB ddr4, 512 GB PCIe SSD...Windows 10
User avatar
crosley09
 
Posts: 199
Joined: Fri Oct 07, 2011 1:00 pm
Location: Indiana, USA

Re: Intensity of Sun and Sky

Postby Dade » Tue Feb 14, 2017 3:56 pm

crosley09 wrote:
Dade wrote:Anyway Irradiance AOV is ... well ... irradiance: the radiance incoming the first eye path hit is multiplied by Abs(Dot(incoming direction , surface normal)) and divided by PI.

I'm assuming this also accounts for the color and reflective properties of the material?


No and it is intended because in light design you usually want to study the amount of light landing on surfaces (for instance the tables in a school room, the painting in a museum, etc.). Irradiance AOV is a view independent information. This is how Radiance (http://radsite.lbl.gov/radiance/HOME.html) also works (a tool well known for light design even after so many years). You can find some example of this kind of Irradiance information usage in Radiance gallery (http://radsite.lbl.gov/radiance/frameg.html):

Image

If you account for the reflective properties of the material, it becomes a view dependent information and it is just the plain rendering in HDR format (i.e. it is the radiance received by eye).

crosley09 wrote:I can do a simple test with a lamp when I get the photometer to see if the main issue is with the sun/sky or something else.


As written by Jeanphi, one of the problem with sun/sky is that they are 2 light sources, not just one and it makes more complex to debug what is going on
User avatar
Dade
Developer
 
Posts: 8318
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Intensity of Sun and Sky

Postby crosley09 » Wed Feb 15, 2017 8:19 am

Dade wrote:No and it is intended because in light design you usually want to study the amount of light landing on surfaces (for instance the tables in a school room, the painting in a museum, etc.).


I think we are saying the same thing. So that's good. I was assuming the 'first eye path hit' is the ray hitting the camera which would have been affected by the properties of the material it came from.

Dade wrote:As written by Jeanphi, one of the problem with sun/sky is that they are 2 light sources, not just one and it makes more complex to debug what is going on


I can post results with sun and sky lights separately. Probably today.
i7 5930k, GTX 980 ti, 32 GB ddr4, 512 GB PCIe SSD...Windows 10
User avatar
crosley09
 
Posts: 199
Joined: Fri Oct 07, 2011 1:00 pm
Location: Indiana, USA

Re: Intensity of Sun and Sky

Postby crosley09 » Wed Feb 15, 2017 9:35 am

Follow up: Here are sun and sky separately.

Capture.JPG


While clearly not the only error, one problem seems to be that the intensity of the sky light is offset from zero. At sunrise and sunset, the values should be near or below the values of the sky light.
i7 5930k, GTX 980 ti, 32 GB ddr4, 512 GB PCIe SSD...Windows 10
User avatar
crosley09
 
Posts: 199
Joined: Fri Oct 07, 2011 1:00 pm
Location: Indiana, USA

Re: Intensity of Sun and Sky

Postby crosley09 » Wed Feb 15, 2017 9:38 am

... for some reason, the forum will not take excel files. Here is the file zipped...
Attachments
Irradiance Comparison2.zip
(18.03 KiB) Downloaded 13 times
i7 5930k, GTX 980 ti, 32 GB ddr4, 512 GB PCIe SSD...Windows 10
User avatar
crosley09
 
Posts: 199
Joined: Fri Oct 07, 2011 1:00 pm
Location: Indiana, USA

Re: Intensity of Sun and Sky

Postby crosley09 » Wed Feb 15, 2017 12:14 pm

Simple spot lamp result:
spot rgb.png


I created a simple blender scene with a spot lamp pointing down to a 1m x 1m surface.
The lamp is outputting 100 lumens and the diameter of the spot on the surface is ~1m^2.
This means we should expect ~128 lux because lux is lumens/m^2. (area of spot is 0.785 m^2)

blender.JPG

blender-lamp.JPG


Now, I read the .exr file in python and one pixel near the center looks like this:
Code: Select all
[ 64.43734741  64.43734741  64.43734741]

Since RBG channels are all the same, no math required, irradiance is 64.43.

64 is half of 128.... (seems that output is lux/2 unless I have made an error somewhere?)
This seems separate or additional to the issues with sun / sky lamps... ?
Attachments
test.blend
(451.86 KiB) Downloaded 53 times
spot irradiance.exr
(962.07 KiB) Downloaded 16 times
i7 5930k, GTX 980 ti, 32 GB ddr4, 512 GB PCIe SSD...Windows 10
User avatar
crosley09
 
Posts: 199
Joined: Fri Oct 07, 2011 1:00 pm
Location: Indiana, USA

Next

Return to Architecture & Design

Who is online

Users browsing this forum: No registered users and 3 guests