About Mental Ray


Mental Ray is similar in functionality to the Maya Software renderer, but it's generally faster when rendering the same scene using equivalent settings. It also provides advanced rendering features such as caustics and global illumination, which can simulate realistic light effects. However, as with raytracing, the calculations required to create this level of realism result in longer render times. In addition, Mental Ray can't be used to render Paint Effects or any of the new toon effects.

Global illumination is a method of calculating lighting that is more realistic but slower than Maya's default method. When you use global illumination, virtual light rays can bounce off objects and illuminate other objects. Without global illumination, objects can only be lit directly by lights. Because global illumination is closer to how light works in the real world, using it can result in more realistic-looking renders (Figure 16.94).

Figure 16.94. This scene has been lit with a single light. The image on the left was rendered using the Maya Software renderer, and the image on the right was rendered using global illumination in Mental Ray.


Caustics have an effect similar to that of global illumination, but the indirect lighting comes only from the specular highlights of objects, not their diffuse or overall lighting. This often creates more distinct patterns of light cast onto other objects, rather than the more general effect of global illumination. Caustics can be reflective (Figure 16.95) or refractive (Figure 16.96).

Figure 16.95. Reflective caustics cause light to reflect from the ring onto the plane.


Figure 16.96. The light pattern on the checkered plane is caused by refractive caustics.


Mental Ray can produce very photorealistic renders, but this realism requires a long rendering time. Be aware that although using global illumination and/or caustics can yield fantastic results, it's often more efficient to find a way to approximate your desired effect. For example, rather than using global illumination to simulate light bouncing off the ground and then illuminating your object, you could create a low-intensity directional bounce light, aimed upward from the ground.

To create caustics:

1.

Create a refractive sphere on a plane by following the instructions described in "To create refraction," earlier in this chapter.

2.

Open the Render Settings window, and set Render Using to Mental Ray.

3.

In the Mental Ray tab, select PreviewCaustics from the Quality Presets drop-down menu (Figure 16.97).

Figure 16.97. The PreviewCaustics preset automatically sets a number of Mental Ray's settings.


This option automatically turns on raytracing and caustics and sets various other Mental Ray settings to provide a preview-quality render for scenes with caustics.

4.

Select the scene's light, and press to display the Attribute Editor.

Be sure your scene is lit using a spot light or a point light rather than a directional light. You should avoid using directional lights for caustics or global illumination.

5.

In the Attribute Editor, expand the Mental Ray > Caustic and Global Illumination section, and check the Emit Photons check box (Figure 16.98).

Figure 16.98. To render caustics, you must have at least one light that emits photons.


The light will now emit photons, which will be used to calculate the caustic effects. The more photons a light emits, the more accurate the final image will beand the longer it will take to render. Here you'll use the default of 10,000 photons.

6.

Click the Render button .

The scene is rendered in the Render View (Figure 16.99).

Figure 16.99. The bright spot cast on the plane at the base of the sphere is caused by caustics.


To add global illumination:

1.

Create a test scene consisting of a primitive cube "room" that contains several other primitives (Figure 16.100).

Figure 16.100. Create a scene similar to the one shown.


2.

Add a point light within the cube.

3.

With the point light selected, open the Attribute Editor, and expand the Shadows > Raytraced Shadow Attributes section.

4.

Select Use Ray Trace Shadows.

Although it isn't necessary to use shadows with global illumination, they help demonstrate its effects.

5.

To soften shadow edges, set Light Radius to 0.3 and Shadow Rays to 50.

6.

Open the Render Settings window, and set the renderer to Mental Ray, if necessary.

7.

Click the Render button to do a test render of the scene (Figure 16.101).

Figure 16.101. Be sure to do a test render without global illumination to make sure the scene looks the way it should.


The lighting should be fairly dark, because the scene will get significantly brighter when the reflected light from global illumination is calculated.

8.

In the Render Settings window, set the Quality setting to PreviewGlobalIllum.

This option automatically turns on global illumination and specifies various settings for a preview-quality render.

9.

In the Attribute Editor for the point light, expand the Mental Ray > Caustic and Global Illumination section, and check the Emit Photons check box.

10.

Click the Render button .

The scene is rendered with global illumination at preview quality. The result is blotchy, but it gives a general sense of how the scene is lit (Figure 16.102). To improve the quality of the render, you'll need to adjust several settings.

Figure 16.102. Global illumination is very blotchy when rendered with a preview quality preset.


To adjust global illumination settings:

1.

Create a scene with global illumination by following the steps of the previous task, "To add global illumination."

2.

Open the Attribute Editor for the scene's light. In the Mental Ray > Caustic and Global Illumination section, increase the number of global illumination photons to 20,000.

3.

In the Render Settings window, expand the Caustics and Global Illumination section. Set Global Illum Accuracy to 600 and Global Illum Radius to 3.0 (Figure 16.103).

Figure 16.103. Higher values for Global Illum Accuracy and Radius improve the final result at the cost of increased render time.


4.

Click the Render button .

The scene is rendered with the new global illumination settings. This takes some time, but the final result is a much cleaner example of global illumination (Figure 16.104).

Figure 16.104. Here the scene has been rendered with the new global illumination settings.


Tip

  • Mental Ray has many options and rendering capabilities. For more advanced information about Mental Ray, see the Maya Help files.





Maya 7 for Windows and Macintosh(c) Visual Quickstart Guide
Maya 7 for Windows & Macintosh
ISBN: 0321348990
EAN: 2147483647
Year: 2006
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net