Page 1 of 1

console denoise save file

Posted: Fri Jun 01, 2018 1:15 am
by zukazuka
When rendering from console ("batch render script") I select denoise on:

Code: Select all

The render is denoised but the result is saved as a separate pass "DENOISED" pass - it seems when I save image via:

Code: Select all['Render Result'].save_render("out.png")
It only saves the "Combined" pass but not the Denoised image.

I haven't tried to figure out how to combine the passes via python - I thought I would ask first to see what your suggestion is to save the "DENOISED" pass when rendering from a command line batch render script?

Re: console denoise save file

Posted: Fri Jun 01, 2018 7:37 am
by B.Y.O.B.
You can save as multilayer EXR, this contains all the passes.
However it can only be opened by very few programs (one of them Blender).

Another option is to create a small compositing node setup where you pipe the outputs that should be saved into a file output node: ... /file.html

Re: console denoise save file

Posted: Sun Jun 03, 2018 3:38 am
by zukazuka
Here's what I wrote so far (seems to be working).

This script will save the denoised result automatically so if you are rendering on a server or batch processing - you can save the denoised version automatically:

Code: Select all

import bpy

scene = bpy.context.scene

# make sure we have node tree
if scene.node_tree==None:

#if denoiser not enabled = no denoiser node output, so make sure it's enabled    

if scene.node_tree:
    nodes = scene.node_tree.nodes

    # remove previously auto created denoise nodes to prevent duplicates
    for node in nodes:
        if node.label==auto_denoise_output_label:

    render_layers ="CompositorNodeRLayers")

    output_file ="CompositorNodeOutputFile")
    output_file.base_path = "/home/me/blender_output_path/"