Combining Temporal Denoising and Spatial Denoising in Blender

Temporal Denoising Toolkit

I have created a Node Group for Blender which allows you to perform "Temporal Denoising".  The Node Group is available for free from Gumroad and you're welcome to tweak or customise it as you wish.

Temporal Denoising is where multiple frames are intelligently combined to reduce image noise.  It should be combined with the traditional Spatial Denoising provided by OpenImageDenoise.

Temporal Denoising is designed for use in animations.  It's main strength is reducing flickering between frames.  Even when you crank up the number of samples for Spatial Denoising there can still be flicking since the denoiser has no way of knowing if there consistency between frames.

I have a detailed video that explains how the Temporal Denoising works under the hood, and the configuration/operation.

However this video doesn't provide examples showing how to combine Temporal and Spatial Denoising.

Spatial Denoising before Temporal Denoising

In the example shown here the three source frames (previous, current, next) are separately spatially denoised, then the combined by the temporal denoiser.

Temporal Denoising before Spatial Denoising

In this example temporal denoising is performed first to blend the three source frames (previous, current, next), then the output is passed through the spatial denoiser.

Note that the Denoising Albedo and Normal passes are only required for the current frame.

Which is better?

The short answer is - "It depends".

You really need to try both and work out if there is any benefit or artefacts introduced using one technique.

When you're using a low number of samples and therefore more at risk of flickering between frames, performing the spatial denoising first could smooth out the (noise) details and actually increase the flickering.

On the other hand, running the spatial denoising first means that it's operating on the original frames and potentially has better source material to work with.

In terms of raw speed, running temporal denoising first will be quicker since the spatial denoising is only performed once.

Use with Multiple Render passes

The Blender Manual describes how to render out the raw render passes then merge them later.

This technique allows you to perform denoising on each Direct/Indirect lighting pass.  That can be more effective at spatial denoising.

Often you can disable denoising on specific passes (such as Emission and Environment) to retain more detail.

Given the large number of passes to work with, my recommendation would be to use spatial denoising on each render pass, then use temporal denoising on the combined result.

You could create a Node Group that combines the Indirect, Direct and Color components like this.

This would apply to Diffuse, Glossy and Transmission passes.

Emission and Environment may not need spatial denoising.

Volume denoising would be similar, just without having to multiply the Color.

Once you add all the outputs together to create the Combined output (for the three source images) then you could combine using temporal denoising.

As you can see there is a lot of complexity and the compositor processing will be very slow.  (Not to mention the enormous file sizes.)

Use with Multiple Light Group passes

Another way of approaching this is to render out each Light Group separately.

Light group passes are combined by simply adding them together.  However you can override the lighting intensity for individual light groups after your render - for example to dim the interior lights and increase the light from outside.

Each light group can be denoised separately using spatial and temporal denoising.  Once again it would probably be easiest to use spatial denoising before temporal denoising - though it could depend on the number of lights in your scene.

Comments

Popular posts from this blog

Resolving FOSCAM connection dropouts

Building an automatic chicken door opener

TVersity media serving to the Astone AP-300