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.
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: Thu Feb 27, 2020 10:06 am It has a radius (0.100000001), it is not a point light source :!:
Point light radius doesn't affect its brightness.

I am really confused by all this. I simplified the math for point lights candelas and noticed a very small difference in brightness, this is fixed now (needs to be merged).
But it doesn't explain that difference in irradiance, as if Power didn't output the expected brightness.
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 5:03 pm
Dade wrote: Thu Feb 27, 2020 10:06 am It has a radius (0.100000001), it is not a point light source :!:
Point light radius doesn't affect its brightness.
It is a sphere light source, not a point light source:

Code: Select all

scene.lights.140132073280008.type = "sphere"
It does a LOT of difference: https://github.com/LuxCoreRender/LuxCor ... t.cpp#L150

The emitted factor is divided by the sphere surface.
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 »

AFAIK BlendLuxCore doesn't allow to create a real point light.
This is a naming issue, what we call point light nowadays in PBR engines are all sphere lights with a minimum radius.

Thanks for showing the code. I need to wrap my head around this...
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. »

chafouin wrote: Thu Feb 27, 2020 8:49 pm AFAIK BlendLuxCore doesn't allow to create a real point light.
It does, just set the radius to 0: https://github.com/LuxCoreRender/BlendL ... ght.py#L83
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

chafouin wrote: Thu Feb 27, 2020 8:49 pm AFAIK BlendLuxCore doesn't allow to create a real point light.
This is a naming issue, what we call point light nowadays in PBR engines are all sphere lights with a minimum radius.

Thanks for showing the code. I need to wrap my head around this...
I find a lot of engines have attenuation that is treated as a point light, but a "size" (radius) is used to control specular highlight size and shadow blurriness. The current UE4 implementation of attenuation can be found here:

https://cdn2.unrealengine.com/Resources ... 915738.pdf

and Filament's documentation provides some very clear descriptions of how they handle point lights:

https://google.github.io/filament/Filam ... tuallights

My company's old engine code used this 2011-era attenuation logic which _does_ mimic sphere light attenuation but we tossed it since it was very unusable: https://imdoingitwrong.wordpress.com/20 ... tenuation/

Note that I'm not saying LuxCore should do any of that given that it's not a rasterizer, just food for thought and also how I personally am used to working. We found that lighting artists consistently mis-used point lights where they could set the physical radius because it changed the intensity of the light (as alluded to above). It was difficult to adjust lights for, say, specular highlight size or shadow blurriness, since all settings also changed overall intensity, making it a multivariable problem. When we switched to light radius only affecting shadows and specular highlights, things became much easier to adjust.
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

Also I changed my light to a true point light (radius 0) and it didn't meaningfully impact the resulting irradiance result. From the other thread linked, I can see that the current irradiance implementation has not officially been verified or tested against any known good results, so I'll treat it as magic numbers for now? I'll try to look through some of the code and piece together mentally what is happening based on what you and chafouin are saying.

The Irradiance AOV Contour Lines can have their scale set in Blender, but there are no settings specific to the irradiance AOV itself. The numbers chafouin brings up (179 / 683) is tantalizingly close and yet I am now afraid of latching onto red herrings unless I'm sure :).
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: Thu Feb 27, 2020 7:13 pm It does a LOT of difference: https://github.com/LuxCoreRender/LuxCor ... t.cpp#L150
As polyrhythm pointed out, it doesn't, actually. That's why I thought it wasn't even possible to make a point light, because I couldn't see a difference in how brightness is calculated (except that I assume you avoid the division by sphere surface when it's equal to 0).
polyrhythm wrote: Fri Feb 28, 2020 1:18 am I find a lot of engines have attenuation that is treated as a point light, but a "size" (radius) is used to control specular highlight size and shadow blurriness.
The size of the light source works the same in LuxCore (CORRECTION: Not in Cycles). It doesn't affect light intensity exactly because the emitted gain is divided by the sphere surface.

Attenuation radius is mostly there in real-time engines to optimize light overlapping, and since it can affect the inverse square light falloff (i.e. if the radius is shorter than the visible light contribution), it's usually not something you need in offline renders (although I'm a strong defender of giving more control to the artists when possible).
Last edited by chafouin on Sat Feb 29, 2020 9:53 pm, edited 2 times in total.
polyrhythm
Posts: 13
Joined: Wed Feb 26, 2020 1:35 am

Re: Light intensities and matching Cycles

Post by polyrhythm »

One more funny thing. I know, I must be getting tiring.

As mentioned, the one candela point light results in around 0.256 "irradiance".

If I switch it to 4Pi Lumens (one cd = 4pi l), I now get a slightly brighter result at 0.318. Close to pi, but maybe not a thing, given how close these all kinda are to pi. One would assume that 4pi lumens is the exact same as one candela, 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: Fri Feb 28, 2020 4:41 am If I switch it to 4Pi Lumens (one cd = 4pi l), I now get a slightly brighter result at 0.318. Close to pi, but maybe not a thing, given how close these all kinda are to pi. One would assume that 4pi lumens is the exact same as one candela, though.
This was the inaccuracy I fixed this morning. Either download the latest blendluxcore from GitHub or wait for tomorrow's build.
chafouin
Posts: 120
Joined: Wed Jan 24, 2018 9:35 pm
Location: Los Angeles

Re: Light intensities and matching Cycles

Post by chafouin »

For what it's worth, I compared to Mitsuba and it seems that their point light is brighter by a 4*PI factor (I just compared two renders visually). Which doesn't help as this is way more than the brightness difference we see here when measuring the irradiance, but since Mitsuba is often regarded as the scientific ground truth renderer, I wanted to check.
https://github.com/mitsuba-renderer/mit ... /point.cpp

LuxCore is identical to Cycles that gives the same brightness at equal power with efficacy at 1 lm/W.
Post Reply