What are Fireflies
In certain scenarios, we may get small bright areas in our images that are difficult to clear out. These artifacts usually appear in the reflections and are called "Fireflies" among the CGI community.
Fireflies appear when the renderer can't manage to antialiaze random pixels because of high contrast with their neighbors.
Most commonly they show up in scenes where we have small light sources, glossy materials or very bright HDRIs. These set-ups create highlights in the reflections that have higher pixel values than the rest of the image. This creates difficulties for the image sampler.
Once we have very bright reflective spots they can create more fireflies on their own by reflecting them in other objects.
In animations, fireflies might appear at random places in the render output for each frame. For example:
General notes
In some cases, artists tend to exaggerate lights, materials and settings values in an attempt to achieve maximum sharpness. To minimize this risk we recommend using physically accurate values for those.
Sometimes Fireflies can be confused with regular flickering due to noise in animations. We recommend using the render elements to help your judgment.
For example, fireflies appear mostly in VRayReflection and VRaySpecular render elements. The regular noise that causes flickering in animations appears mostly in VRayGlobalIllumination and VRayLighting render elements.
Add SampleRate and NoiseLevel to the Render Elements list. Those can give you a clue which part of the image is taking up the render time and where you need to focus your investigation.
Dealing with fireflies using image sampler settings
One quick way to remove fireflies is to boost MIn/Max subdivs of the image sampler. Although this might be the easiest way to remove fireflies it will cost an additional render time, especially in high resolutions.
Dealing with fireflies using Denoiser
For still images, we recommend using the V-Ray Denoiser render element. It significantly reduces the fireflies and can produce some pretty good images.
For animations use the Denoiser tool. It interpolates between neighboring frames in animation and reduces fireflies.
Note: Note: Fireflies can be reduced in post-production using suitable third-party scripts/plugins
as well.
Preventing the appearance of fireflies
A better way to deal with fireflies is to think ahead when building a scene and prevent their appearance from the start. Any physically inaccurate values or sizes result in difficulties for the image sampler.
Below you can find some main practices that you need to keep in mind in order to avoid fireflies:
Tips for lights
The lights are the main contributor to fireflies artifacts. Keep this in mind when building your lighting setup. For example:
- Avoid using lights with very high value, unrealistically small size and high directionality.
- Avoid using HDRI maps with very high values. There are many examples of an HDRI image where the sun is over-boosted without any real need. If you happen to use one as such you may have to edit it.
- If you are using V-Ray Sun and Sky, set the sun to be invisible.
Tips for materials
Altering the materials might not be the perfect scenario as most artists wouldn't want to change them, especially with complicated scenes. But sometimes, fireflies are generated by one material. In those situations, altering its reflection slightly can reduce fireflies a lot.
- Avoid materials with Reflection glossiness values of 1
- Do not use extremely high IOR values - try to keep things physically accurate
- Overall don't overdo the sharpness of a material's reflections
Hopefully, the provided information in this article was useful to troubleshoot and resolve fireflies issues in your scene. If you need any further assistance do not hesitate to contact us.