Cryptomatte Metadata Missing in 2.8


#1

In Blender 2.8 we don’t get any Cryptomatte Metadata in the EXR File. Because of this you cannot use the cryptomatte passes in an external compositing software like Nuke.

Blender 2.79 doesn’t have the problem.

Is there a way to get the metadata also in 2.8?


#2

Side note: The 2.79 version we use - mentioned in the post here - has build hash 763b5c87617 (2.79.6).


#3

Fixed now:
https://developer.blender.org/rB1bbe770


#4

Wow, thanks for the super quick fix!

It is working now, but there would be one more thing to make it perfect…

Right now the naming of the cryptomatte layers in the metadata is “xxxxx.CryptoObject”.
The cryptomatte image layer in the EXR is “xxxx_CryptoObject”. For the Cryptomatte Plugin in Nuke, the naming of both the metadata and the layer, has to be the same.
So to make the plugin work correctly, one has to change the metadata inside of Nuke.

Would it be possible to change the format of the naming in the metadata to “xxxx_CryptoObject”?

This would be relevant for both 2.79 and 2.8

thanks in advance,
Joe


#5

@brecht We internally tested this by simply replacing the '.' with an underscore '_' in the source code. For Nuke, this works just fine and is exactly what we need. We cannot tell however if by doing that we break other stuff (like Blenders own compositor). Do you see a risk in making that change?

Changed code (lines 416 - 428) in blender_session.cpp:

	/* Write cryptomatte metadata. */
if(scene->film->cryptomatte_passes & CRYPT_OBJECT) {
	add_cryptomatte_layer(b_rr, view_layer_name + "_CryptoObject",
						  scene->object_manager->get_cryptomatte_objects(scene));
}
if(scene->film->cryptomatte_passes & CRYPT_MATERIAL) {
	add_cryptomatte_layer(b_rr, view_layer_name + "_CryptoMaterial",
						  scene->shader_manager->get_cryptomatte_materials(scene));
}
if(scene->film->cryptomatte_passes & CRYPT_ASSET) {
	add_cryptomatte_layer(b_rr, view_layer_name + "_CryptoAsset",
						  scene->object_manager->get_cryptomatte_assets(scene));
}

#6

The EXR layers have a . in then, they are consistent and following the OpenEXR specification.

Unfortunately Nuke and a lot of other software does not follow the specification, and renames the layers when loading. Some day we might follow and use the more common convention over the original specification, but this is not something we can change easily.

This could be considered to be a bug on the Nuke side, if it’s going to rename the EXR layers it should take that into account for the metadata as well.