Clamping Max Brightness

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
arescet
Posts: 43
Joined: Tue Jun 25, 2019 10:29 pm

Clamping Max Brightness

Post by arescet »

Hello LuxCore community, hope you are all well.


I'm trying to understand how clamping in LuxCore works but i find it hard.. even with the "artistic" unit type for lights.

lights using "power" unit type has two values (power and efficacy), while clamping's "max brightess" is only asking for one value.
i do not know how to make power and efficacy values produce something that clamping's "max brightness" can use.

Say that i have a single light source using "power" as the unit type, with the default values (power=100W and efficacy=17).
How do i go about setting a clamp value such that the brightest pixel is never brighter than my light source's intensity?
Is there a formula for this somewhere? (i apologize if there is but i can't find it, i've looked)
I am aware that what i'm aiming for is not physically accurate as light is additive and multiple lights WILL interfere constructively.
the noise reduction just seems very appealing.

lights using "artistic" unit type has only one value (gain) which looks like it will work with clamping's "max brightness" so i tested it.
the image below has two spotlights using "artistic" unit type with a gain value of 100 per light.
clamping is enabled and max brightness value is set to 100.
what i figured would happen is that when these two lights illuminate a single spot on the floor, pixels corresponding to that spot will only be illuminated with 100 gain; meaning that these lights must not add their brightness on said spot since the whole render is clamped to 100 max brightness.
gain100.PNG
clamp100.PNG
the pixels where these two lights meet still seem to produce twice the brightness.

sorry for the dumb question, i look forward to all your answers.
please be safe and don't eat bats!
chafouin
Posts: 120
Joined: Wed Jan 24, 2018 9:35 pm
Location: Los Angeles

Re: Clamping Max Brightness

Post by chafouin »

I can't talk about the Clamping as I am not sure how it works.

About your light brightness, you need to not forget about the inverse square law, that makes the brightness decay with distance. The brightness is also divided by Pi because we assume the emission is calculated per steradian (this is only valid using Artistic units; when using power, the actual spot angle will affect how the emitted light is focused accordingly).

For a spotlight using a Gain of 100, at 1 meter, the pixel brighness will be (100 / Pi)/ (1m*1m) = 100 / Pi = 31.78. Unit is cd/m2, which is the actual RGB value before tonemap.
At 10 meters, it will be (100 / Pi) / (10m*10m) = 31.78 / 100 = 0.3178 cd/m2
Last edited by chafouin on Mon Mar 16, 2020 12:38 am, edited 1 time in total.
arescet
Posts: 43
Joined: Tue Jun 25, 2019 10:29 pm

Re: Clamping Max Brightness

Post by arescet »

chafouin wrote: Sun Mar 15, 2020 12:43 am I can't talk about the Clamping as I am not sure how it works.

About your light brightness, you need to not forget about the inverse square law, that makes the brightness decay with distance. The brightness is also divided by Pi because we assume the emission is calculated per steradian (this is only valid using Artistic units; when using power, the actual spot angle will affect how the emitted light is focused accordingly).

For a spotlight using a Gain of 100, at 1 meter, the pixel brighness will be (100 / Pi)/ (1m*1m) = 100 / Pi = 31.78. Unit is cd/m2, which is the actual RGB value.
At 10 meters, it will be (100 / Pi) / (10m*10m) = 31.78 / 100 = 0.3178 cd/m2
Hey thanks! i appreciate the formula for calculating brightness.
i'm sure that would come in handy especially for indoor renders :D
Post Reply