10
$\begingroup$

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.

This is what the console did, which looked like it worked!

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?

$\endgroup$
4
  • $\begingroup$ Recommend using intels ai denoiser in the compositor (denoise node), which gives way better results anyway Type of Denoiser built into Blender. $\endgroup$
    – brockmann
    Commented Jun 9, 2020 at 8:56
  • 2
    $\begingroup$ 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. $\endgroup$
    – Blazer003
    Commented Jun 9, 2020 at 9:01
  • $\begingroup$ 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. $\endgroup$
    – brockmann
    Commented Jun 9, 2020 at 9:46
  • $\begingroup$ I have research about this denoiser, why you have decided that it is temporal? It is usual one. $\endgroup$
    – Crantisz
    Commented Oct 24 at 13:32

3 Answers 3

12
+250
$\begingroup$

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)
  3. Render your animation

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.

enter image description here




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

enter image description here




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

$\endgroup$
12
  • 1
    $\begingroup$ Why doesn't this work with 2.9x? Is there a way to make it render the denoise data? $\endgroup$
    – Legoman
    Commented Nov 1, 2020 at 0:14
  • $\begingroup$ 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. $\endgroup$ Commented Nov 1, 2020 at 6:29
  • 1
    $\begingroup$ @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 $\endgroup$ Commented Dec 3, 2020 at 6:00
  • 1
    $\begingroup$ 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... $\endgroup$ Commented Dec 3, 2020 at 17:08
  • 1
    $\begingroup$ Do you need to render a couple of pre and post frames in order for it to have enough to denoise? $\endgroup$ Commented Apr 16 at 3:02
5
$\begingroup$

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.

I used it and it works perfectly well. You can download it from GumRoad for free/donation: https://gumroad.com/l/SuperImageDenoiser

Good luck!

$\endgroup$
2
  • $\begingroup$ Great, thanks for sharing :) $\endgroup$ Commented May 15, 2021 at 12:12
  • $\begingroup$ I'm having issues with this on Blender 3.0 . Anyone else having this problem, and know the fix? This is the error i'm getting -> KeyError:"bpy_prop_collection[key]: key "Noisy Image" not found" $\endgroup$
    – kiblykat
    Commented Jan 13, 2022 at 4:26
1
$\begingroup$

I think that for the bpy.ops.cycles.denoise_animation() command to work properly, you also need to enable the vector pass. Otherwise you get pretty much the same pattern with the regular denoiser. Try that and see if you see any changes in the denoised result.

Check this article in the Features section:

https://wiki.blender.org/wiki/Reference/Release_Notes/3.1/Cycles

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .