Cryptomatte to create clownpass - problem: some objects have the same colours

I try to make a ‘clown pass’ which allows me to quickly select objects in photoshop. For this, In Blender I use cryptomatte in the compositor. This gives me almost the proper result, which is an image with all the objects having different colors. The problem is that sometimes adjecent objects share the same color (or colors really close to eachother). Is there any way to finetune this? Or if anyone knows a better way to achieve the same thing (clown pass) that would also be great.

The “colors” you see in the Cryptomatte passes aren’t really colors meant to be viewed, they’re IDs. Most of the time their values in the RGB channels go from insanely low negative to insanely high numbers. They might look identical but that’s just because your monitor can’t display -123352534346345252.1241 or 315423523456346346363.4345 :wink:

All is fine. Just make sure to use the Cryptomatte node in Blender’s compositor (or Nuke or Fusion or whatever). Don’t just try to key out a certain color. That’s not how Cryptomatte works.

1 Like

Hi Steffen,

I understand what you are saying. But I don’t understand ‘don’t just try to key out a certain color’.

I have sent a screenshot of what I’m seeing and my node setup in the compositor. My goal is to create an image with different looking colors so I can easily colorpick them in Photoshop. Maybe the cryptomatte is not the right tool for the job. If this is the case, do you have ideas how to create a ‘clownpass’ from Blender?

Problems with this image:

  • some greens are very close to eachother
  • some have pure white colors and overlap, making it impossible to select objects

That’s exactly the problem: You don’t colorpick Cryptomattes. Photoshop doesn’t understand Cryptomattes.
Cryptomatte passes are there to be handled by a Cryptomatte keyer / filter. Just open your rendered multilayer EXR (needs to be 32bit float with a lossless compression!) in an image editor in Blender and pick some values like I showed in my screenshot. You will see that although some colors might look exactly the same their real numeric values are extremely different… and not meant to be picked by a color picker in Photoshop.

In your setup you attached in your last post, you already picked a value. Just view the “Matte” output of the Cryptomatte node and you’ll see the black / white matte of this object(s).

I just did a quick Google search and found this:

Looks like the solution (I don’t use Photoshop so I didn’t know a plugin existed).

Thank you for the explanation. That could be interesting and Ill check that out later. However for my current situation, I am looking for a more ‘quick and dirty’ method where i can end up with an image that has a color per object so i can easily use the ‘magic wand tool’ or ‘select color range’ in Photoshop to select the desired object.

Hi @SteffenD , sorry if i go a little off topic here. Is it possible to give some contrasting colors a priority so that we can distinguish the objects (or materials) better? Sometimes it is quite hard to select the desired object because they all look alike.

Sorry, but I think this is not possible. Cryptomatte automatically assigns these IDs.
In some compositing tools it’s possible to pick the objects while viewing the final image (not the Cryptomatte itself).
Maybe the colors visible during the “pick” stage in Blender could / should be made more distinct but this has to be done by someone who’s able to code :wink:


Feed the Pick output into a hue input of HSV connect the output of it to mix node to the FAC and Image 1, connect original Pick output to bottom slot use “Darken” as a blend mode.

Did you now this: How to create output masks for different meshes?

There is a bug in Blender that has the View transformation applied to Cryptomatte data, as the channels are being treated as color and not data (notice how the Cryptomatte outputs on the Render node are yellow). Make sure to set your View Transformation to Standard instead of Filmic when picking inorder to see the seperation between the objects/materials/assets.