Getting Good Results with mental ray Rendering

Although the mental ray renderer is relatively easy to use once you’ve set it up correctly, there are several "gotchas" that you might encounter immediately, especially if you’re primarily accustomed to the 3ds Max Design scanline renderer and its workflow. For example, see 3ds Max Design Materials in mental ray Renderings. Following are some basic rules of thumb for using mental ray in 3ds Max Design:

Using Lights with the mental ray Renderer

When you set up a scene for rendering with the mental ray renderer, keep the following tips in mind:

Ray Tracing

The mental ray ray tracer is fast and provides excellent quality images, but it’s important to use it correctly.

The mental ray renderer does not fully support cubic maps for Reflect/Refract maps. It uses them if they have already been generated by the default scanline renderer, but it does not generate them. If Source From File is active and the mental ray renderer can find the six cubic maps, it uses them. If Source Automatic is active, or if the cubic maps cannot be found, the mental ray renderer generates ray-traced reflections or refractions instead.

Ray Tracing Setup

On the rendering menu, Ray Tracer Settings and Raytrace Global Include/Exclude are disabled while the mental ray renderer is active. These controls adjust ray-trace settings for the scanline renderer only. The settings of these controls have no impact on the mental ray renderer. The ray-tracing controls for mental ray appear on the Renderer panel Rendering Algorithms rollout.

TipWhile the mental ray renderer ignores the global inclusion or exclusion settings for the ray tracer, you can enable or disable ray-tracing at the local level of a Raytrace material or map.

Ray Tracing Rules of Thumb

Say you’re rendering a (lathed) wineglass, with an inner and outer surface and a piece of geometry representing the wine. The wine geometry is just slightly smaller than the inner surfaces of the wineglass, and capped with a flat top. Now, you go to render the glass. After rendering the scene, however, there’s something wrong: the inner surfaces of the glass don’t seem reflective enough, and the wine isn’t refracting properly. What’s wrong?

It’s possible that you have the number of reflections and refractions set too low for the number of surfaces you have. To check this, go to the Renderer panel Rendering Algorithms rollout and look at the Maximum Trace Depth settings. If you havent changed the parameters, then you should see Max. Reflections and Max. Refractions set to the default of 6, and Max. Depth set to 6.

There’s the problem: you actually have six surfaces that need to be traced by the light rays for both reflections and refractions. The way to always calculate the number of rays needed for a scene is to take the ray-traced objects in your scene and draw an imaginary line through them, originating at the point of view. Then, count the number of surfaces the line intersects.

For the wineglass and wine, you need at least six reflections and refractions that correspond to the following surfaces:

  • Near outer glass surface (“near” relative to your Camera viewpoint)
  • Near inner glass surface
  • Near wine surface
  • Far wine surface
  • Far inner glass surface
  • Far outer glass surface

Therefore, increase the value of Max. Depth to 12.

Caustics and Global Illumination

Before rendering with caustics, there are several things you need to set up in your scene:

Coincident Faces

When it encounters coincident faces, the mental ray renderer can produce artifacts, because it can't decide which face is nearer the camera (neither is). To fix this, move or scale one of the objects so faces are no longer coincident.

Backface Culling

mental ray rendering correctly performs backface culling, and renders one-sided faces much as the scanline renderer does.