Making sense of cryptomatte usage in third party programs

Hi all!

Yesterday during the render & cycles meeting we discussed about the main issue when using cryptomatte + file output node and want to include a patch in 2.92 that solves this issue without overhauling the complete system.

I just added a patch that solve the basic workflow issue. Any testing/feedback is welcome https://developer.blender.org/D10016

This change supports the basic use-case where the compositor is
used to output cryptomatte layers with a different naming scheme to
support external compositors. In this case the Multilayered OpenEXR
files are used and the meta data is read from the render result.

Meta data is found when render layer node is connected with the
file output node without any other nodes in between. Redirects and empty
node groups are allowed.

1 Like

Fantastic Jeroen!

Does this also work if there are multiple renderlayer nodes connected to the file out ? (but only one of them have crypto enabled)

We often have several passes that needs to be rendered (volumes, light categories etc) and we compile them into the same multi layer exr, where the beauty pas is carrying the cryptolayers.

sounds great, thanks! I will give it a try as soon as I can.

@JeroenBakker: Hello, great to see the improvment with cryptomattes and the file output node! I wrote the first bugreport about this, more than a year ago.
How can I test the patch? I´m not a developer and can´t compile blender.
Greetings Marcus

I updated the patch description with example files. In stead of testing it by building it you could also download the openexr file and see if it is can be use. https://developer.blender.org/D10016
Multiple viewlayer should also be supported. The system is setup generic so it could work with any render engine that support cryptomatte (RPR for example).

1 Like

@JeroenBakker: Thank you very much!
I testet your *.exr file with the compositing app fusion 16 and with Photoshop (exr-io plugin).
It works as it should! Great that the file output node now supports cryptomatte metadata!

Confirming that the EXR you posted works fine in Nuke. The file doesnt seem to contain the cryptoAsset layer but Material and Object works fine.

On a separate note, does this mean all of the metadata the panel offers will now run through the file out node ? Its missing lens, render time, node etc. All of the other metadata Blender writes when using the regular panel.

None the less, good job!

Yes, it works for me too. Just dragged it into Nuke, connected it to the crypto node and it works (asset is missing, but in the example above it can be seen that it is not connected to the output node, so all is good). Thanks a lot!

I can confirm that the *.exr also works with Adobe After Effects. I think so we tested the widely-used compositing applications. :slightly_smiling_face:

2 Likes

could not make it work in fusion
any fusion user here that made it work?
(blender 2.92 beta latest)
i exported object material and asset in a multilayer, then import in loader node then plug to crypto matte node(version 1.2.8)
it will only read object layer, if i try to touch the layer slider the entire cryptomatte node crash, not even the object layer will show again


@JeroenBakkerblender_OjHxG0p102

@Machieb said it worked for him, maybe he can be of assistance.
did you made the connection go through an empty node before feeding it to the file output node?
like in the example Jeroen provided.

Hello,
I tested the file Jeroen provided and it was working in Fusion, Photoshop and After Effects.

Today I made a cryptomatte test with blenders todays build with two of my current 3D projects.
In one project the cryptomatte works with the output node and compositing in fusion. BTW I don´t use the cryptomatte asset option. In the other project it works in one rendered view layer and in another view layer it´s not working. I don´t know why (objects, shader?), so my conclusion is, that it is not 100% working in fusion. I got a new workstation so I testet with Fusion 17 but cryptomatte plugin 1.26 installed via reactor.
What I see, in Photoshop and After Effects it works, mybe the cryptomatte implementation is different there?! I have no Nuke to test it there.
To answer the question about going through an empty group node. I don´t use these group nodes.


In that configuration the cryptomattes from the renderlayer on the right work in fusion that on the left don´t. :frowning_face:
But I wouldn´t blame the blender developers, I think the fusion cryptomatte plugin in fusion is not working correct?!

I just tested with latest buld (2.92) and it still works in nuke. The first image is from nuke and both cryptoAsset, object and material work fine for me.
cryptoAsset_result

In the end I didn’t use reroute or empty groups either and it works just as well.

As the icing on the cake, @p2or was kind enough to share a script he wrote to automatically connect the render layers to file output nodes (there is also a patch awaiting review I think). It is really useful to avoid typing in the names manually (it takes the node label as a prefix, wich is nice)

Hi all,
I need some feedback on some cryptomatte changes that have some consequences. See https://developer.blender.org/D3959

With the new design, the user selects the RenderLayer or Image from which the
Cryptomatte layers are directly loaded (the type of pass is determined by an
enum). This allows the node to automatically detect all relevant passes.

This reduces some flexibility when using cryptomatte layers that are not stored in the same way as blender does. We could still allow the old workflow to ensure this.

Then, when using the eyedropper tool, the operator looks up the selected
coordinates from the picked Image, Node backdrop or Clip and reads the picked
object directly from the Renderlayer/Image, therefore allowing to pick in any
context (e.g. by clicking on the Combined pass in the Image Viewer).

This reduces the need of the pick socket. When done right it could be removed at all.

A technical change is that the cryptomatte isn’t supported in node groups anymore. This is a legacy issue on how nodes store the references to scenes and images. Any feedback is welcome!

on builder.blender.org in the experimental tab you can find compositor-cryptomatte-workflow that includes this new workflow.

I keep checking the experimental branches page, but still seems it is not up yet (mac and linux are there, but I only use Windows). As soon as it is available, I will try it out

There was an issue with the windows build machine. There is now a build available for windows. So check the builder website.

Hi. I have made a couple tests with a simple scene (4 primitives) and:

  • In NUKE everything seems about the same, tested it wuickly and everything looks normal, the picker works as expected. So…great!

  • In PHOTOSHOP (using exrIO plugin) each object is split in separated layers. I’m unsure if that’s the usual behavior (I’ve only used Ps/exrIO with renders coming from Maya), but in a large scene it would mean an absurd number of layers, and probably a huge processing time. On the upside, there is no selection required, is literally having a ton of alpha layers split multiple times (obj1.material, obj1.asset, obj1.object, obj2.material, etc…).
    Then again, I haven’t used it before coming from blender into PS. I tried the same scene with an earlier version of Blender and it does the same thing, so I guess it’s working as expected. Maybe @machieb can shine some light.

@JeroenBakker: Sorry I can’t test it, in the build from today (23.02.2021) I can’t find the compositor-cryptomatte-workflow in the experimental tab.


I am on windows.

@txo: The behavior in photoshop you subcribe is the way the Exr-IO plugin works/worked.
You are right if you have many objects or shaders in 3D, it ends up in a huge prosessing time and a mass of layers. So if you plan to make compositing in photoshop, you have to think beforehand if you render crypto materials, crypto objects or both of them. :slight_smile:

thanks for explaining, it seemed that way, but I wasn’t sure.

Sorry I can’t test it, in the build from today (23.02.2021) I can’t find the compositor-cryptomatte-workflow in the experimental tab.

The build is in the experimental branches tab whitin the builder page

@machieb it isn’t in the experimental tab. Just try to use the cryptomatte node in the compositor. The changes are all related to how to use cryptomatte within blenders compositor. There wouldn’t be any changes when exporting to an OpenEXR file.