Rendering: Reduce Noise
What is 'noise'?
Noise is a potential problem for any path-tracing render engine. It manifests in one of two ways: grain and fireflies. On this page various methods to reduce grain and control fireflies are presented.
Cycles 4D contains a denoiser - actually, more than oen type of denoiser. In many cases the denoiser is all you need to remove most or all noise from the scene but in some cases it does not perform as well as others, so the methods given on this page are still valid.
See the Render Settings page for details of the denoiser.
Grainy noise is the 'granular' appearance you see in areas which should be smooth. This is a simple scene with lots of grainy noise on the left:
Compare the right-hand pane using 10 samples with the left-hand one which used 4 samples. The noise in the left-hand image gives a grainy, rather murky appearance in contrast to the smooth render in the right-hand image.
This occurs because in a simple path tracer there may not be enough rays to sample all the possible sources of light in the scene, with the result that some areas are returned as darker than others. Since each individual shaded area is very small, this shows up as the grainy appearance you see above, rather than big splotches of dark or light.
One obvious solution in that case is to increase the number of samples. As you can see from the above image that can be very effective without a big increase in render time.
To reduce grain, increase the number of samples.
This will, inevitably, increase render time to some extent. In all cases it will be a trade-off between more samples for a higher-quality image versus the time taken to render it, and only the artist can decide the right balance for any project.
The branched path integrator will reduce grain at the expense of render time.
Increasing the number of samples is all very well, but is a rather brute-force approach. Cycles 4D offers another option: switch from simple path tracing to branched path tracing. (This is discussed on the render settings page and in the overview of path tracing.) If this is done, then with 4 samples the result for the above scene is this:
Which is almost as good with 4 samples as the simple path tracer and 10 samples, but is slightly slower.
Use light portals in interior scenes to increase samples and reduce noise.
If you are rendering an interior, it is likely that an important component of the lighting is coming from light outside the room entering through windows, doors, etc. You can reduce noise by increasing the number of samples by means of a light portal. These are discussed on the cyLight tag page.
Grain is easy to deal with, as shown above. Fireflies on the other hand are more tricky. Here is a scene with very obvious fireflies:
These occur because light is being reflected from the glossy surface of the sphere and the integrator has difficulty calculating the specular highlights. Similar results are seen with refractive surfaces.
In this case throwing more samples at the problem won't get rid of the problem completely. Here is the same scene with 40 samples rather than 10:
As you can see, the problem is reduced but not removed and it would take a very high number of samples to get rid of the fireflies, which would be prohibitive when rendering a long animation, for example. We need another strategy.
Blurring glossy reflections slightly will reduce fireflies.
The fireflies are created by reflection from the very glossy surface. Most materials aren't as perfectly reflective as that and there is normally some degree of blurring of the reflection. If we add a small amount of roughness to the glossy reflection the fireflies are greatly reduced:
This may not be possible in some materials, where you specifically want a mirror-like finish, but in others you will want some blurriness anyway.
Using the Filter Glossy control to blur glossy reflections
will reduce fireflies.
In fact, rather than setting a blur in each material, we can blur all glossy reflections in the scene. This is done using the Filter Glossy control in the render settings:
By default this is zero but if increased above zero will apply a blur filter to all glossy reflections. In this scene with the very simple lighting it doesn't quite work the way we would like:
As you can see, although the fireflies are gone, it has lost the reflection of the light and changed the reflections on the object, but in other scenes this is a useful control for fireflies.
Increasing the light
size will reduce and may abolish fireflies
One possible cause is the size of the light itself. In this scene the light is a point light with a size of 50 screen units, and you can see it reflected in the sphere. A small light makes it harder for the integrator to calculate highlights, so another possibility is to increase the light size. If we do that then these are the results (compare with the first image showing obvious fireflies):
As you can see, the larger light size reduces and if large enough abolishes the fireflies.
Turning off multiple importance sampling for a light will remove fireflies but also other important lighting components.
In the cyLight tag there is a switch named Multiple Importance Sampling. Turning this off will prevent the light being reflected in glossy materials and will remove caustics from that light, and this has the effect of removing fireflies from that light source:
Note that the light has disappeared from the reflective surface. This may or may not be desirable, depending on the scene. If there was a refractive surface in the scene, all caustics would be removed too, and more importantly the indirect lighting from the sphere has also been reduced. So this is not something to do lightly, but can be used to remove fireflies when you are really only interested in direct lighting and no caustics.
Turn off reflective and/or refractive caustics to remove fireflies from glossy or refractive materials.
Speaking of caustics, it may be clear by now that fireflies and caustics are intimately related. If we could turn them off, we might then remove the fireflies. In fact, Cycles 4D has two types of caustics, reflective and refractive, and you can turn them off in the scene with two switches in the render settings (see the screenshot above). In this case turning off refractive caustics will have no effect since there is no refractive material in the scene, but if we turn off reflective caustics we see this:
Which is pretty good, but remember that in many cases you will want those caustics! You will also lose indirect lighting from the sphere, which may be undesirable.
Use Clamp Direct and/or Clamp Indirect to control fireflies.
Fireflies are basically tiny areas that are rendered too brightly. It is possible to put a maximum level on how bright any rendered point can be, and it can be done separately for direct and indirect lighting. This is done via the Clamp Direct and Clamp Indirect settings in the render settings:
The value is the maximum permitted brightness and is quite important. Here's what happens if Clamp Direct is set to 0.01:
This has lost a lot of direct lighting but has made no difference to the fireflies, because in this scene the fireflies are due to reflections from the glossy surface. If we turn Clamp Indirect to 1 though, we see this:
In this scene that is pretty much what we want. In other scenes where indirect lighting was more important you risk making your scenes darker, so this value needs to be set carefully.
From the above you can see that there a number of ways to dealing with fireflies, and which one you choose will depend on the scene you want to render. Don't be tempted just to increase the samples to a huge number (though increasing samples may help in some cases); try the other methods until you find one - or more than one - which remove the fireflies without harming the scene lighting or greatly increasing render time.