Transparency and render methods

Verified in both Cycles and EEVEE:

Material

Result in the pass

Opaque

Its own colour

Glass BSDF, default render method

Its own colour, occluding what is behind

Transmission on Principled

Its own colour, occluding what is behind

Render Method set to Blended

No ID at all — you see through to whatever is behind

Fully transparent BSDF

No ID — nothing is there to shade

Alpha below 1

Partial, dithered coverage — not a clean matte

The row to remember is the Blended one, because it is a common setting for archviz glass. A window set to Blended will be missing from your ID pass. Set its Render Method to Dithered and it appears.

For a partly-transparent surface you genuinely need to select, pin it a colour and set it to Dithered for the ID render.

Transparency and render methods · Material ID · Fulford