Pass Mask Applicator
Masking Render Passes in a Single Node
- mask
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
If you work with render passes or AOV-style pipelines, you know the tedium: you've got six passes - diffuse, specular, reflection, whatever - and you want to cut all of them with the same mask so only part of the frame comes through. Doing that per-image means six multiply nodes, six identical mask wiring jobs, six chances to misroute. Pass Mask Applicator collapses that into one node: one mask input, up to six image inputs, six masked outputs.
The mask defines what to keep - white pixels in the mask let the image through, black hides it, and grays fade. That's the standard compositing convention, and the node is deliberately dumb about it: it's a general-purpose mask applicator, not a PBR-specific tool. The "Pass" in the name comes from its natural habitat (multiplying render passes), but you can throw any images at it.
How it works
Dead simple under the hood, which is a compliment. The mask gets converted to grayscale if it's color, clamped to 0-1, expanded to match each image's channel count, and multiplied into the image. Pixel-wise: output = image × mask. It even handles the boring edge cases for you - the mask is resized to fit whatever image you plug in, so you don't have to pre-match resolutions.
Only the images you actually connect get processed and returned; unconnected slots come back as None, which keeps the node from erroring when you're only masking three of six.
Inputs and outputs
- mask (required) - the grayscale/color mask that decides what survives.
- image_1 through image_6 (all optional) - up to six images to mask.
Six outputs, one per input slot: image_1 … image_6, each the masked version of its input (or None if the input was empty). Wire them to wherever the passes were going next.
Installing it
Part of TextureAlchemy. ComfyUI Manager (search "TextureAlchemy"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart, and it's under Texture Alchemist → Adjustment. No models, no pip requirements.
Where you'd use it
Two obvious homes. First, the pack's own lighting nodes: the relighters and the PBR AOV Generator output separate passes, and if you only want a mask-shaped region of a material lit (a spotlight, a window shape, a patch of rust), you mask the pass before comping. Second, general texture work: you can feed it the albedo, normal, roughness, and AO out of a PBR Splitter and cut them all with the same selection mask in one node.
One thing it won't do for you: it won't produce masks. For that, the same pack ships mask generators (curvature maps, gradient maps) - this node just applies whatever selection you already have. Keep it in mind as the payoff end of a mask-making workflow.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | IMAGE | — | |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — | |
| image_5opt | IMAGE | — | |
| image_6opt | IMAGE | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| image_1 | IMAGE | — |
| image_2 | IMAGE | — |
| image_3 | IMAGE | — |
| image_4 | IMAGE | — |
| image_5 | IMAGE | — |
| image_6 | IMAGE | — |