Page 1 of 1

Clamp: try to understand it (luxrender 2.5)

Posted: Mon Aug 02, 2021 9:50 am
by marcatore
Hi guys,
I've some free time to make some tests.

I'm testing the clamp feature trying to help Lux producing more clean images.
At least this is what I've understood as the main reason to use it.
Using clamp should be useful to avoid fireflies and due to this, the image should need less samples to be clear.
Is this right? I've correctly understood the reason why use clamp?


I've got some results that I consider "strange" compared to the mission of the clamp feature.

PGI on - Clamp on
PGI_clamped.jpg
PGI on - Clamp off
PGI_noClamped.jpg
PGI off - Clamp on
noPGI_clamped.jpg
PGI off - Clamp off
noPGI_noClamped.jpg

In my opinion, the clamped images seem more noisy than the unclamped.
Do you agree?
If yes, is it correct?

I've created a simple scene you can find as attached.
testing_clamp.zip
(124.92 KiB) Downloaded 130 times

Re: Clamp: try to understand it (luxrender 2.5)

Posted: Mon Aug 02, 2021 9:58 am
by Sharlybg
Clamping is there to avoid unnecessary fireflies and noise.
Side effect is faster cleaner image. Abuse clamping value will
give you dark image. So your clamping value have to consider
the initial brightness of the render (clamping off). Apply a clamping
value that keep your image closer to the unclamped while speeding up
your render. Note that PGI can help clean a lot of noise and fireflies so clamping
value should take that in consideration.

Re: Clamp: try to understand it (luxrender 2.5)

Posted: Mon Aug 02, 2021 11:53 am
by marcatore
The value I've used it's just to make it more visible that the clamped one is noisier than the unclamped.
At least, this is what my eyes see.

Another thing that I think it should fixed (if it's not the expected behaviour) is that the PGI is unclamped.

Re: Clamp: try to understand it (luxrender 2.5)

Posted: Mon Aug 02, 2021 1:06 pm
by Dade
marcatore wrote: Mon Aug 02, 2021 11:53 am The value I've used it's just to make it more visible that the clamped one is noisier than the unclamped.
At least, this is what my eyes see.
Noise is more visible in dark regions. It is a human eye characteristic.

Clamping is not intended to remove noise but fireflies.
marcatore wrote: Mon Aug 02, 2021 11:53 am Another thing that I think it should fixed (if it's not the expected behaviour) is that the PGI is unclamped.
PGI is clamped :?: Clamping is applied at the very end, to the sample (which include PGI result, direct lighting and everything else).