Skip to content

Clamping#

Clamping is a simple biased method which allows to reduce fireflies due, for example, to under sampling and low probability paths ending near light sources. Indeed, inverse square distance law states that the intensity of a light is inversely proportional to the square of the distance from the source.

This means that path ending on surfaces near a light source can have extremely high energy value. This generally is resolved by brute force oversampling as low probability path contributions are balanced by the high number of high probability paths that return the expected energy value. The path tracer also provide a very effective complementary technique to clamping called fireflies filtering.

Example of a low probability path providing high energy

Example of a low probability path providing high energy

The path tracer provides you with clamping controls allowing you to specify a maximum luminance threshold (10.0 by default) to clamp values beyond this threshold in order reduce fireflies and noise in your renders.

However you may notice an energy loss in your renders because diffuse illumination and reflections/transmissions may appear dimmed out. However, this tradeoff is usually more acceptable than the noise.

Tip

It is possible to disable clamping by setting Clamping Threshold to -1 or clearing its value and pressing Enter in the Attribute Editor.

Clamping is only performed on indirect paths so that all sharp highlights and dynamic range of direct lighting are preserved even when setting an aggressive clamping threshold of 1.0.

Fireflies due to the reflection of sun

Fireflies due to the reflection of sun

With a very aggressive Clampling Threshold set to 1.0 fireflies disappear

With a very aggressive Clampling Threshold set to 10 fireflies disappear

Even with an aggressive clamping value of 1.0 we keep all the dynamic range.

Even with an aggressive clamping value of 10 we keep all the dynamic range