Being that my current machine isn’t nearly as meaty when it comes to processing as I’d like – and doesn’t have a graphics card that is compatible with Cycles GPU rendering – I’m always looking for ways to improve performance when rendering in Cycles. Blender Guru has a post worth checking out, 4 Easy Ways to Speed Up Cycles, but I’d like to mention a simple technique I’ve just recently discovered, using the Clamp setting.
This example is still a work in progress, but is suitable for demonstrating the use of Clamp. (You can view the final image here in my portfolio.) The scene is lit by two emitter planes and a HDRI map. The bounces are already set to pretty conservative levels, but it’s till firefly city. Here’s a render after 2642 samples with Clamp set to 0, using progressive refine so the whole image renders at once (I won’t tell you how long it took on my computer, it’s a little embarassing.)
In the Render panel, under Sampling, there is an option called Clamp (more on the particulars of what this does below.) By setting the “Clamp” to 2, this is the result after 1363 samples.
You’ll notice that the image is a little dimmer and duller, the colors are less vibrant. That is easily fixed in the compositor with a simple Color Balance node. I essentially want to increase the contrast and brighten the image. Also, might as well do a little color correction while we’re at it.
With a little post-processing, an image that is less muddy. I’ve reversed the dimming effect of Clamp and added some flair to the image that I would have done anyway, at the same time. A bit more refinement of the image is a good idea, but this illustrates the basic point.
So, utilizing the Clamp setting, I was able to get a render that is virtually noise-free in about half the render time. You’ll have to experiment to find a Clamp value that balances render time and image quality for each scene. Remember that using clamp will dim the image (particularly the highlights) but that is usually fixed pretty easily with some post-processing. (You’ll notice the paper on the mini notebook has blown out a bit, this can be fixed by making the texture darker.)
Why Use Clamp
For more detail on Clamp, as well as other noise reduction techniques, explanations on how they work and what causes noise in the first place, I suggest checking out this page in the Blender Wiki. Briefly, Clamp caps the value of each sample, easing fluctuations from pixel to pixel. This obviously reduces the physical accuracy of the final image and dulls the brighter highlights, but these issues are usually either negligable or easily corrected.
I chose to use Clamp over using Filter Glossy or other techniques to reduce noise in this render for three main reasons:[list icon=”plus”]
- It’s faster, easier and more effective at noise reduction over the entire image
- Given the amount of glass and liquid as well as their prominence in the image, I wanted to preserve the accuracy of those light interactions as much as possible
- It doesn’t involve making adjustments to individual elements or shaders
Disabling caustics removes entirely a real physical effect of light (though it often doesn’t appreciably diminish the quality of the image and is a good idea to use in conjunction with setting a Clamp value), while Filter Glossy forces a reduction in sharpness. With Clamp, the inaccuracy is mostly in the intensity of highlights.