Auto Light Shuffle
Auto Light Shuffle builds a clean Foundry Nuke node graph from Blender light-group AOVs stored in a multilayer EXR. It detects the available passes from a selected Read node, creates the required Shuffle nodes, reconstructs each light with a balanced layered Merge tree, and combines all lights into a final Beauty output.
Key Features
- Automatic Light-Group Detection: Detects light groups directly from the selected
Readnode. - Finest-Granularity Priority: Prefers the finest available AOV representation for each light:
- Direct and indirect material lobe passes (
<lobe>_direct_<light>,<lobe>_indirect_<light>); - Material-lobe passes (
<lobe>_<light>,RGBA_<lobe>_<light>); - Combined fallback passes (
Combined_<light>,RGBA_<light>).
- Direct and indirect material lobe passes (
- Balanced Layered Merge Trees: Builds a balanced, multi-level
Mergetree inside each light group and combines all light groups through a readable Beauty merge chain. - Clean Organization & Backdrops: Sorts light groups by AOV granularity then alphabetically, and wraps each light group in a labelled grey
Backdrop. - Alpha Preservation: Preserves the original alpha channel through
CopyandPremultnodes. - Nuke Version Compatibility: Uses
Shuffle2andMerge2when available, with legacy-node fallbacks, and aligns nodes using real GUI dimensions reported by Nuke.
Supported AOV Names
| Format | Example | Priority |
|---|---|---|
<lobe>_direct_<light> | diffuse_direct_key | Highest |
<lobe>_indirect_<light> | glossy_indirect_fill | Highest |
<lobe>_<light> | transmission_rim | Medium |
RGBA_<lobe>_<light> | RGBA_specular_rim | Medium (legacy) |
Combined_<light> | Combined_key | Fallback |
RGBA_<light> | RGBA_emissive | Fallback |
Supported lobes include diffuse, glossy, specular, transmission, and volume.
Requirements
- Foundry Nuke with Python support (tested with Nuke 13 and 14).
- A Blender-rendered multilayer EXR containing light-group AOVs (from Lightgroup Lobe Passes or Industrial Light AOV Splitter).
Installation
Copy these files from the GitHub repository into the
pythondirectory inside your Nuke user folder:textnuke_blender_autoaov.py settings_default.pyTypical locations:
textWindows: %USERPROFILE%\.nuke\python macOS: ~/.nuke/python Linux: ~/.nuke/pythonAdd the
pythondirectory in~/.nuke/init.py:pythonimport nuke nuke.pluginAddPath("./python")Add a menu command in
~/.nuke/menu.py:pythonimport nuke_blender_autoaov industrial_menu = nuke.menu("Nuke").addMenu("Industrial") industrial_menu.addCommand( "Auto Light Shuffle", "nuke_blender_autoaov.shuffle_and_combine_light_groups()", )Restart Nuke.
Usage
- Create or select the
Readnode containing the Blender multilayer EXR (only one source node should be selected). - Run Industrial > Auto Light Shuffle from the top menu bar.
- The script generates the
Unpremult,Dotrail,Shuffle,Merge,Backdrop,Copy, andPremultnodes.
Generated Layout
Read
|
+-- original alpha branch --------------------------------------+
| |
Unpremult |
| |
input Dot rail |
| |
Shuffle nodes grouped by light |
| |
balanced Merge trees inside labelled Backdrops |
| |
Beauty Merge chain |
| |
Copy <----------------------------------------------------------+
|
PremultThe final Beauty merge chain is placed outside the per-light Backdrops for clarity.
Configuration
Defaults live in settings_default.py. You can also pass a complete override dictionary when calling the function:
import nuke_blender_autoaov
nuke_blender_autoaov.shuffle_and_combine_light_groups(
{
"selection_groups": [
["diffuse", "glossy", "specular", "transmission", "volume"],
["Combined"],
],
"node_spacing": {"x": 180, "y": 320},
"debug": True,
}
)Default layout values:
- Horizontal spacing:
150 - Vertical spacing:
280 - Grey
Backdropnodes with 64-point labels
Repository & Related Docs
- GitHub Repository: RolandVyens/auto-light-shuffle
- Report Issues: GitHub Issues
- Lightgroup Lobe Passes — Native Cycles per-lightgroup direct/indirect lobe passes.
- Industrial Light AOV Splitter — Blender add-on for splitting light groups into component AOVs.
- Industrial AOV Connector — Automated Blender EXR output tree builder.
