Houdini Quick Tip: RenderMan Denoiser in Karma XPU (Patreon)
Content
February 16, 2025 update: I posted a follow-up article showing how to denoise Karma LPE AOVs. Check it out here: https://www.patreon.com/posts/122375393
September 7, 2024 update: I added a couple of items at the bottom of the article that get Karma's behavior even closer to RenderMan defaults. Check it out!
Many might not know this, but Houdini's Karma renderer supports RenderMan's incredibly good denoiser. It was CPU-only before, but now, with the release of Houdini 20.5, Karma XPU can also export the required AOVs. The results are stunning: you can expect ultra clean renders in 10-20 seconds. Here's how to set it up!
First, you'll need to have RenderMan installed. Download it here. (The free non-commercial version works for this if you just want to try it out.)
Next, in your Solaris scene you'll need three nodes at the end of your tree: a Karma Render Settings, a Labs Karma AOVs for RenderMan Denoiser and a USD Render ROP. Connect them as follows:
Note that the Karma AOVs node has an unlocked icon. This is important: right click on the node and select Allow Editing of Contents. Then, double click to dive in. Locate the Beauty render variable node and disable it:
Go back to the top level, point the Karma AOVs node to your USD Render ROP and click the very wide button:
Next, we'll want to change two parameters in the Karma Render Settings node. Enable Import Render Vars From Second Input and disable the Beauty layer:
That's the main configuration needed. For some reason the denoiser fails if there is a beauty layer present. Using the default RenderMan denoiser settings in Maya or Blender will output a beauty-free EXR, so we need to reproduce that behavior in Houdini.
Before rendering, you'll also want to sent up your resolution, output file name, render settings, and more as you normally would. Keep the samples low since we want a fast render. I found 64 samples worked well in my test scene. Plenty noisy, but enough detail to yield a nice denoised result. Once you've got everything ready, select the USD Render ROP and click the Render to Disk button.
Here's a closeup of my test render at 64 samples and 36 second render time:
Too much noise! Let's fire up RenderMan's denoiser and work some magic.
Navigate to your RenderMan install folder (something like C:\Program Files\Pixar\RenderManProServer-26.0\bin), right click on denoise.exe and select Run as administrator. (It doesn't pick up the license correctly with only user permissions on my computer, but you might not need to do this step.)
In the denoiser GUI, add the directory containing your Karma render and select an output folder. Note that I had to disable the Alpha option as well. I think the alpha layer was removed when turning off beauty in Solaris. It would have to be added back manually if you had an alpha matte that you needed preserved, but I didn't for this test. (September 7, 2024: the alpha channel should now be working! See the update at the end of the article.)
Click the start button and after a few seconds a denoised image should appear in your output folder.
Spectacular!
Remember that the original render only took 36 seconds. In order to get a similar noise level through brute force sampling I had to push samples up to 1000, resulting in a 585 second render time. Denoising reduced render time by 94%!
I also tried just 16 samples, which make for an extremely noisy image:
The RenderMan denoiser makes a valiant attempt, but it doesn't have enough detail to work with and the final image is too blurry:
The result from 64 samples seems just about perfect to me, but you'll need to dial it in to fit your specific scene. Things like hair and motion blur might require more samples, for example.
Sept 7, 2024 Update
Member Gabriel provided a working alpha channel LPE. Disable the existing a Render Var and add this one instead:
We can also update Karma's AOV grouping to match RenderMan. RenderMan puts a, sampleCount, zfiltered and zfiltered_var under the default group, as shown here:
We can accomplish this in Karma by finding the a, sampleCount, zfiltered and zfiltered_var Render Vars in Solaris, opening the Husk tab and adding a Channel Prefix with the appropriate name to each:
Making these changes will match the default RenderMan output and the denoise tool should run exactly as it does with a RenderMan render.
Conclusion
RenderMan's denoiser is truly a marvel and I think it's one of the greatest technological advancements in recent memory. It's a major advantage to now be able to use it with Karma XPU!