Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Before After Image Slider

96 samples per pixel, before and after denoising


  1. Prman Globals Settings

    Turn on importance sampling for the raytrace hider's pixel filter mode. This will eliminate splotchiness in the render.


  2. PrmanDenoiseChannelDefine

    Create a PrmanDenoiseChannelDefine node which is a macro for creating all the specific DisplayChannels required for the denoise utility.

  3. PrmanDenoiseRenderOutputDefine

    Create a PrmanDenoiseRenderOutputDefine node which is a macro for rendering a multichannel OpenEXR file for the beauty pass combined with the AOVs.

    If your pipeline does not support multichannel EXR, you can use $RMANTREE/bin/exrmerge to combine the AOVs into a multichannel EXR. Then use this merged multichannel EXR for the denoise utility. Note that each AOV's type should be set to "raw" because this preserves the channel name in the EXR which the denoise utility will look for. Combined EXR using Katana's RenderOutputDefine's merge will not work with the denoise utility.
  4. Running Denoise Via RenderOutputDefine Script (Single Frame)

    Create a RenderOutDefine. Wire this node to the previous RenderOutputDefine node. Select script for the type, select primary for the scriptInput, and set the scriptCommand to the following:

    Code Block
    $RMANTREE/bin/denoise $INPUT

    By default, it will write out <image>_filtered.exr. This can be changed by specifying -o. Run denoise -help for more information on other denoise utility options.


In the above example we include "vector forward" and "vector backward" for completeness. These are only used (one or the other or both) for for cross-frame denoising denoising but not for a single frame. If only one exists, the Denoiser assumes the opposite vector for the missing direction. If neither exists, it will still operate but in a limited capacity.

The denoise utility expects a multichannel OpenEXR with the exact channel names given here.  Channel Channel names may be [Ci.r Ci.g Ci.b Ci.a] or [R G B A] as specified in the EXR. Denoising are Light Path Expressions are used to separate the diffuse and specular components and to retrieve the unlit albedo colors for the materials. The statistics parameters are used to request that prman produce images that estimate the variance or the error in the linked image. The forward and backward channels are not strictly necessary here, but become useful when filtering image sequences with motion blur.

For the albedo,   U2, or user lobe 2 is the default routing for albedo from the standard standard Pxr materials. The actual number is determined by the the rendermn.ini file file and can be changed to anything from 1 through 8 if your site uses custom shaders that assign LPE lobes differently.


  • The master image that contains all of the common channels (configured as above for the basic denoising) must have a file name that ends in either _variance.exr or .variance.exr.
  • The pass images can be named anything else, but by default must have color channels named one of:

    • diffuse
    • specular
    • directdiffuse
    • directspecular
    • directDiffuse
    • directSpecular
    • indirectdiffuse
    • indirectspecular
    • indirectDiffuse
    • indirectSpecular

    These may be optionally suffixed with a matching suffix to distinguish the different passes for a frame (e.g., directdiffuse_11235_a_moose_once_bit_my_sister). Combined diffuse and specular components can also be placed in matching channels named emission (e.g., directdiffuse_foo17 plus  plus directspecular_foo17 in  in directemission_foo17), in which case the denoiser will also produce the filtered summation.  If the default prefixes in the list above do not suit you, you can edit them in the the layergroups section  section of the installed installed default.filter.json file file.

Note that the number of files and their order must match. The denoise utility divides the non variance images by the number of variance images to determine how many sets there are.


Code Block
$RMANTREE/bin/denoise --crossframe --override filterLayersIndependently true --
image_variance.{5,6,7}.exr diffuse_key.{5,6,7}.exr specular_key.{5,6,7}.exr

Once this is done, the images can be given to the denoiser. For best results, you will probably want to use an additional option to filter the layer independently, e.g.:

Using Katana

In Rfk, the setup is similar to the process for the beauty pass in addition to appending the AOVs in the renderSettings' scriptCommand. In this example, diffuse_key.#.exr is the diffuse AOV for the light group "key":


Code Block
$RMANTREE/bin/denoise --override filterLayersIndependently true -- $INPUT diffuse_key.#.exr

Cross Frame

Code Block
'$RMANTREE/bin/denoise  --crossframe --override filterLayersIndependently true --'
    +' image_variance.'+str(int(frame)-1)+'.exr'
    +' image_variance.'+str(int(frame))+'.exr'
    +' image_variance.'+str(int(frame)+1)+'.exr'
    +' diffuse_key.'+str(int(frame)-1)+'.exr'
    +' diffuse_key.'+str(int(frame))+'.exr'
    +' diffuse_key.'+str(int(frame)+1)+'.exr'


Single Frame

Code Block
denoise --override filterLayersIndependently true -- master_variance.exr light0_dir.exr light1_indi.exr


Code Block
denoise --crossframe --override filterLayersIndependently true --
        master_variance.1.exr master_variance.2.exr master_variance.3.exr
        light0_dir.1.exr light0_dir.2.exr light1_indi.1.exr light1_indi.2.exr