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.
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

There’s a lot of multiplies by 4Pi flying around in that file. I guess it makes sense since they’re unitless so they just take whatever the input is and assume it’s isotropic radiant flux. Still, my head hurts a little when it comes to cross validation, how are comparing and so on? Mitsuba has a radiance meter but it might be painful to use.
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 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.
I have a different experience here where UE4 point light brightness is darker than LuxCore pointlight by a Pi factor. Did you compare using identical exposure?

EDIT: Pre-tonemap in UE4, the light brightness feels around a half Pi darker than in LuxCore, which would mean that they also calculate camera exposure differently...

EDIT: Setting up LuxCore with camera settings set to EV 0 (1 sec, F/2.8, ISO 800), which means that the render output should not be scaled.
- The render is brighter than when using a Tonemap Gain of 1.0, by a Pi factor. Shouldn't the two be identical?
- With EV 0, the results looks correct to me: 1 candela outputs a pixel brightness of 1 on a white plane placed at 1 meter (I won't dare to say 1 lux).

EDIT: Compared Cycles using Photographer, and UE4, and camera exposure and light brightness assuming a 683 lm/W efficacy, and they match without any problem (I am quite relieved!).

But that means that LuxCore is the odd one here.
There is a Pi factor on the local lights / distant light that make them darker than expected in the irradiance AOV and darker than world lights.
There is a Pi factor in the Camera Exposure that makes the output brighter than a Tonemap gain of 1.

These two Pi factors cancel each other on the Local Lights / Distant light, but will be wrong for rest.
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

UE4 has a visualize HDR setting that gives you lux, so I was using that to check values, but didn’t think of disabling the tonemapper to check visually too. I’m afraid my coworkers might start questioning my sanity once I have 10 renderers open with these boring point light tests. :D
lighting_freak
Posts: 234
Joined: Thu Jan 18, 2018 6:02 pm

Re: Light intensities and matching Cycles

Post by lighting_freak »

Hi all,

Please keep in mind that a camera does only see luminance (neither illuminance nor irradiance).

Please refer this thread:
viewtopic.php?f=4&t=1067&p=15301&hilit=CIE#p15301

Previous version did right results if we assume that the value that is saved in (not tonemapped) exr file is a cd/m^2 (not lux (lm/m^2)). If we consider the result as a luminance then AOV irradiance has a wrong name should be radiance (or better luminance).

BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

In that case, it looks like right now our 4*pi lumen point light is right on. It results in ~0.318 luminance on a surface one meter below. To go from luminance to illuminance is a multiplication by pi. 0.318 * pi = 1.0 (lux)!

Unfortunately I am still seeing the discrepancy between that and a 1 candela light, which is only getting me around 0.25 or so on a surface. From a build released yesterday on Github. My source on the math is the following excerpt from UE4 HDR visualizer:

Code: Select all

float MaxLuminance = max(LuminanceAvg.r, max(LuminanceAvg.g, LuminanceAvg.b));
float MaxIlluminance = MaxLuminance * PI;
https://github.com/EpicGames/UnrealEngi ... R.usf#L170

I'm not sure if the multiply by pi is totally physically correct or assuming everything is lambertian, though.
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: Sun Mar 01, 2020 1:16 am Unfortunately I am still seeing the discrepancy between that and a 1 candela light, which is only getting me around 0.25 or so on a surface.
Please check you have that version of the file: https://github.com/LuxCoreRender/BlendL ... 7f9a8dc165
It is literally a 4 Pi multiplier now.
lighting_freak wrote: Sun Mar 01, 2020 1:07 am Please keep in mind that a camera does only see luminance (neither illuminance nor irradiance).
Hi lighting_freak, thanks for chiming in! This helps a lot. Did you try the new light units and did you notice any problem? Please report if you find anything.
lighting_freak
Posts: 234
Joined: Thu Jan 18, 2018 6:02 pm

Re: Light intensities and matching Cycles

Post by lighting_freak »

Hi,

Sorry I didn't try exact renderings since there is no official release yet. The changes are to quick during the last days to be sure that I'm on the right daily built.

Generally I like the new scientific/artist separation.

I'm trying to follow this thread but you lost me during the discussion about the number of the photometric/radiometric equivalent and also with pi multipliers...

So if you have a point light source and this light source shall emit uniform amount of light in full sphere solid angle the formula is

Intensity (cd) = luminous flux (lm) / solid ange (sr)
Full sphere solid angle is 4*pi... so if you want to reach 1cd intensity your luminous flux must be 4*pi lm.

The equivalent changes dependent on the light wavelength (colour) and the observer condition (day/ night).

BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

chafouin wrote: Sun Mar 01, 2020 6:08 am Please check you have that version of the file: https://github.com/LuxCoreRender/BlendL ... 7f9a8dc165
It is literally a 4 Pi multiplier now.
Ah, I see. The latest Github builds aren't picking that change up as of today.
chafouin
Posts: 120
Joined: Wed Jan 24, 2018 9:35 pm
Location: Los Angeles

Re: Light intensities and matching Cycles

Post by chafouin »

lighting_freak wrote: Sun Mar 01, 2020 9:36 pm So if you have a point light source and this light source shall emit uniform amount of light in full sphere solid angle the formula is

Intensity (cd) = luminous flux (lm) / solid ange (sr)
Full sphere solid angle is 4*pi... so if you want to reach 1cd intensity your luminous flux must be 4*pi lm.

The equivalent changes dependent on the light wavelength (colour) and the observer condition (day/ night).
It should be all done like this, I understand that you wanted to wait for more stable builds. The first Release Candidate should be coming soon :)
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Light intensities and matching Cycles

Post by B.Y.O.B. »

The daily builds should be working again, thanks to acasta69.
Dade and I would like to wrap this topic up before releasing the RC1.
Post Reply