Adding Daylight Illumination

Start by switching from the default 3ds Max renderer to the mental ray renderer.

Set up the lesson:

Make the mental ray renderer active:

  1. On the main toolbar, click (Render Setup) to open the Render Setup dialog.
  2. On the Common tab Assign Renderer rollout, click (Choose Renderer) for the Production renderer (at present the label says Default Scanline Renderer).

    3ds Max opens a Choose Renderer dialog.

  3. In the Choose Renderer dialog, choose mental ray Renderer, then click OK.
  4. Close the Render Setup dialog.
  5. On the main toolbar, click (Render Production).
    TipYou can press F9 as a shortcut for clicking Render Production.

    Rendered scene with no daylight system present

    Default lights provide basic illumination in the scene, with textures and materials applied, but the rendered image appears flat and not very realistic. You need to add daylight to the scene. This will be generated by a Daylight system comprising two mental ray photometric light sources:

    • mr Sun, which simulates direct light from the sun.
    • mr Sky, which simulates indirect light created by the scattering of sunlight in the atmosphere.

    These two light sources will be accompanied by the “mr Physical Sky” environment shader, which generates the physical appearance of the sun and sky.

  6. Close the Rendered Frame Window.

Create the Daylight system:

  1. On the Create panel, click (Systems). On the Object Type rollout, click Daylight to turn it on.
  2. 3ds Max opens a Daylight System Creation dialog that prompts you to add an “mr Photographic Exposure Control” to the scene.

    Click Yes to add the mental ray Photographic Exposure Control with the recommended Exposure Value of 15.

    TipIf 3ds Max doesn't open the Daylight System Creation dialog, choose Rendering Exposure Control. On the Exposure Control rollout, choose "mr Photographic Exposure Control," then on the "mr Photographic Exposure Control" rollout, choose Exposure Value (EV). Make sure the Exposure Value is set to 15.
  3. In the Top viewport, click anywhere over the compound and drag slightly in any direction to create a compass rose.
  4. Release the mouse button.

    As soon as the mouse button is released, a Daylight object, or “sun,” is created.

  5. Move the mouse upward to position the daylight object in the sky. You can watch the object’s position in the Front viewport. The exact height of the Daylight object in the sky is not important.
  6. Click once to set the Daylight object position, then right-click to end Daylight creation.

Set the time and location of the light source:

Now you will reposition the Daylight object, or “sun,” so its position in the sky corresponds to the geographic location of the scene.

  1. With the Daylight object selected, go to the Modify panel, and on the Daylight Parameters rollout, click Setup.

    3ds Max displays the Motion panel.

  2. In the Motion panel Control Parameters rollout Location group, click Get Location.
  3. On the Geographic Location dialog, open the Map drop-down list, and choose South America.
  4. On the map, click on Nicaragua, or choose Managua Nicaragua from the City list displayed to the left.

    After you click OK, 3ds Max positions the Daylight sun object to simulate the real-world latitude and longitude of Managua.

    The Control Parameters Time group displays controls that let you modify the date and time of day, which also affects the position of the sun. The first scene you will illuminate and render is morning at 9 AM.

  5. In the Time group Hours spinner box, set the time to 9.
  6. In the Location group, set the North Direction to 110 degrees.

    This adjustment reorients the north-south position of the scene so when you render the late-day version of the scene, the sun disc will appear over the barracks as it prepares to set in the west.

  7. Right-click the Camera01 viewport and press F9 to render the scene.

    Rendered scene with Daylight object positioned at 9am

    Now objects are lit well, and they cast shadows, but the sky is still a blank.

  8. With the Daylight object selected, go to the Modify panel.
  9. On the Daylight Parameters rollout, open the Sunlight drop-down list and choose “mr Sun.”
  10. Also on the Daylight Parameters rollout, open the Skylight drop-down list and choose “mr Sky.”

    3ds Max opens a dialog that asks if you want to add the “mr Physical Sky” environment map to the scene.

  11. Click Yes to add the “mr Physical Sky” shader as an environment map.
  12. Render the Camera01 viewport again.

    Rendered scene with mr Physical Sky shader added

    Now the scene looks like a sunny morning. Notice, however, that the regions behind the barracks doorways remain unnaturally dark. One way to solve this would be to increase the number of ray bounces used for Indirect Lighting. An alternate way is to add Sky Portal objects to the scene. The next section describes this method.

Save your work:


Using Sky Portals and Photographic Exposure Control