Light intensities and matching Cycles

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light intensities and matching Cycles

Post by Dade »

polyrhythm wrote: Wed Feb 26, 2020 2:46 am I end up with 3.1523...but it should be one lux, right? Am i doing something wrong?
That is a PI for sure: I may have a division by PI that should be a division by 2 * PI instead. The code is here: https://github.com/LuxCoreRender/LuxCor ... l.cpp#L173
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light intensities and matching Cycles

Post by Dade »

Dade wrote: Wed Feb 26, 2020 11:04 am
polyrhythm wrote: Wed Feb 26, 2020 2:46 am I end up with 3.1523...but it should be one lux, right? Am i doing something wrong?
That is a PI for sure: I may have a division by PI that should be a division by 2 * PI instead. The code is here: https://github.com/LuxCoreRender/LuxCor ... l.cpp#L173
I was looking at BlendLuxCore code and I have now the doubt that is BlendLuxCore to multiply power by PI: https://github.com/LuxCoreRender/BlendL ... 4610be874a :?:
Support LuxCoreRender project with salts and bounties
chafouin
Posts: 120
Joined: Wed Jan 24, 2018 9:35 pm
Location: Los Angeles

Re: Light intensities and matching Cycles

Post by chafouin »

Dade wrote: Wed Feb 26, 2020 11:20 am I was looking at BlendLuxCore code and I have now the doubt that is BlendLuxCore to multiply power by PI: https://github.com/LuxCoreRender/BlendL ... 4610be874a :?:
I'll have a look at it tonight. That Pi is to match area light brightness from gain to power as we discussed. This is not applied to point lights.

I'm pretty sure point lights work as intended (famous last words) as the default intensity values were set so that point lights keep their brightness (1000 lumens, 80 candelas).

How do you measure the irradiance?
chafouin
Posts: 120
Joined: Wed Jan 24, 2018 9:35 pm
Location: Los Angeles

Re: Light intensities and matching Cycles

Post by chafouin »

I think I can confirm that, for point lights, conversion from power to lumen to candela works as intended. Everything is based on Luxcore power.

If there is a pi multiple somewhere, it's either in the way you measure the irradiance, or in luxcore power and how it converts to irradiance.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light intensities and matching Cycles

Post by Dade »

At this point, I'm quite confused (I was thinking to are lights, not point lights), @polyrhythm, it may be better if you post your test scene so we all discuss on the same ground.
Support LuxCoreRender project with salts and bounties
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

I simplified my scene setup and switched to 2.23 to try the new units.

The scene is real simple - a one candela point light one meter over a plane, with everything having diffuse white materials. The scene is attached.

When I do a render with the irradiance pass enabled, I get around 0.25 under the light's position for irradiance in an unknown unit type, although irradiance is typically in W/m^2 or W/cm^2.

Image

Going back to the above image, this 0.25 should somehow be able to be converted to 1 lx, but based on the math I see on the subject, I can't figure out what conversion would take me there. Also note that the caption for the image is incorrect and should read illuminance since it deals with lux.

There also happens to be some kind of view-dependent ring on the ground if sigma is anything but 0.0 on the diffuse material:
ring.png
I'm also using the Photographer addon and when setting the exposure to 0EV (9.610 in Exposure under Color Management), the one candela light looks about correct - which means the actual illuminance must be close to 1 lx...just can't get the numbers I want in the irradiance pass.

As verification, if I set up the same exact scene in UE4 with a one candela light, I get exactly one lux of illuminance on the ground under the light.
Attachments
validation.blend
(667.43 KiB) Downloaded 214 times
chafouin
Posts: 120
Joined: Wed Jan 24, 2018 9:35 pm
Location: Los Angeles

Re: Light intensities and matching Cycles

Post by chafouin »

polyrhythm wrote: Thu Feb 27, 2020 2:10 am I'm also using the Photographer addon and when setting the exposure to 0EV (9.610 in Exposure under Color Management), the one candela light looks about correct - which means the actual illuminance must be close to 1 lx...just can't get the numbers I want in the irradiance pass.

As verification, if I set up the same exact scene in UE4 with a one candela light, I get exactly one lux of illuminance on the ground under the light.
Let's ignore Photographer for now, as I don't trust it to be perfectly correct yet (I will be running more accurate tests for the next version, with the physical light units).

I think the answer is there: viewtopic.php?f=4&t=802#p8585

As Dade mentionned in that post, for the irradiance pass, he uses 179 lm/W as " the standard luminous efficacy of equal energy white light that is defined and used by Radiance. It can be used here to produce the same output of Radiance. More information here: http://www.radiance-online.org/pipermai ... 03616.html".

However, outside of that Radiance reference, I've never seen 179 lm/W being the standard luminous efficacy anywhere. Maximum luminous efficacy is obtained by a green light a 555 nm, and this is 683 lm/W. Especially when using Normalize by Color luminance, that 683 lm/W will make sense as it will compensate for the loss of brightness of colored lights that are not green.

We assume power to lumen using 683 lm/W, which explains why it's darker than expected in the irradiance pass. 683/179 = 3.816, which is oddly close to the 0.25 brightness you measure (1/3.816 = 0.262).

The irradiance pass should probably be corrected to use 683 lm/W as the standard luminous efficacy :)

EDIT: One thing that is odd is that the World Flat Color light which supposedly outputs Lux is rendering fine in the Irradiance view... Could it be that it also assumes a 179 lm/W ?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light intensities and matching Cycles

Post by Dade »

chafouin wrote: Thu Feb 27, 2020 6:04 am However, outside of that Radiance reference, I've never seen 179 lm/W being the standard luminous efficacy anywhere. Maximum luminous efficacy is obtained by a green light a 555 nm, and this is 683 lm/W. Especially when using Normalize by Color luminance, that 683 lm/W will make sense as it will compensate for the loss of brightness of colored lights that are not green.
"179" is just the default value of CONTOUR_LINES image pipeline plugin ".scale" parameter but it can easily be changed in whatever you want (i.e. 683) or the parameter is not exposed in Blender :?:
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light intensities and matching Cycles

Post by Dade »

polyrhythm wrote: Thu Feb 27, 2020 2:10 am I simplified my scene setup and switched to 2.23 to try the new units.
This is the light source in your scene:

Code: Select all

scene.lights.140132073280008.gain = 1 1 1
scene.lights.140132073280008.transformation = -0.290864646 0.955171168 -0.0551890582 0 -0.771100819 -0.199883357 0.604524732 0 0.566393197 0.218391195 0.794672251 0 0.924400568 1.00545394 1 1
scene.lights.140132073280008.id = 0
scene.lights.140132073280008.type = "sphere"
scene.lights.140132073280008.color = 1 1 1
scene.lights.140132073280008.power = 10.0434208
scene.lights.140132073280008.normalizebycolor = 1
scene.lights.140132073280008.efficency = 1
scene.lights.140132073280008.position = 0 0 0
scene.lights.140132073280008.radius = 0.100000001
It has a radius (0.100000001), it is not a point light source :!:
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light intensities and matching Cycles

Post by Dade »

BTW, don't use tile rendering, it is a second grade citizen in LuxCore :idea:
Support LuxCoreRender project with salts and bounties
Post Reply