What are Fireflies?
In cetain scenarios, we might get small and very bright areas in our renderings, especially in reflective objects, that don't seem to clear whatever we do. In the CGI community, these artifacts are called "Fireflies".
Fireflies appear when a renderer can't manage to anti-alias some pixels, due to their high contrast with their neighbours. Generally, they appear in scenes, which have small light sources, glossy materials or overbright HDRI environment maps, where a certain pixel manages to reflect a particularly bright spot of the lighting environment, leading to it being overbright, compared to its neighbouring pixels. Once those spots appear, they can create even more fireflies through their reflection on other objects. They are most commonly visible in animation sequences.
Diagnosis
- Sometimes, artists tend to exaggerate lights, materials, and setting values in an attempt to achieve maximum sharpness, which increases the chances of fireflies appearing. To minimize this risk, it is recommended to use physically correct values.
- Fireflies can be confused with animation flickering, caused usually by a different noise pattern. To determine if the phenomena is indeed fireflies, use the Render Elements. Generally, fireflies appear in the VRay Specular and VRayReflection elements, while noise flickering - mostly in the VRayGlobalIllumination and VRayLighting such.
- Use the VRaySampleRate and VRayNoiseLevel render element to see which part of the rendering is taking more than usual render time. It may provide a clue to focus your investigation.
Solutions
-
Enable the Firefly removal algorithm
As of V-Ray 7, we've implemented an algorithm that detects and removes Fireflies automatically.
Where to find the option:
-
Adjust the image sampler settings
Another quick way to remove fireflies is to boost MIn/Max subdivs of the image sampler, although this method will cost additional render time.
-
Use a Denoiser
For still images, enabling the V-Ray Denoiser can reduce the effect of the fireflies significantly.
How to enable the V-Ray Denoiser:
- V-Ray for 3dsMax: Render Setup > Render Elements > Add > VRayDenoiser
- V-Ray for Maya: Render Settings > Render Elements > Denoiser
- V-Ray for SketchUp / Rhino: Asset Editor > Render Parameters > Denoiser
- V-Ray for Revit: Render Settings > Channels > Denoiser
- V-Ray for Cinema4D: Render Settings > VRay > Common > Denoiser
- V-Ray for Houdini: V-Ray Render Elements node > V-Ray > Render Channel > V-Ray Denoiser (RE)
-
V-Ray for Blender: V-Ray Node Editor > World > Add menu > Render Channels > Denoiser
For animations, use the standalone denoiser tool instead. It has the functionality of interpolating neighbouring frames.
Learn more in our article about Using the standalone Denoiser.
Prevention
A better way to deal with fireflies is to think ahead when building a scene and prevent their overall appearance.
-
Tips for lights
The lights are the main contributor to firefly artifacts. When building your lighting setup, keep this in mind the following:
- Avoid using lights with very high values, unrealistically small size and high directionality
-
Avoid jagged-textured lights
Soften the light's texture by blurring or using a VRaySoftbox texture (3ds Max)
-
Avoid using HDRI maps with very high values
There are many examples of HDRI images, where the sun is overexposed without any real need. If you happen to use such one, you should edit it. A better idea is to use the HDRIs available in Chaos Cosmos.
- Enable V-Ray Sun's "invisible" option
-
Tips for materials
Altering the materials might not be ideal, as nobody likes changes, especially when working on complicated scenes. Sometimes, however, fireflies may be generated by a single material, the alteration of which can eliminate the fireflies entirely.
Keep in mind the following:
-
Avoid using materials with Reflection glossiness values of 1
Even a value of 0.99 will help reduce the fireflies' effect.
-
Avoid using extremely high IOR values
Overall, keep things physically accurate.
-
If you keep struggling with firefly artifacts, don't hesitate to contact us.