Versions Compared

Key

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

...

 

Tutorial steps


In this tutorial, we turn a plane into a shadow catcher/matte object. There are two ways to do that:

Fancy Bullets
typecircle
  • by using the V-Ray Object Properties
  • by using the VRayMtlWrapper material

Open the scene you will use for this tutorial and let's delve into each method.

 

Using V-Ray Object Properties

 


Section
Column
width55%

Select the object, which will become a shadow catcher. In our case we select a plane.

Right click on it in the viewport and select V-Ray properties.

Alternatively, you can also use the Make a V-Ray shadow catcher through the V-Ray Object Properties () button on the V-Ray toolbar, which loads the same settings for you.

Column
width5%
 
Column
width40%
 

 


 

Section
Column
width55%

In the Matte properties section:

Fancy Bullets
typecircle
  • enable the Matte
object option
  • object option;
  • enable the Matte for refl/refr option;
  • set the Alpha contribution to -1
,
  • .0 (this makes the received shadows take away from the alpha information for compositing later).

 

In the Direct light section:

Fancy Bullets
typecircle
  • enable the Shadows (this option makes the object receive shadows);
  • enable the Affect alpha option (this makes the received shadows affect the alpha, and the Alpha Contribution specifies whether to add to the alpha if set to 1.0, take away if set to -1.0 or leave the alpha unchanged if set to 0.0).

 

This turns the plane into a Matte object. This means that it is not directly visible in the scene; instead the background color is shown in its place. Please note that this effect works only on objects that have these V-Ray properties set.

Column
width5%
 
Column
width40%

UI Text Box
typeinfo

Optionally, the reflections that the car geometry receives can be overridden with another texture or a color. To achieve this, enable Secondary matte environment option from Render Setup > V-Ray tab > Environment rollout > Secondary matte environment where a different HDRI can be used as Secondary Matte texture.

Expand
titleClick here to expand an image of the parameters involved.
Section
Column
width25%
 
Column
width50%

Column
width25%
 
Here's how the reflections and refractions are changed by the Secondary matte environment. The use of a secondary matte texture is not mandatory and can be omitted. 
Expand
titleClick here to expand the final images.
Section
Column
width25%
 
Column
width50%
Before after
afterLabelon
beforeLabeloff
Panel
borderStylenone
Panel
borderStylenone
Column
width25%
 

 

 

Using VRayMtlWrapper Material


Section
Column
width55%

Another way to achieve this effect is through the use of VRayMtlWrapper.

Open the Material editor, create a VRayMtlWrapper and assign it to the shadow catcher. In our case – to the plane.

Enable the same options for the VRayMtlWrapper as the ones outlined in the previous approach:

Fancy Bullets
typecircle
  • Matte surface
  • Matte for refl/refr
  • Shadows
  • Affect alpha

Set the Alpha contribution to -1.0.

Select the Base material of the Shadow Catcher, in this case a VRayMtl. The base material will be visible in the reflections. The effect works on every geometry that has the VRayMtlWrapper applied to it.

Column
width5%

 

Column
width40%

UI Text Box
typeinfo

Optionally, the reflections that the car geometry receives can be overridden with another texture or a color. To achieve this, enable Secondary matte environment option from Render Setup > V-Ray tab > Environment rollout > Secondary matte environment where a different HDRI can be used as Secondary matte texture.

Expand
titleClick here to expand an image of the parameters involved.
Section
Column
width25%
 
Column
width50%

Column
width25%
 

Here's how the reflections and refractions are changed by the Secondary matte environment. The use of a secondary matte texture is not mandatory and can be omitted.

Expand
titleClick here to expand the final images.
Section
Column
width25%
 
Column
width50%
Before after
afterLabelon
beforeLabeloff
Panel
borderStylenone
Panel
borderStylenone
Column
width25%
 

 


Notes


Fancy Bullets
typecircle
  • With V-Ray 3.0, the V-Ray Material Wrapper does not support the 3ds Max Standard material.
  • When working with V-Ray GPU engine, make sure to set the Alpha Contribution to -1.
  • In V-Ray 5, matte objects always show the background. Since V-Ray 6, however, the matte objects show the V-Ray Dome light instead of the background when a V-Ray Dome light is present in the scene.