Masks : Essential tools for your CG workflow 1/2

update 1-oct-2009/ thanks to Peter, I’ve learned that Multimatte workd by default with object IDs. The topic has then be corrected/completed

update 27-oct-2009/ added some info on the “Affect channel : All channels” option of a material

When it come to archviz rendering, one of the first thing to learn is to create good masks to retouch materials or objects individually in photoshop. If the most popular alpha mask allows you to cut out the entire rendering from his background, other type of masks (based on elements or objects) became essential for an efficient workflow in archviz.

fig 1. A perfect mask

I remember times where I did a second rendering with the same point of view, where every material was replaced by a self-illumated conterpart in order to save one or several DIY “masking pass” …a time consuming method, either on material editing or rendering. I even remember cutting out glass masks for buildings directly in Photoshop. Brrrrr :)

Hopefully, render engines have implemented numerous ways to extract these multiple layers during the rendering of the principal image. Those render elements may then be composed afterwards, leaving the artist a greater control on the final result. I’ll make a simple example with my usual pipeline : 3dsmax – Vray – Photoshop, but this can be applied to any 3d program that gives the opportunity to save differents passes of a unique rendering.

We’ll take as example a rendering where glass has to be enhanced, like in 95% of architecture renderings. (Could you make the glass more realistic please ? ;) )

Here’s quite complex facade with glass, displaced perforated metal in front of it, furniture etc. Out of the box render without any post production looks like this :

fig 2. RGB color right out of the box

To improve the glass, we’ll need 3 more passes : One for the reflection, one for the refraction (the model behind the glass) and a good mask to affect only the glass in photoshop.

For this exmaple, we’ll try different render elements and see what are the pros & cons of each. Beware that the more elements you want to be included in your render, the more RAM it will need for the EGB buffer. (Also, I’ve red that a big number of passes will slow down the overall rendering time a bit)

fig 3. Highlighted are those that might be used for masking

1) VRayWireColor

My favorite. The biggest advantage is that it requires almost no setup. I use it as a backup masking pass, in addition to MultiMatteElement. The only thing to remember it that it uses the color of wire objects, so you have to give differents color to your object in order to avoid confusion.



  • Nothing to setup
  • Distinct mask for every object
  • Works with opacity maks, transparency if needed.
  • Can be previewed in the viewport with “diplay object color” instead of material color
  • Everything in a single RGB pass


  • You objects need to be more or les attached by material (frames & glass detached, this is sometimes a big constraint)
  • You need to give those object different colors in order to work
  • No “pixel perfect 255 levels gradient” precision, more something like 50-100 pixels precisions if your object colors are well picked



2) MultimatteElement

The professional one. This works by default with Object IDs but you can use it with Materail IDs too (just check the box in the rollout menu) You set it up by giving a Material ID to the material from which you want to receive a mask. A RGB is then generated at render time, one material ID by color channel. Be sure to give different names in the RenderElement setup screen to avoid overwriting of Multimattes on top of themselves.


fig 5b. and you’ll receive this …
fig 5c. … and this… and more if needed

Another great tool for masking transparent objects is to maks them “transparently” with the “Affect channels : All”

Note that this technique usually mess up with all other channels like GI pass, Wirecolor etc. That’s a big drawback and maybe a future update would allow us to choose to affect alpha & Multimatte only…

Copy of uva_floreal_v2
fig 5d. The RGB pass and his mask, notice how the mask overlap each other, particularly usedful to cut out the glass railing and the glass behind separately

This option is locatated in the refractive options of a VRayMaterial

fig 5e. Choose “All Channels” in the drop down menu


  • The professional choice :)
  • Pixel perfect mask, 255 levels of precision.
  • Works with opacity maps, transparencies, etc.
  • Object or Material based
  • Works perfectly with “All channels” chosen in the refractive options of a material


  • A tad long to setup if you have numerous materials in your scene.
  • A new pass every 3 masks (increase RAM usage)
  • Limited to 15 materials ID if used with material IDs (3dsMax limitation)
  • No real way to preview it

3) Zdepth

Zdepth is not really used in first place for masking, but we’ll see later how it can save time in some particular situations !

fig 6. There is always something beautiful about Zdepth :)


  • Useful in very specific masking situations


  • Useless most of time (for masking purposes)

4) VRayObjectID

I initially thought that this pass might be useful, but I must have been mistaken… It’s useless in this case!

fig 7. Object ID pass


  • None


  • Everything (No AA, not customizable, etc. )

(If someone could tell me the utility of this pass, I’m intrested :)

5) VRayRefractionFilter

The joker. Not really a good workflow, but it made my day once so it deserves to be here ! A VRayRefraction pass could do the same, when all his non-black pixels are made white, but then you’ll lose AA.

fig 8. Refraction ID will show only the refractive materials.


  • No setup, just include it.


  • Only useful for glass in archviz
  • Doesn’t work when you have multiple refractive elements, will blend all the masks together

That’s all for today, in the second part of this tutorial, we’ll see how to use the above masks to improve our rendering locally !


  1. Thanks Peter & Fabio.

    @ Peter : Didn’t knew what was the point of checking the “use Mat ID” box in Multimatte sub-menu. Then if it uses the Object ID by default, it now makes sense! I’ll correct this asap in the text, I hate spreading bad or incomplete tips :)

  2. I dont even know what this does because I am still a novice, but i just want to say I admire your work. Its very inspiring to push myself to the next step and hopefully one day I’ll actually understand the use of this. Thank you for your other tutorials btw. just haven’t said so yet.

  3. wow i saw my own comment from 2 years ago! Didnt even remember that I commented here, but all the same.

    So 2 years later, I come back now as an intermediate and I completely understand this. LOL.

1 Trackback / Pingback

  1. Rendering Workshop: Outline – 3ds Max Scene Setup with Corona Renderer | Arch 577 - Introduction to Revit

Leave a Reply

Your email address will not be published.