Light intensities and matching Cycles
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: Light intensities and matching Cycles
It's good on my side!
BYOB wanted to change the sun and sky intensities though, not sure what his plans are but it's probably better to do all of this in one release.
BYOB wanted to change the sun and sky intensities though, not sure what his plans are but it's probably better to do all of this in one release.
Re: Light intensities and matching Cycles
I have started to write a script that converts old scenes to v2.3.
The code can be found here: https://github.com/LuxCoreRender/BlendL ... ibility.py
Still missing is tonemapper conversion (a very hard to solve problem) and light settings conversion.
@chafouin: Can you help me with the conversion code for regular lights?
I.e. convert from the old broken "gain + power + efficacy" to the new settings?
It is available under the new "LuxCore Tools" panel in the render properties:
The code can be found here: https://github.com/LuxCoreRender/BlendL ... ibility.py
Still missing is tonemapper conversion (a very hard to solve problem) and light settings conversion.
@chafouin: Can you help me with the conversion code for regular lights?
I.e. convert from the old broken "gain + power + efficacy" to the new settings?
It is available under the new "LuxCore Tools" panel in the render properties:
Re: Light intensities and matching Cycles
@B.Y.O.B. Area lights / Emissive materials are the only ones that should differ from 2.2, I have created a pull request with the conversion.
Sorry but I don't have the time to look into the two issues I mentionned in the pull request, I hope you can find a solution.
This will be a great release! Thanks for your hard work.
Sorry but I don't have the time to look into the two issues I mentionned in the pull request, I hope you can find a solution.
This will be a great release! Thanks for your hard work.
Re: Light intensities and matching Cycles
Thanks, but I'm a bit puzzled.
In your code, you check for light.luxcore.light_unit == "power", but this will always evaluate to False, because the light_unit property did not exist in v2.2, so it will always be set to the default, which is "artistic".
So your conversion code is actually never executed.
I have created a testscene, this is how it looks in v2.2:
This is how it looks in v2.3, with no conversion performed:
Now with the conversion operator, as it was after your pull request (your code not being executed, and my code disabling blackbody normalization):
And this is the result after I changed some code so your area light conversion is performed:
https://github.com/LuxCoreRender/BlendL ... 69211e4e16
I have attached the scene.
From left to right, it's a meshlight, an area light, a spot light, a point light, and a meshlight with blackbody texture.
In your code, you check for light.luxcore.light_unit == "power", but this will always evaluate to False, because the light_unit property did not exist in v2.2, so it will always be set to the default, which is "artistic".
So your conversion code is actually never executed.
I have created a testscene, this is how it looks in v2.2:
This is how it looks in v2.3, with no conversion performed:
Now with the conversion operator, as it was after your pull request (your code not being executed, and my code disabling blackbody normalization):
And this is the result after I changed some code so your area light conversion is performed:
https://github.com/LuxCoreRender/BlendL ... 69211e4e16
I have attached the scene.
From left to right, it's a meshlight, an area light, a spot light, a point light, and a meshlight with blackbody texture.
- Attachments
-
- v2.3_conversion_test_02.blend
- (653.15 KiB) Downloaded 182 times
Re: Light intensities and matching Cycles
Got a bit further, now multiplying in the old gain:
https://github.com/LuxCoreRender/BlendL ... ity.py#L45
But there's still a slight difference in area light brightness.
https://github.com/LuxCoreRender/BlendL ... ity.py#L45
But there's still a slight difference in area light brightness.
Re: Light intensities and matching Cycles
Sorry about that, I couldn't compare to 2.2 directly because I couldn't get it to run (couldn't import pyluxcore, whatever I tried, redistributable installed and all).
I only compared to Artistic / Gain as this shouldn't have changed in 2.3.
I'll have a look at your scene tonight. What if you remove that one pi multiplier? That's the only thing I am not sure if it was applied in 2.2 or not when everything was actually using Gain.
I only compared to Artistic / Gain as this shouldn't have changed in 2.3.
I'll have a look at your scene tonight. What if you remove that one pi multiplier? That's the only thing I am not sure if it was applied in 2.2 or not when everything was actually using Gain.
Re: Light intensities and matching Cycles
Huh, weird. If you need any more testscenes, I can create them for you.
Good intuition, that did the trick.
Now the only thing left that's a bit different is the meshlight with blackbody, not sure what's going on there.
Re: Light intensities and matching Cycles
Normalize by Color Luminance should be checked on the Emission node in that case. Emission nodes using Power were working "as intended" and normalized in 2.2, if I'm not mistaken.
The viewport doesn't refresh correctly for the meshlight when running the operator also.
-
- Posts: 13
- Joined: Wed Feb 26, 2020 1:35 am
Re: Light intensities and matching Cycles
Got a simple question. I am following the developments in this thread but am not on 2.3 yet and wanted to try validating the irradiance output of a point light. Can someone check my math?
I have a simple scene like a pure white diffuse plane, and a single point light one meter above it.
I'm trying to recreate the following image:
So, to go from watts to candelas, I _think_ I have to do...
This gives me 0.0183987856725610 watts, or about 18mW. I plug that in to LuxCore and set the efficacy to 1 so that I know exactly how many lumens I'm dealing with.
In the resulting render, I get 0.00048 in the irradiance under the point light. To convert that irradiance (w/m^2) to illuminance (lm/m^2), I need to
- first bring it to w/cm^2, and 1 w/cm^2 = 104 w/m^2, so divide by 104
- get it to lux by multiplying by 6.83 * 10^6, so 683000
I end up with 3.1523...but it should be one lux, right? Am i doing something wrong?
I have a simple scene like a pure white diffuse plane, and a single point light one meter above it.
I'm trying to recreate the following image:
So, to go from watts to candelas, I _think_ I have to do...
Code: Select all
1/683 (watts per lumen) * 4pi (lumens per candela)
In the resulting render, I get 0.00048 in the irradiance under the point light. To convert that irradiance (w/m^2) to illuminance (lm/m^2), I need to
- first bring it to w/cm^2, and 1 w/cm^2 = 104 w/m^2, so divide by 104
- get it to lux by multiplying by 6.83 * 10^6, so 683000
I end up with 3.1523...but it should be one lux, right? Am i doing something wrong?