Exporting , Rendering and Denoising outside of Blender - prman-pixar/RenderManForBlender GitHub Wiki

#Introduction# In some cases, a user may want to perform the actual rendering, texture compression and/or denoising process outside of the Blender application. The Renderman installation includes multiple command line executable programs, including the standalone PRMan renderer, the denoise denoiser, and the txmake texture creator.

Why would you want to render this way?

  • Scene uses too much RAM for both Blender and PRMan to run at the same time. Keep in mind that for PRMan to render from within Blender, it has to keep it's own copy of the scene in RAM in addition to Blender's. In some cases this can max out the available RAM on a users computer. Rendering through the PRMan executable allows you to shut down Blender and gain valuable RAM back.
  • It's faster. Rendering an .rib from the PRMan executable without Blender running is the fastest way to render a scene due to PRMan not having to communicate with Blender or the 'IT' image viewer while rendering. While the time saving may not be that significant for a frame or two, over the course of a hundred frame animation it adds up.
  • The denoise executable has options that are not accessible from within Blender. The denoiser has the ability to do cross frame processing, where it looks at the noise of the frames on both sides of the one it's currently working on. This allows it to tailor the noise reduction so that it blends better with those frames. As of now there is no way to select this option from within Blender.

Note: While the txmake executable was mentioned above, thanks to recent additions to the exporter virtually all of it's options can be accessed from within Blender.

#External Rendering Workflow#

  • Set Blender to render externally. This can be done by enabling the 'External Rendering' panel. You are given the choice to render locally (which essentially does the same thing as an internal render, just without locking up Blender),
    , generate .rib files only, or spool the render to an external queue manager (Tractor or Localqueue).
  • Export the .rib file(s) and any associated .alf render scripts by pressing the 'External Render' button.
    ** For Windows: Locate the PRMan executable. If you performed a default installation it will be located at C:\Program Files\Pixar\RenderManProServer-20.x\bin. Once you have located the .exe you can select all the .rib files and drag them onto the PRMan icon. It will then batch render the files one at a time.
    ** For Linux: Navigate to the PRMan executable through a terminal window. If you performed a default installation it will be located at \opt\pixar\RenderManProServer-20.x\bin. Linux does not have drag and drop capability so you will have to enter each filename individually or use some kind of script generator to do batch rendering.
    Commands to use to start rendering: ./prman -cwd (path to the directory the .rib files are in) (path to .rib file) (path to next .rib file) etc....
    ** If you chose to spool the render to a queue manager, please refer to that manager's documentation on how to render with it.
  • After PRMan finishes its rendering, you will find multiple images in the output directory you specified.

#External Denoising Workflow#

  • If you selected the 'denoise post process' button on the output tab, you will find a series of large EXR files in the same directory as your output images. These images contain a number of specialized Arbitrary Output Variables (AOV) that the denoiser needs. In order to manually use the denoiser, first create a .txt text file that has the path name of every EXR you want to denoise. For example, if you have 10 frames you want to denoise at C:/Program Files/Renderman you would enter the following into a blank text file:

    C:/Program Files/Renderman/frame_0001_variance.exr
    C:/Program Files/Renderman/frame_0002_variance.exr
    Etc......

  • Once this file is created save it to the same directory as your EXR files.
  • Navigate to the location of the denoise executable. It is in the same 'bin' folder as the PRMan executable.
  • Run the denoiser in batch mode with crossframe denoising on the image sequence:
    "denoise --crossframe -v variance -b on C:/Program Files/Renderman/(name of framelist file).txt" (without quotes)
  • After the denoiser has run on the images, a new set of image files will be created that have '_filtered' on the end of the filename. These are the resulting denoised images.

#Denoising AOV's# The denoiser can also work on color AOV outputs aside from the main RGBA beauty pass (it will not work on data AOV's). In order for this to work, the output channels have to have specific names relating to the image type they contain. The exporter will automatically ensure that the channels are named correctly, but you must enable a few options first. In the render layers panel there is a section for render passes. You first have to enable the "Use Renderman AOV's" button. After that you can add additional AOV's to the output file. Each AOV that is able to be denoised has an option called 'format for denoising'. Make sure this is enabled. Once you render out your files, you'll have the main .variance EXR file and another file for your AOV. Run the denoiser manaully using the steps listed above, but substitute this command instruction instead:
"denoise --override filterLayersIndependently true -- (image output).variance.exr (AOV file).exr"

The steps to use the denoiser are the same for Linux, just use Linux paths in place of the Windows ones.

⚠️ **GitHub.com Fallback** ⚠️