How to achieve a flat colored render pass from material id/index for masking I'm trying to get a render pass that splits all different materials into flat shaded objects (like material id in 3ds max) with anti aliasing.

The output colors aren't important. (random colors are just fine as they will be used as masks)
Render engine: cycles
 NOTE: I do NOT want to use python for this.

What is the simplest way to achieve a result like this?
And...should I use seperate render layers to get the best render time?
You ask a question to which there is no simple answer based on your requirements:


no python - this limits any automation and implies a lot of work
with anti aliasing - this is something cycles cannot do yet on masks


The anti-aliasing issue of ID masks (first render, second without, last with):



The perfect solution would be to render the scene with each material being a different color emission shader of strength 1.0 - without python this is time consuming to set up. Low samples would be enough for this and you would get the exact anti-aliasing like in your final render.

Another solution is to give each material a different ID and render the MaterialID pass in ridiculously high resolution and then down-scale. The good news is you will get the pass with just 1 render sample!

In compositor you will get all the colored ID masks (but aliased) like this easily:



The anti-aliasing after down-scaling will not be pixel-perfect with your final render and will depend on your downscaling algorithm.