TD Vault Notes on Programming for Animation & VFX

By Jonah J. Newton

PhotoRealistic RenderMan - Setting Threads for denoise_batch

Pixar’s PhotoRealistic RenderMan 25+ denoise_batch executable unfortunately does not provide an argument to set the number of threads to use when denoising images, and as such, it uses all CPU threads on the computer it runs on. This makes it very hard to manage denoise_batch jobs on a render farm without setting aside specific machines/blades specifically for denoising. However, there is a workaround.

Setting the OMP_NUM_THREADS environment variable allows us to tell OpenMP (the multiprocessing library used by denoise_batch) how many threads to use.

Examples

The following examples will set OMP_NUM_THREADS to 12 on different platforms, telling the denoiser to use 12 threads. You can substitute 12 with any integer.

Windows

set OMP_NUM_THREADS=12
denoise_batch [args]

Linux/macOS

export OMP_NUM_THREADS=12
denoise_batch [args]

Whether you’re going for photorealistic RenderMan renders or stylised looks, the denoiser is world-class for cleaning up renders and is used in studios all over the world. I hope this tutorial helps individual users and studios alike utilise the PhotoRealistic RenderMan denoiser at scale.