ID mask for environment/world

Hi! There’s many topic about it, but I’ve never find any good (fast, reliable, easy) solutions.
How can I generate mask only for environment (world shader)?

Cryptomatte doesn’t store world shader; it’s not possible to make ID pass on object nor material. Environment pass is not a black and white maks, it’s color environment with everything else black. Making render with transparency and adding later environment pass is not good, because of anti aliasing problems with merging those two separate layers. I’ve also tried to make custom AOV but it’s always black.

Weird… docu says:

Tip:
The AOV Output node can be used in Material and World shader nodes.

But world shader AOV just produce black images ( Linux: Debian 9; Blender: 3.01, 3.1.2, 3.2)

Only workaround for cryptomatte I found is placing plane that covers whole scene, making it not receiving shadows, diffuse, reflections etc., with transparent shader.

Not so funny thing… in EEVEE it works… i get a AOV from the world material an only where the background is visible…

1 Like