Cryptomatte fails to include metadata/unusable in nuke

Hello everyone,

we are dealing with a bit of a headscratcher. Right now we are working with the latest V-Ray 6 version in Maya 2023 and are trying to use cryptomattes for materials.
However, we keep having the issue that the metadata part of the cryptomatte is not included in the pass during the rendering. That of course means, that in Nuke for example we only have random numbers instead of the material names. This is a big problem, as many of our Nuke scripts rely on material names to pick the correct masks from the cryptomatte. This problem is not easily traceable to any specific scene setup in maya. It has affected refrenced materials, local materials in scenes, some with namespaces, some without, some switch materials, some not. Sometimes it seems to happen in older scenes that have a history in older Maya Versions, sometimes it happens in a fresh scene. It is really inconsistent as far as I can see, but always disruptive when it happens.

It should be said that right now 70% of our renderings are fine, and the other 30% have these issues.

Are there any limitations to cryptomattes I’m not aware of or some settings that are known to cause this kind of problem?

Additionally, we sometimes have cryptomattes whose masks cannot be picked at all in Nuke. These seem to be broken entirely.

I would be glad to recieve some suggestions on how to avoid these problems in the future.

Thanks!

VRayCryptomatte only works for multi-channel images. Maybe those 30% are not such? Otherwise, could you attach/send one of the scenes (simplified) where it doesn’t work as expected?

We are excluslively using Multichannel EXRs for all projects. So this will not be it. So Id like to take you up on the offer to send the files. Which format should I use to send the files? It doesn’t let me upload .mb or .exr files.

Send them via the link I sent in my last post, or zip them and then attach.

Okay this works. So I send you the Renderscene, a referenced Cube (replacing the referenced geo from the actual scene) and the rendered .exr for testing purposes.
_505117192_optional_v02_VB_TEST.zip (4.9 MB)

The issue seems to be caused by something wrong with the VRaySettings node itself. If you reset the settings to their defaults (Render Settings > Presets > Import Render Settings > Defaults) or delete the VRaySettings node, so that a new one is created, the VRayCryptomatte should start working again. And yes, I already tried manually transferring all default settings to the bad scene, but to no avail. The scene, overall, looks quite old.

Yes, you are correct. It’s a follow up job to a job from a couple years ago. Okay, if this is the way to go then we will try to rebuilt older scenes so that we can get around such issues in the future.
Thank you for the help.