Physically-based renders can exhibit high contrast pixels that seem to be scattered randomly over the image. These bright spots are commonly called fireflies which are rendering artifacts resulting from paths that gives a poor estimation of the indirect illumination. For forward path tracers like like the path tracer integrator, these difficult paths are generally paths ending near light sources or caustics.
Example of fireflies in a render
It's important to distinguish fireflies from general noise since they require a very large and impractical number of samples to be eliminated. More importantly, setting very large numbers of samples doesn't always solve the issue and worse, this can introduce new fireflies.
Another important thing to consider is that these paths are likely to exhibit high contrast noise when the number of bounces increases:
The approach widely used by renderers to eliminate fireflies is clamping the energy of all indirect paths on an arbitrary maximum value specified by the user. This biased method is simple and effectively reduces the number of samples needed to eliminate these artifacts.
However, not only aggressive clamping introduces obvious diffuse, reflection and transmission inconsistencies between direct and indirect illumination but also, it doesn't guarantee the elimination of fireflies.
For example, clamping the energy to the extreme value of 1 doesn't eliminate fireflies in the render below:
Fortenutely, the path tracer of Clarisse is able to detect and eliminate paths that are likely to produce fireflies. Instead of clamping all indirect illumination paths based on an arbitrary maximum value, the user can control the threshold of the firefly detection using single attribute called Fireflies Filtering.
In the render below we disabled clamping and set instead Fireflies Filtering to 25%. Note how all fireflies have been removed:
Compared to clamping, Fireflies Filtering dramatically reduces noise coming from indirect illumination when setting values beyond the default 25%.
All the renders below have been rendered with 64 spp and clamping disabled.
It is important to note that high values of Fireflies Filtering can introduce a potential loss of indirect illumination energy since filtering these noisy samples also reduces their contributions from the final integration.
However, unlike clamping this loss of energy is reduced when the number of samples increases and gets closer to the unbiased result as you can see below:
In the next example, the image is rendered with 16spp with an aggressive Fireflies Filtering value of 100%.
As you can see the image exhibits very little noise despite its low number of samples. However, it also exhibits a slight loss of indirect illumination energy when compared to the ground truth reference. Fortunately, as we will see this bias is reduced when the amount of samples is increased.
All the renders below have been rendered with a Fireflies Filtering set to 100%.
As you can see, rendering the image from 128spp to 512spp doesn't recover any missing energy so results are predictable with a somewhat small number of samples even with such aggressive value.