Fireflies - Boat Scene

Fireflies caused by the sun from the physical_sky

This scene consists of a boat model on a plane that represents the sea. Both models have standard_surface shaders assigned to them. As you can see in the image above, there are many 'fireflies' in this scene. In this situation, they are caused by the bright sun disc from the physical_sky shader that is connected to a skydome_light . This kind of noise is difficult to remove by simply increasing the number of samples in the render settings. However, there are several ways to overcome this type of noise. We will work through some of these methods below.

AOVs

One way to identify where the fireflies are coming from is to render the scene using AOVs.

Choose the AOVs you wish to identify

We can instantly tell that they are coming from two places:

  1. The boat shader which has some specularity.
  2. The sea shader which also has some specularity.

When rendering out these AOVs, the fireflies are clearly visible:

clamp_max_value: 10 (default value) indirect_specular AOV (fireflies visible on boat)

Specular Roughness

In some situations, increasing the specular_roughness may help to reduce fireflies as it is effectively creating a larger, softer specular hi-light. Increasing the specular_roughness of the standard_surface shader that is assigned to the boat reduces the number of fireflies. However, in this instance, there are still some fireflies evident when using this method.

Low specular_loughness value specular_roughness: 1. Fireflies have been reduced but are still evident.

Specular Samples

Due to the almost mirror-like surface of the sea shader, we are getting extremely high specular values reflected from the sun onto the Specular sea surface. These high Specular values are very difficult to sample and therefore, in this situation, increasing the number of specular_samples does not help to eliminate the fireflies.

2 4

Rayswitch

A better method is to assign a simpler shader for Specular and diffuse rays using a ray_switch shader.

When we look at the AOVs we can see that the fireflies are not visible:

indirect_specular AOV rayswitch beauty (no fireflies)

Two standard_surface shaders -> rayswitch shader

Clamp Sample Values

Another option is to clamp the output value of the pixels in the scene. This control will clamp pixel samples to the specified maximum value for all shaders in the scene. The images below show the effect clamping has on the fireflies. A value of 1 eliminates the fireflies completely. However, it also removes any dynamic range from the render.

clamp_max_value: 5 clamp_max_value: 1 (fireflies have gone)