Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This quick tutorial guides you through the different ways of creating masks for sub-shaders of the VRayBlendMtl. 

 

 



Material ID Extra Attribute

...

Section
Column
width45%

To create matte masks of materials that are part of the VRayBlend material, you can use the three different render elements: Material ID, Multi Matte and Multi Matte ID. Here is explained how to create a mask for compositing with each of them.

For each sub-shader that you want to create mask for, go to Attributes V-Ray and select Material ID. For more information on V-Ray Attributes for materials, see the Material Attributes page.

Depending on the render element creating the mask, either put a value to the Multimatte ID parameter, or select a color for the Material ID parameter.

UI Text Box
typeinfo

Multi Matte and Multi Matte ID render elements do not produce gradient masks.

Want to follow along but don’t have a license?


UI Button
colorblue
newWindowtrue
icondownload
titleDownload Free Trial
urlhttps://www.chaos.com/free-trial?utm_campaign=docs-tutorials&utm_medium=website&utm_source=docs.chaos.com


 
Column
width5%


Column
width50%

Using Material ID Render Element

...

Section
Column
width45%

The Material ID render element shows a color mask based on the selected Material ID color in the V-Ray Extra Attributes of the material. In this example, the selected color is magenta. 


 
Column
width5%


Column
width50%

 

 


...


Section
Column
width45%

Then, go ahead and add the Material ID render element from Render Settings > Render Elements.

Column
width5%

 


Column
width50%

 

 


...


Section
Column
width45%

The sub-shader has a magenta colored mask in the Material ID channel.

 
Column
width5%


Column
width50%

Using Multi Matte ID Render Element

...

...


Section
Column
width45%

The Multi Matte ID render element uses the MultiMatte ID we set (a value of 2) to create a mask.

Add it to the list of Render Elements.

Column
width5%

 


Column
width50%

...

 


...


Section
Column
width45%

Once you render, the selected sub-shader now has a separate mask in the Multi Matte ID channel.

Column
width5%

 


Column
width50%

 

 



Using Multi Matte Render Element

 

...


Section
Column
width45%

Another method to obtain a mask based on a sub-shader in VRayBlendMtl is to use the Multi Matte render element.

From the Render Elements tab, as shown above, select the Multi Matte render element.

In its extra attributes, enable the Use material IDs option. Also, the material ID assigned to the shader is set to one of the object ID color channels. In this example, the Red object ID channel is selected and a value of 2 is set. This way, all shaders with Multimatte ID of 2 get a red mask in this channel.

 
Column
width5%


Column
width50%

...

 


...


Section
Column
width45%

Now the selected sub-shader has a red mask in the Multi Matte channel.

 
Column
width5%


Column
width50%