Soft Shadow Maps with mental ray

Maya lights can generate either Maya shadow maps or mental ray's own shadow maps. mental ray's shadows can be more detailed than Maya shadow maps and, more important, can be easily and very nicely softened to create a more natural look, especially in some outdoor scenes. To enable mental ray shadow maps, select the light and in its Attribute Editor, check "Use mental ray shadow map overrides" under the mental ray * Shadow heading. Of course, these shadows can work only with mental ray renders, but you do not have to enable GI or Caustics or Final Gather for them to work.

The primary shadow attributes are as follows:

Resolution Because Shadow Map shadows are created by using maps, the resolution sets the quality level of the shadow map used. The higher the resolution of the map, the more detailed the shadow for that object.

Samples The higher the samples for a shadow map, the smoother the shadows will render. You will need higher samples for detailed shadows and especially soft shadows.

Softness mental ray shadow maps can render soft, for a more natural look, especially for external scenes.

Try This Open the file stm_life_v01.mb in the Scenes folder of the Lighting project on the CD. Create a spotlight and place it to point down at an angle at the still life arrangement as shown. Place the persp camera to show the fruit arrangement as well as the column stand.

  1. Select the light, open the Attribute Editor, and set a Penumbra Angle of 5 to soften the edge of the spotlight, just in case it falls into frame (or widen the spotlight's Cone Angle to 60 or so).
  2. Under the Mental Ray * Shadows heading for the light, enable the Use Mental Ray Shadow Map Overrides check box, and under the Shadow Map Overrides heading, set the Resolution value to 2048. You can leave Samples and Softness to their defaults of 1 and 0 respectively for now.

soft shadow maps with mental ray 429

  1. In the Render Settings window, switch to Render Using Mental Ray with a Quality Preset of Draft. Render a frame and you should have something similar to what is shown here (below left). If your render is quite jaggy, you can set the Min Sample Level and Max Sample Level to 1 and 2 respectively in the Render Settings window. We'll cover these settings in the next chapter.
  2. Select the light, and in the Attribute Editor, set a Softness value of 0.05 in the Shadow Map Attributes of the mental ray section. Render a frame and compare it to the following image. You should see a softer shadow but at a fairly dithered, jagged quality (below right).
Mental Ray Shadow

5. To increase the smoothness of the soft shadow, increase the Samples value to 50. Render the frame and compare to the image here. You should notice a big difference in the quality of the soft shadow.

Soft Shadow Opengl

You should have noticed that the softer shadow and the higher Samples rate increased your shadow's quality, but at almost twice the rendering time. Also keep in mind, the softer your shadow, the less it will appear around your object. Small Softness values go a long way. It's also wise to find the lowest possible Samples value to use for the best result.

0 0

Post a comment

  • Receive news updates via email from this site