Maya's default shadow settings


No too long ago I wrote about Maya and shadows.

There is another "issue" related to Maya and shadows; the default shadow trace depth on Maya is 1 (called "Ray Depth Limit" in the lights "Raytrace Shadows" panel). This means that even after one bounce (like a reflection in a mirror, or behind a pane of glass) you suddenly do not have shadows any more! This can hugely impact any quality interior GI render, and you can get all sorts of issues caused by this.

NOTE: A common misconception is that the Maya "Ray Depth Limit" on the ray traced shadows is how many surfaces the shadow rays penetrate. This is not so!.

This image is rendered with the "Ray Depth Limit" of 1:

Notice how the light still gladly penetrates 3 blue glass blocks (6 surfaces in total) and still generates a shadow? Yet when viewed through the single red glass block, the view as seen trough it suddenly is completely shadow-less!

Whereas if we turn up the "Ray Depth Limit" to 3, and the "Shadows" depth to 3 in the mental ray render globals (yes, you must change both!) you get:

Another demonstration of this can be found here

So, in conclusion

Make sure to take a look at Maya's shadow settings, making sure to look at

- shadow trace depth (note this must be set on the light (defaults to 1) as well as in the mental ray render globals (defaults to 2))

- "Low" area light samples (defaults to 2x2) and the "High Sample Limit". However the "High Sample Limit" defaults to 0, which turns OFF the "low area light sampling" mode. This is "good" quality wise (you never actually get the "low area sampling") it precludes a particular mia_material(_x) optimization (it tries to control this from the material, driven by importance, but it cannot do so if it is set to 0). I suggest you turn it up to 4. You can generally keep your "low" sampling at 2x2 when you are using the mia_material, but when using other materials, this may be something to watch out for, since they will strictly adhere to the "depth" setting rather than the relative ray importance, like mia_material(_x) does it.



Support said...
This comment has been removed by a blog administrator.
TJ said...

You, sir, are my hero! This has been driving me insane for the last to hours.