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:

  • by using the V-Ray Object Properties Shadow Catcher node
  • 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 node

Shadow Catcher


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

Click the Assign VRay Object Properties Shadow Catcher button on the V-Ray toolbar while the object is still selected. Alternatively, right-click on the same button to open more options for assigning properties to an object, and select Apply single shadow catcher to selection.

The assigned Shadow Catcher creates a VrayObjectProperties node with already set settings for a matte object properties node to selection. It is recommended to leave the properties at their defaults, as they are automatically set for optimal results.

 

Section
Column
width10%

 

Column
width80%

Image RemovedImage Added 

Column
width10%

 

 

In the Attribute Editor, select the vrayobjectproperties tab.

In the Matte Properties rollout:

  • enable the Matte Surface option
  • set the Alpha Contribution to -1.0 (this makes the received shadows take away from the alpha information for compositing later)
  • enable the Shadows (this option makes the object receive shadows)

  • enable Affect Alpha (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) 

 

Image Removed

 

 

The Matte Surface, Shadows and Affect Alpha options are enabled and the Alpha Contribution is set to -1. This turns the plane into a Matte object. This means that it is not directly visible in the scene; instead

the background color is

, the background color is shown in its place. The background color here corresponds to the Override Environment

background override parameter

 parameter that can be accessed from Render Settings > Overrides tab > Environment rollout. Please note that this effect works only on objects that have

these V

these V-Ray Object

Properties set

Properties set.

In the V-Ray Object Properties, set the Matte For Secondary Rays to With Projection Mapping so that the matte object projects back the background environment onto other objects for increased realism.

Fancy Bullets
typecircle
  • For increased realism, set the Matte For Secondary Rays option to With Projection Mapping. This enables the matte object to project the environment back onto other objects in the scene.
Section
Column
width35%

Image Added

Column
width25%

 

Column
width40%

Image Added 

UI Text Box
typeinfo

Optionally, the reflections that the motorcycle geometry receives can be overridden with another texture. To achieve this, enable Override Secondary Matte Environment option from the Render Settings > Overrides tab > Environment rollout > Override Secondary Matte Environment where a different HDRI can be used as as a Secondary Matte texture for the reflections.

Image Removed
Expand
titleClick here to expand an image of the parameters.
Section
Column
width30%

 

Column
width40%

 Image Added

Column
width30%

 

 

Here's how the reflections and refractions are changed by the Override Secondary Matte Environment. Please, note that the final result is strongly exaggerated to better illustrate the effect of the options. 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 V-Ray Object Properties


Alternatively, you can use the  Image Added V-Ray Object Properties node directly and adjust it manually. 

For instructions on how to create a V-Ray Object Properties node, please visit the V-Ray Object Properties page.

 

After assigning the node to the selected plane, go to the Attributes Editor and under the vrayobjectproperties tab set the following settings:

Fancy Bullets
typecircle
  • Enable Matte Surface

  • Enable Shadows –  this option allows the object to receive shadows

  • Enable Affect Alpha – this option determines whether the received shadows affect the alpha. The Alpha Contribution specifies whether to add to the alpha, when set to 1.0. When the option is set to -1.0,  it takes away from the alpha. When set to 0.0, it leaves the alpha unchanged.

  • Set the Alpha Contribution to -1.0. This allows the received shadows to take away from the alpha information for later compositing.

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. Note that the background here corresponds to the Override Environment parameter that can be accessed from Render Settings > Overrides tab > Environment rollout. This effect works with every geometry that has the VrayObjectProperties applied to it.

  • For increased realism, set the Matte For Secondary Rays option to With Projection Mapping. This enables the matte object to project the environment back onto other objects in the scene.

Section
Column
width35%

Image Added

Column
width25%

 

Column
width40%

Image Added 

 

 

Using VRayMtlWrapper Material


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

Select the plane, open the Hypershade and create a VRayMtlWrapper using the Create panel.

Section
Column
width30%

 

Column
width40%

Image Added 

Column
Image Removed
width30%

 

 

Assign the VRayMtlWrapper to the plane using by right click clicking and hold holding on the VRayMtlWrapper Shader ball icon (alternatively, on the VRayMtlWrapper node) and choose choosing Assign Material to Selection.


Section
Column
width30%

 

Column
width40%

Image Modified

Column
width30%

 

 

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

  • Matter Surface
  • Shadows
  • V-Ray Object Properties:

    Fancy Bullets
    typecircle
    • Matte Surface

    • Shadows –  this option allows the object to receive shadows

    • Affect Alpha – this option determines whether the received shadows affect the alpha. The Alpha Contribution specifies whether to add to the alpha, when set to 1.0. When the option is set to -1.0,  it takes away from the alpha. When set to 0.0, it leaves the alpha unchanged.

    Affect Alpha
    • Set the Alpha Contribution to -1.0. This allows the received shadows to take away from the alpha information for later compositing.

    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. Note that the background here corresponds to the Override Environment background override parameter that can be accessed from Render Settings > Overrides tab > Environment rollout. This effect works with every geometry that has the VrayMtlWrapper applied to it.Image Removed

    Fancy Bullets
     
    type

     

    ...

    circle
    • For increased realism, set the Matte For Secondary Rays

    ...

    •  option to With Projection Mapping. This enables the matte object

    ...

    • to project the

    ...

    • environment back onto other objects

    ...

    • in the scene.

    Section
    Column
    width35%

    Image Added

    Column
    width25%

     

    Column
    width40%

    Image Added

    UI Text Box
    typeinfo

    Optionally, the reflections that the motorcycle geometry receives can be overridden with another texture. To achieve this,

    ...

    enable the Override Secondary Matte

    ...

    Environment option from Render Settings > Overrides tab > Environment rollout > Override Secondary Matte Environment

    ...

    . A different HDRI can be used

    ...

    as the Secondary Matte texture.

    Expand
    titleClick here to expand an image of the parameters involved.

    ...

    Section
    Column
    width30%

     

    Column
    width40%

     Image Added

    Column
    width30%

     

     

    ...

    Here's how the reflections and refractions are changed by the Override Secondary Matte Environment. Please, note that the final result is strongly exaggerated to better illustrate the effect of the options. 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

    Image Modified

    Panel
    borderStylenone

    Image Modified

    Column
    width25%