You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 25 Next »

Masks are similar to alpha channels and are convenient to separate and manipulate specific sets of objects and/or materials elements during compositing or color grading. For example, it is possible to separate foreground and background objects using masks in order to perform different colour correction on them, another example is to separate objects which have a specific material assignment. A common practice is to manually assign IDs and colours to specific objects or materials (using the red, green and blue channels) in order to get masks out of the renderer. Another approach is to modify shaders and add custom AOVs to output specific masks. These tedious methods have many drawbacks and are completely superseded by the Multi-Masks feature presented here.

3Delight for Maya offers a simple method to output multiple masks simultaneously (in a single render with little impact on rendering time).

Using the Multi-Mask feature is a two step process:

  1. creating a 3Delight Mask Set (this is just like a Maya Set node that can be populated with the required objects and/or materials)
  2. selecting it through the Image Layers group of rendering attributes.

3Delight Mask Set can contain:

  • one or more objects (for an object mask)
  • one or more materials (for a material mask)
  • a mix of object and material (for an arbitrary mask)

There is no limit to the number of masks that can be created and selected this way. All rendered masks can be saved separately or in the same file (using either EXR or TIFF).

It is worth to mention that this set-centered approach allows objects or materials sets for masking purposes to be created even earlier in the pipeline, for example in the modelling or look-development phase, and then be used in lighting without prior knowledge to the scene contents (e.g. without knowing which IDs are assigned to which object or material).  

Creating a 3Delight Mask Set

A mask set can be created using the 3Delight menu. 

 

A 3Delight Mask Set is a normal Maya set that can be edited using Maya's Relationship Editor (Windows→Relationship Editors→Sets).  Here is an example showing two such sets for foreground and background objects:

 

Outputting Masks

As soon as a 3Delight Mask Set is created, a corresponding AOV appears in the AOV Selector in the Image Layers section of the Render Settings. In our example above, the AOV Selector would display two additional AOVs:

After clicking the OK button, two layers are added in the list of image layers for output:

 

Result

During rendering, two masks will be rendered as shown here (the output can be considered as an alpha channel): 

Mask: foreground

Mask: background

 

Note that you could also put in a set any material node to achieve a mask for all objects who are assigned to such material(s), following the same procedure:

 

 

 

Outputting Masks

Result

Mask: green_material

Mask: red_material

 

 

  • No labels