This tutorial walks you through the steps of creating a shadow/matte catcher.

 

Overview


V-Ray shadow catcher is a Matte object, which is not directly visible in the scene, but shows the received shadows. This approach is ideal for achieving a photorealistic render, compositing a 3d object with a shadow on top of the environment map or just a backdrop.

For the purpose of this tutorial, we use a car geometry from our Chaos Cosmos 3D content library. The scene lighting is achieved with a VRayDome light loaded with an HDRI, and another HDRI from Poly Haven used as environment. Note that we add some Horizontal rotation to both HDRI textures to frame the background and position the sun and shadows better.

The renders on the right illustrate what a great difference V-Ray shadow catcher usage adds to the final image.

 

 

 

Tutorial steps


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

  • 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


 

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.

 
 

 


 

In the Matte properties section:

  • enable the Matte 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:

  • 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.

 

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.

 

 
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. 
 
 

 

 

Using VRayMtlWrapper Material


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:

  • 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.

 

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.

 

 

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.

 
 

 


Notes


  • 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.