Nodes/playbook3d-comfyui-nodes/Playbook Mask Render Pass
ComfyUI Node

Playbook Mask Render Pass

Eight pixel-perfect masks from a real 3D scene

By playbook3d·Created 2 years ago·Updated about a year ago· 21
Playbook Mask Render Pass
  • default_value
  • image
  • mask_1
  • mask_2
  • mask_3
  • mask_4
  • mask_5
  • mask_6
  • mask_7
  • mask_8
api_key
blur_size0.00
run_id

Playbook Mask is the most useful node in this pack, and it's not close. It takes the mask render pass of a cloud-rendered 3D scene and gives you one composite image plus eight individual masks, each isolating a specific object or material in the scene. Pixel-perfect separation with zero segmentation models involved. If you've ever fought with SAM or a background-removal model trying to isolate "just the bottle" or "just the label" from a photo, this is the version where the answer is handed to you by the renderer.

The context is everything here. Playbook3D renders scenes in the cloud; the mask pass it produces is an RGB image where every object/material is painted in one of eight fixed colors. The node knows those exact colors, so it can split the composite back apart with perfect confidence - no guessing, no thresholds, no flicker between frames. This is the node that makes mask-based inpainting, compositing, and selective retexturing genuinely clean, because the masks come from geometry, not from a model squinting at pixels.

Inputs and outputs

  • api_key - required. The Playbook3D key from beta.playbook3d.com.
  • blur_size - float, 0 to 50, default 0. Applies a Gaussian blur to each of the eight masks. Set it above 0 when you want soft edges (feathering into an inpaint or composite) rather than hard matte lines.
  • run_id - optional. Pin to a specific render run; blank means latest.
  • default_value - optional image. The quiet-failure fallback, same as the other single-frame passes.

Outputs: image (the composite mask render) plus mask_1 through mask_8. Each is a MASK tensor, white where that object/material is, black elsewhere. The eight colors are fixed and hardcoded: yellow, blue, light-teal, near-black, green, pink, orange, and red. Objects 9+ in your scene don't get their own mask - they're still in the composite but won't appear individually. Plan your scene for eight materials at most if you rely on this.

How it works

Standard Playbook flow: exchange api_key for a token, request download URLs (optionally scoped by run_id), fetch the mask pass. Then the node matches each pixel against the eight known color codes, builds a binary mask per color, applies blur_size if set, and returns the composite plus the eight masks. One thing to watch: the composite image output is RGB, and each mask is single-channel - don't try to use image where you need a MASK, and vice versa.

Install

ComfyUI Manager → Playbook Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/playbook3d/playbook3d-comfyui-nodes

Restart ComfyUI. No models to download, no extra dependencies - this node only needs the API key and a completed render.

Troubleshooting

The failure mode is the pack's usual quiet one: bad or missing key, or an unfinished render, returns the default_value image repeated nine times. That means if every output looks like your fallback, the fetch failed - check the console for the token error. More interesting gotcha: the mask colors are exact-match, so any compression, resizing, or color shift in the pipeline between the renderer and this node will break the match and leave you with empty masks. If mask_1 through mask_8 come back all-black, that's color drift, and the fix is on the render side - export the mask pass losslessly. And remember: eight masks, hardcoded. More objects than that and the extras are invisible to this node.

CategoryPlaybook 3D

Inputs (4)

NameTypeDefaultDescription
api_keySTRING
blur_sizeFLOAT0.000–50
run_idoptSTRING
default_valueoptIMAGE

Outputs (9)

NameTypeDescription
imageIMAGE
mask_1MASK
mask_2MASK
mask_3MASK
mask_4MASK
mask_5MASK
mask_6MASK
mask_7MASK
mask_8MASK