July 2, 2020
Masking in CG has always been an issue but now we can use a new tool called Cryptomatte to make things easier.

In Architectural Visualization extracting masks correctly from the renderer is pretty important because the post-processing (especially when the Clients ask for changes) can shorten up the sign-off of an image or a video.

For many years the only correct method to output masks from the renderer has been the MultiMatte in V-Ray but the cost of that was to assign Object ID’s or Material ID’s directly in the 3dsMax scene. From now on, because Photoshop can handle it, here in SoA we are changing our workflow by mainly using the Cryptomatte.

Cryptomatte is a tool created at Psyop by Jonah Friedman and Andy Jones and it is a render element that can create ID’s matte AUTOMATICALLY with the support for motion blur, transparency (not supported in V-Ray 5 at the moment), and DOF during the render time.

Cryptomatte can create matte by node name or material name (that’s the reason why you should rename everything you create from time to time).
To activate it, we need only to add in the render element the VrayCryptomatte and we specify if we extract the mask by Nodename or Material name.

It is mandatory then that you render your final image or animation frame in BUCKET mode (at the moment in V-Ray it’s the only way in which you can get a complete Cryptomatte render element).

At the end of the rendering, make sure that you save your image in exr multilayered. So, if you are using the VFB, you can save using the 3rd option; if you are saving automatically make sure to save the raw image.

Now since for the post-processing of still images we use Adobe Photoshop in order to work with exr multilayer and Cryptomatte, we need a free plugin to install which is called exr-io.

Once you’ve installed it, in Photoshop you can open the exr. Make sure that in the options the Cryptomatte is set with “transparency”.

As you can see in the layers you have the beauty and the selections for the object you’ve in the scene (in this scenario I output the masks based on object name).
If you CTRL click on the layer, you’ll get the precise selection of your object/material automatically.

Pretty magic no?

Thanks and I hope you find this useful.
A big hug.

Peo

Share this