1
$\begingroup$

I've been searching a while now for a solution to render out a flat colored map for masking out objects in photoshop.

I found this very helpfull topic: https://blenderartists.org/forum/showthread.php?387255-Surface-ID-Pass-in-Blender

Is there a way to combine this technique so that objects with the same material/object will use the same color?

The main benefit from this technique is that it's anti-aliased which makes it more suitable for masking.

$\endgroup$

1 Answer 1

1
$\begingroup$

Each material can have it's own Pass Index set up in the Properties Window > Material > Settings > Pass Index

If you set them up correctly after rendering, using a Compositor you can use an ID Mask node to mask out each part of the image according to material.

It can be directly from the Render Layers node or from an Image node through a multi layer file format like EXR.

See the Blender Manual on how to

You an then use the compositor to extract one mask for each material and save it as an image.

This technique has the advantage that since it uses a black and white mask for each layer pass you can get full anti-aliasing for each mask, without running the risk of 'ID Collision' when the mixed anti-aliased colors match a different object from another pass.

$\endgroup$
5
  • 2
    $\begingroup$ I don't believe the ID masks are anti-aliased? The ID node in the compositor has some sort of "anti alias" option but it's never worked well for me. $\endgroup$
    – JtheNinja
    Commented Sep 26, 2016 at 16:25
  • $\begingroup$ related: blender.stackexchange.com/questions/28917/… $\endgroup$
    – p2or
    Commented Sep 26, 2016 at 17:06
  • $\begingroup$ Hum never really tested it myself, but there seem to be some nice workarounds in the answer linked by poor $\endgroup$ Commented Sep 26, 2016 at 19:53
  • $\begingroup$ Thanks for the input but unfortunately I'm not looking for a workaround. Also I'm not so much looking to isolate every single object into a sepperate black and white mask because this would be extremely time concuming if you have a complex scene with lots of objects. I only want to render out a collored map wich in turn could be used in photoshop to quickly mask out parts of the image. End use: Architectural visualisation $\endgroup$
    – Delagone
    Commented Sep 27, 2016 at 11:18
  • $\begingroup$ Maybe you could set it up in the compositor in such a way that the per-material masks would be automatically combined into a color mask of your choice. It still takes some work to set up, but you only have to do it once, then all you have to is re-save it whenever you update your scene. $\endgroup$ Commented Sep 27, 2016 at 13:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .