Render the scene using raytracing

 
 
 

To better understand the differences in a rendering performed using direct lighting methods vs. global illumination, you begin by rendering the scene using the mental ray for Maya renderer without using Global Illumination.

You start by performing some preparatory setup and then render the scene. In this section you:

Using the mental ray for Maya renderer

To use the Global Illumination feature in Maya you must render using the mental ray for Maya renderer.

You initially render the scene without using Global Illumination.

To change the renderer to mental ray for Maya

  1. In the main menu, select Window > Rendering Editors > Render Settings (or click the Render Settings icon on the Status Line) to display the Render Settings window.
  2. In the Render Settings window, set the Render Using setting to mental ray.

    When you render an image it will use the mental ray for Maya renderer.

    Note

    When you switch between renderers in Maya (for example, Maya Software, Maya Hardware, and mental ray for Maya), the common Render Settings do not require re-setting.

    TipIf mental ray does not appear under the list of renderers, you must load the mental ray plug-in via the Plug-in Manager. Select Window > Settings/Preferences > Plug-in Manager and select Loaded for the Mayatomr.mll plug-in.

When you perform repeated test renderings for a particular scene, consider the time it takes for each render to complete. If you reduce the time it takes to render each test image, the testing process proceeds much faster.

Setting render settings for raytracing

For the first rendering test, you render the scene to see how the scene appears without Global Illumination. The testing process proceeds faster if the quality level for the image is initially set low.

To set presets for rendering

  1. At the top of the Render Settings window, click on the Quality tab and set the Quality Presets setting to Draft.

    The Draft setting ensures low anti-aliasing settings are used and reduces the rendering time compared to other preset settings. This is a good practice when evaluating the lighting and basic material properties in your test renderings.

Setting the image size for rendering

You set the size that an image is rendered in the Render Settings window. For this lesson, you render the image at a size that allows you to evaluate the Global Illumination effect.

To set the image size for rendering

  1. In the Render Settings window, select the Common tab and open the Image Size settings.
  2. Set the Preset to 320 X 240.

    This sets a small image size for your rendering tests. The smaller image size renders in less time when compared to a larger image size.

  3. Close the Render Settings window.

Turning on shadows

Shadows add realism to a scene, and in this lesson, help to demonstrate how a scene rendered using Global Illumination differs from a scene rendered using direct illumination.

To turn on shadows for the spotlight

  1. Open the Hypershade window (Window > Rendering Editors > Hypershade) and click on the Lights tab to display the lights in the scene.

    The scene is lit with one spotlight named spotLightShape1.

  2. In the Hypershade window, double-click the icon for spotLightShape1 to display the attributes for the spotlight.
  3. In the Attribute Editor, click the spotLightShape1 tab to display the lighting attributes for the spotlight. (You may need to minimize the Hypershade window to see all of the Attribute Editor.)
  4. In the Shadows section, open the Raytrace Shadow Attributes turn on Use Ray Trace Shadows. This turns on shadows for the spotlight.
    Note
    • Light Radius: Use the Light Radius attribute to control the softness of shadow edges. For example, a large light produces softer shadows than a small light. This attribute is only available for point lights, volume lights and spot lights. The slider range is 0 (hard shadows) to 1 (soft shadows). The default value is 0. The light radius is also used for light glows to determine the occlusion/visibility (for point and spot lights).
    • Shadow Rays: Controls the graininess of soft shadow edges. Increasing the number of Shadow Rays also increases rendering times, so set it to the lowest value that produces acceptable results. The slider range is 1 to 40. The default setting is 1.
  5. Close the Attribute Editor and Hypershade window.

Rendering the image

When you render an image, all of the objects, lighting, shading materials, and image quality settings are used to calculate the image, based on the particular camera view that is set.

To render an image using mental ray for Maya

  1. Click in the perspective window. This indicates which camera view you want Maya to render.
  2. On the Status Line, click the Render Current Frame icon to launch the renderer to produce an image.

    The Render View window appears and the fruit bowl scene renders using the mental ray for Maya renderer.

  3. Once the render is complete, click the Keep Image icon in the Render View window to save this image.

    Keeping the image allows you to compare it to any subsequent test renders you produce. In this lesson you compare each rendered image to the previous ones to understand how the changes you make in various settings affect the rendered image.

    The rendered image shows the fruit bowl lit from the right of the frame. The upper and lower portions of the image are in shadow where the edges of the wall prevented the spotlight from lighting those portions of the scene. The shadow areas appear dark and do not show any detail of the floor or walls. This illumination effect is typical of an image produced with a single light source and direct illumination.