- It was CPU-only before, but now, with the release of Houdini 20.5, Karma XPU can also export the required AOVs
- Better result with 20.5
## Workflow
1. Add Karma AOV for PRMAN node, select USD ROP inside prism lop render node
2. Click set Usd render Rop...
![[file-20241124012404173.png|500]]
3. Allow editing of content / dive inside / disable Beauty
4. Karma render settings : ![[file-20241124005316068.png]]
## Deadline Fix
### USD render rop in legacy mode
- #### **What Does EXR Legacy Mode Do?**
The `--exrmode 0` setting modifies how EXR files are written by **Husk**, the renderer responsible for processing USD renders in Houdini.
Enable Legacy EXR Mode
When saving OpenEXR images with multiple AOVs, `husk` will normally save the images using multi-part EXR files. This extension (introduced in 2013) lets programs read a single AOV without having to read the entire image. This allows most software to work much more efficiently.
Some applications have not transitioned to support multi-part images. If your pipeline uses software that doesn’t support OpenEXR v2.0, this option will force `husk` to write out images in an inefficient, but more compatible format.
1. **Disables EXR Optimizations in USD/Husk**
- By default, USD **optimizes EXR output**, using settings that are **not compatible** with the Pixar **RenderMan denoiser**.
- These optimizations may change how **AOV channels** are stored, which can break denoising.
2. **Ensures Proper AOV Naming and Format**
- RenderMan's denoiser expects **multi-channel EXR files** with a specific structure.
- Legacy mode ensures that AOVs are stored in a **standardized EXR format**.
- This avoids issues where AOVs might be **separated into multiple files or saved in an incompatible layout**.
3. **Improves Compatibility with Third-Party Denoisers**
- The **RenderMan denoiser** is designed to work with a traditional EXR format.
- If EXR Legacy Mode is **not enabled**, the denoiser may **fail to recognize** some AOVs, leading to artifacts or incorrect denoising.
### HUSK
#### **Is Husk based on Hydra and is it executing it under the hood?**
Husk renders a USD file using a Hydra client, such as Karma or Arnold. The Husk renderer is a stand-alone tool shipped with Houdini which can be used for batch rendering with any Hydra delegate.
## AOV needed
To denoise the beauty it is required to provide those AOVs to the denoiser:
- beauty
- beauty variance
- albedo
- normal
- z/depth
## With Karma
- NODE :
Labs has an HDA to create all the necessary AOVs for the renderman denoiser ( Labs Karma AOVs for Renderman Denoiser). If you use that when rendering, you should be able to run the denoiser on your Karma renders.
- USE :
For the denoiser to work properly, you need to enable the legacy EXR mode. To do so, point **USD Render ROP** to a [USD Render ROP](https://www.sidefx.com/docs/houdini//nodes/lop/usdrender_rop.html) node you want to use, and then press **Set USD Render ROP to Legacy EXR Mode**.
Alternatively, you can go to the USD Render ROP node and use the husk command line option `--exrmode 0`.
Tip
Connect this node’s output to the second input of a [Karma Render Settings](https://www.sidefx.com/docs/houdini//nodes/lop/karmarenderproperties.html) node. The example file below can help you set this up correctly.
Note
The Pixar RenderMan denoiser requires the file name to contain a frame number, e.g.: `$HIP/$HIPNAME.$OS.$F4.exr`.
# Optical Flow
### **When Should You Use the Optical Denoiser?**
- When dealing with **motion blur or depth of field**, as it performs better than the standard denoiser.
- If you don’t want to bother with **Albedo and Normal AOVs**.
- For **fast turnarounds in animation** where per-frame consistency is critical.
If you need high-quality noise reduction **with preserved shading information**, the **Optical denoiser is the best choice**. However, if you have clean Albedo and Normal AOVs, the traditional denoiser may still work well.
### **Comparison: Optical vs. Standard (Albedo/Normal) Denoiser**
|Feature|Optical Denoiser|Standard Denoiser (Albedo/Normal)|
|---|---|---|
|**Method**|Machine learning|Traditional denoising using Albedo & Normal AOVs|
|**Works Without AOVs?**|✅ Yes|❌ No (needs Albedo & Normal)|
|**Handles Motion Blur & DOF?**|✅ Yes|❌ Struggles with these|
|**Detail Preservation**|✅ Better (AI-based training)|⚠ Can sometimes blur fine details|
|**Ideal Use Case**|General renders, animations, and complex lighting|Static images with clean auxiliary passes|
# Custom ARTFX Solution
- We are using a custom Tool made by Theo Saminadin to be able to denoise LPE, AOVs on demand with renderman locally.
https://drive.google.com/file/d/1W3cXzXhH4AmktENkJv4joXpsu9oOQgJq/view?usp=sharing
```embed
title: "Google Drive: Sign-in"
image: "https://www.google.com/favicon.ico"
description: "Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use)."
url: "https://drive.google.com/file/d/1W3cXzXhH4AmktENkJv4joXpsu9oOQgJq/view?usp=sharing"
```
## To go further :
- We need to put this tool on deadline
# Custom Json config and LPE Denoising
### Ressources :
https://rmanwiki-26.pixar.com/space/REN26/19660985/Denoise+JSON+Config
https://rmanwiki-26.pixar.com/space/REN26/19660959/Advanced+Denoise+JSON+Config
Full video : https://drive.google.com/file/d/1smIS-ZvsyulSxmY-I7m737Ec_2Lypeau/view?usp=sharing
CMD :
```cmd
Premiere etape :
cd C:/Program Files/Pixar/RenderManProServer-26.3/bin/
Deuxieme etape :
denoise_batch --json "V:/_PIPELINE/PrMan/TWK/LPE.json"
```
JSON :
```json
{
"primary": [
"V:/TWK/03_Production/Shots/SQ0040/SH0150/Renders/3dRender/LOP_PrMan_LPE/v0003/beauty/TWK_SQ0040_SH0150_lightBlocking_LOP_PrMan_LPE_v0003_beauty.####.exr"
],
"aux": {
"diffuse": [],
"specular": [],
"albedo": [],
"irradiance": [],
"alpha": [],
"color": [
{
"paths": [
"V:/TWK/03_Production/Shots/SQ0040/SH0150/Renders/3dRender/LOP_PrMan_LPE/v0003/beauty/TWK_SQ0040_SH0150_lightBlocking_LOP_PrMan_LPE_v0003_beauty.####.exr"
],
"layers": [
"C_LPE_TAG_BG_01",
"C_LPE_TAG_BG_02",
"C_LPE_TAG_BG_03",
"C_LPE_TAG_BG_04"
]
}
]
},
"config": {
"asymmetry": 0.0,
"flow": true,
"debug": false,
"output-dir": "V:/TWK/03_Production/Shots/SQ0040/SH0150/Renders/3dRender/LOP_PrMan_LPE/v0003/beauty/FILTERED",
"passes": [
"color",
"alpha"
],
"parameters": "C:/Program Files/Pixar/RenderManProServer-26.3/lib/denoise/20973-renderman.param",
"topology": "C:/Program Files/Pixar/RenderManProServer-26.3/lib/denoise/full_w1_5s_sym_gen2.topo"
}
}
```