How to utilize the denoise passes to build a denoise node network in the compositor

I've built custom denoising node networks before in houdini's compositor, using raw passes combined with noise reduction nodes, but I'm not sure how to utilize the various blender denoiser passes to clear up noise per render pass.

Is it even possible? Any tips would be greatly appreciated as this would mean I could tweak denoising settings without having to re-render, and also that I could have different settings per pass, such as high denoising for the diffuse indirect pass, but not the reflection indirect pass for example.

• If you are asking how to correctly combine all the render passes, this question should be able to help you: blender.stackexchange.com/questions/80469/…. – Mike Pan Jan 29 '19 at 7:44
• not really, I'm asking if it's possible to recreate the densoiser using compositor nodes, utilising the denoiser passes. – user3597862 Jan 29 '19 at 16:56

Denoising Data Passes

The Denoising Data option in experimental builds and experimental render feature set currently enables some denoising passes, however they are meant to be for an animation denoising feature that is currently still being designed. They are not meant to be recombined or used for anything else then for the feature as you can see explained in the devtalk forums by Brecht Van Lommel:

It’s intended for the upcoming feature of animation denoising, where denoising happens in a post processing pass ones all the frames have been rendered. It doesn’t really have a purpose outside of that.

Removing Noise with Bilateral Blur Node using Compositing Nodes

It is however possible to remove some noise using compositing nodes. That requires recombining the passes to the final result by adding direct and indirect, multiplying them by color and adding all of the results of this for Diffuse, Glossy, Transmission and Subsurface together. You would also need to add Emission and Environment. Color Mix Nodes can be used for this. See this image from https://en.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes:

To de-noise certain noisy passes you can use Bilateral Blur node. It blurs an image and uses a Determinator image to determine what edges not to blur. Basically the Determinator needs to be an image that has single solid colors or smooth gradients in the areas that need to be blurred, but if the areas differ in color and there is a sudden change on edges, they will be blurred separately and an edge between them will remain sharp. There are many ways to make this Determinator image so some testing and playing around to see what works better for your purpose will be needed, but you can add or subtract different kinds of passes to get it. Object and Material Index passes can be use for this. You can quickly give all materials and objects unique pass indices with Python:

import bpy

for i,m in enumerate(bpy.data.materials):
m.pass_index = i
for i,o in enumerate(bpy.data.objects):
o.pass_index = i


or you could set them manually as well. You can sometimes use color passes as well to get good results. Normal pass is often very useful for this as well. See the documentation for Bilateral Blur node

You would also need to play around with the settings of Bilateral Blur nodes to see what works best in your case.

This would look something like this if done for indirect Glossy and Diffuse passes that happen to be the noisiest in my example scene:

Sometimes Direct passes may be noisy as well - you should see what the case is in your scenes.

• There are denoising data passes since 2 or 3 weeks, check out the latest builds. – p2or Jan 30 '19 at 9:23
• That would be great. I will however assume 'currently' means the latest release in my answers, unless asked specifically about the experimental builds. The latest release currently is 2.79b. There are no de-noise specific passes in it. I cannot see any de-noise passes in 2.80 yesterday's build as well to be honest. Could you clarify what you mean? One can choose what passes de-noising uses, but as far as I can tell there are no actual render passes from the de-noiser. Am I missing something? – Martynas Žiemys Jan 30 '19 at 9:30
• In 2.79 daily builds there is Denoising Data checkbox – Serge L Jan 30 '19 at 11:22
• hmm, or perhaps the code could be ported directly into a compositor node. Would save a ton of guesswork and re-rendering if the denoiser could be interactively tweaked in post. – user3597862 Jan 31 '19 at 19:39
• not to mention the parameters could be animated to cater for different levels of noise in different sections of the animation. – user3597862 Jan 31 '19 at 19:49