Shadow Shaders

It is possible to use mental ray Shadow Shaders to further customize the appearance of your object's shadows.

Note: If photon effects (Caustics and/or Global Illumination) are used, using Shadow Shaders is generally not recommended, because light effects are properly determined by the photons. Shadow Shaders used with Caustics/Global Illumination will not produce physically correct results, but can be used to "fake" certain shadow effects such as in this scene.

1 Open scene

You may either use the scene you created in the above exercise (Material Shaders), or open crystalBallJinished.inb.

2 Assign a Shadow Shader

  • Open the Hypershade and select the phongl material. In the Hypershade, select Graph —> Output Connections. This will display the shading group: phonglSG.
  • Select phonglSG and open the Attribute Editor. Make sure to open the phonglSG tab.
  • Expand the mental ray attributes section.
  • Open the Create mental ray Nodes bar in the Hypershade and expand the Shadows section.
  • MMB-drag a mib_shadow_transparency node to the phonglSGs Shadow Shader attribute.

3 Adjust the settings for the Shadow Shader

  • In the Hypershade's Utilities tab, select the mib_shadow_transparencyl node and open the Attribute Editor.
  • Set Mode to 3 in order to remove light dependency. You will not get any shadows if you leave this at 0.
  • Double-click on the color swatch for the Color attribute to select your shadow color. You may wish to set it to a slightly darker color than that used by your crystal ball's material. This scene uses:

■ Lighten Transparency to grey in order to produce transparent shadows.

Tip: You can soften your shadows by enabling Area Light in your light's mental ray attributes in order to convert it to a mental ray Area Light. This may slow down rendering time.

4 Render the scene

Bake Transparent Material Maya
Custom Shadow Shade r used for transparent shadows
0 0

Post a comment

  • Receive news updates via email from this site