4
$\begingroup$

blender people, please, does exist a solution to make a clean render pass for ID colors - materials? I want to achieve a same solution like in VRAY - material ID. After that, I want to import it in photoshop for postproduction. But the output in Blender-Cycles- Cryptomatte is very pixelized and not desired quality at all. I read another similar question in this forum and tried do my best. Exactly it was this article: Cryptomatte doesnt output nice clean edges

I tried to change the film Options - but it also destroys the render quality, so you have to render twice and the solution is still not antianalized, so it can´t be comparable with vray.material.id_output at all?!

Is there a way how to make it ?

I also read this article How to achieve a flat colored render pass from material id/index for masking And for me It does not matter, If I have to use a python script. I just need to get a perfect material Id Image. I tried Cryptommate for object or material picking and exporting. Results with exports are horrible. It works great only internal. If you export to EXR from blender and import with EXR_IO, you get lot of layers with alpha masks. Not the one easy colored layer like in VRAY?! This way of work is not possible in the scene with 300 objects.

Last thing could be making any materials emissive and change ID´s. I hope that blender is far away from solutions like this.

I would be happy happy for any advice. Thanks!

enter image description here

enter image description here

enter image description here

$\endgroup$
1
$\begingroup$

It looks like you are trying to use Pick image output as is. This answer explains why you are not supposed to use Pick image output. In short, it is intended only for picking the values, and it is not Cryptomatte mask.

Cryptomatte masks are antialiased and have clean edges but you need the software capable of using them. You can export them from Render Layers with File Output node, or connect to Viewer Node and export each Cryptomatte image manually from Image Editor. In simplest case just exporting Crypto*00 mask will be sufficient (it allows up to 2 object or materials per pixel). If you use real Cryptomatte masks and still get imperfect edges it may help to either render with more samples or to enable Accurate Mode for Cryptomatte in View Layer Properties (only available with Cycles CPU rendering). Fortunately, in most cases Accurate Mode is not necessary.

If you want colored and antialiased mask (so using Matte output alone is not sufficient) but do not want to use real Cryptomatte masks directly, there is a simple solution too.

Create this simple emission material:

enter image description here

You can use Object or Material Index instead of Random. Just use Math node to divide by total number of IDs and the result can be connected to the H input. This way for each ID you will get predictable color if you know total number of IDs.

Then assign the Material in View Layer Properties > Override > Material Override (you may also want to override number of samples, it will control AA quality):

enter image description here

The result is perfectly antialiased mask. You can either use Render Result directly (if you want the mask to include all objects), or use Cryptomatte to limit the mask to specific objects you decided to pick:

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.