Using the pass in the compositor
The pass is an ordinary AOV. On the Render Layers node you get a socket named after your Pass Name, alongside Image and Alpha. Plug it into anything.
Nothing is added to your compositor unless you ask. Two things to know:
- Render ID Pass needs a File Output node to write a file, so it creates one, renders, and removes it. It restores
use_nodesand deletes a node group it had to create. The graph is byte-identical before and after. - Add File Output Node is the explicit opt-in. It adds a Render Layers ▸ File Output pair, configured with the right format and colour management, and leaves the rest of your graph alone. Use it when you want the ID pass written automatically on every normal render.
Bear in mind that a pass written this way comes from your normal render and is therefore anti-aliased.
The pass also lands in a multilayer EXR automatically — render to OPEN_EXR_MULTILAYER and you get MaterialID.R/G/B/A next to Combined.