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? material id


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):

enter image description here

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:

enter image description here

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


You can actually do exactly what Jaroslav Jerryno Novotny suggested (except normalize, just divide by your highest index there) in the material itself. Create an override material for a 2. RenderLayer, use the node setup above and you can RGB split, or put your tint colors in the material directly. That way it's anti-aliased and will actually take DoF and MB into account.


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.