# How to denoise animations using Blender's Temporal Denoiser?

I've been diving into the secret Blender Animation Denoiser function mentioned in February of 2019 by Pablo and documented on the Developer Site.

Here are some things I figured out after digging around:

1. When you render for the animation denoiser you have to use OpenEXR Multilayer.
2. I then enabled denoising within the Blender view layer settings panel, like instructed.

My code looks like this:

bpy.ops.cycles.denoise_animation(output_filepath="//Render\Denoised Sequence\Denoised_Images_")


After hitting enter on the above command, it worked!!!!.... except it didn't.

It went through the process of creating the images of the new denoised sequence. But when I open the files... they are not denoised. Simply exact copies of the original noisy images.

So close, yet I don't know where to go from here. Any ideas?

• Recommend using intels ai denoiser in the compositor (denoise node), which gives way better results anyway Type of Denoiser built into Blender. – brockmann Jun 9 '20 at 8:56
• It may, however the potential beauty of this denoiser workflow is that it is temporal. It will scan across multiple frames and denoise in a way that will eliminate flickering between frames, which is currently a problem that I run into with either of the frame denoiser options in Blender now when rendering animations. I haven't actually seen results from the animation denoiser to compare, so I can't know for sure which is better, but I can say that denoising on some of my scenes with the frame denoiser just gives too much flickering effect, at least for my taste. – Blazer003 Jun 9 '20 at 9:01
• Can confirm. Blender crashes on the last frame and the "combined" pass in the resulting exr files shows exactly the same as the "noisy image" pass. Suggest to file a bug report. – brockmann Jun 9 '20 at 9:46

## How to use the Temporal Denoiser

Step 01: Pack Denoising Data

1. Enable denoising data in View Layer > Passes > Denoising Data
2. Set file format to OpenEXR Multilayer (so Blender packs the denoising data)

Note:
Blender 2.8 needs to be used in the pipeline to pack the denoising data. Simply open your .blend with Blender 2.8, set up the denoising data and save. Then you can reopen the file and render with any version.

Step 02: Denoising

import bpy
import os
import glob

inputdir="D:/Animation/"
outputdir="D:/Animation/Denoised_"
os.chdir(inputdir)
myfiles=(glob.glob("*.exr"))
for file in myfiles:
print(inputdir + file + " to " + outputdir + file)
bpy.ops.cycles.denoise_animation(input_filepath=(inputdir + file), output_filepath=(outputdir + file))


1. Copy the above script into Blender's Text Editor (and backup your animation files :)
2. Change the location to where your rendered files are. The default location is D:/Animation/
3. Run the script by pressing the Play button

Notes: The used code is from this Reddit thread. All credits to toadfury.

• Why doesn't this work with 2.9x? Is there a way to make it render the denoise data? – Legoman Nov 1 '20 at 0:14
• Hey, good news :). I re-rendered the animation with 2.9 and Denoising seems to work just fine now. Must've been some hiccup in the previous render. – Jachym Michal Nov 1 '20 at 6:29
• I tried this code on several different versions of Blender but I don't see any differences at all. Are there specific versions of Blender that work/don't work? Or was there anything else that you found that made it not work properly? – Alex Pearce Nov 23 '20 at 0:12
• @JachymMichal Were you able to test it? I just realized that link expired, this one won't expire for a month. dropbox.com/t/qDfMgJY94Nyhi8T5 – Alex Pearce Dec 3 '20 at 6:00
• Hey @Alex, just tested your addon! It works perfectly for denoising my files. However I can't get it to output files containing denoise data :). Not currently sure why... – Jachym Michal Dec 3 '20 at 17:08

I also struggled to get this working on 2.9x - until I found this! The Super Image Denoiser (SID) is a free add-on that employs temporal denoising. It produces high quality results using a similar process as the one described above, except with easy buttons instead of script. It also well offers customization to compensate for artifacts.