Saving and Rendering a Scene
 
 
 

Set up the lesson:

Open and navigate to the \tutorials\scene_management folder. Highlight balcony_scene-states.max and click Open.

Switch global illumination engines:

Before beginning this lesson, you will first disable Radiosity and use the mental ray renderer to simulate global illumination. It will speed up rendering in this case because it’s not necessary to recalculate the solution every time you make a change.

  1. From the Rendering menu, choose Advanced Lighting > Radiosity.
  2. From the Select Advanced Lighting drop-down menu, choose <no lighting plug-in>. Click Yes to dismiss the warning that displays.
  3. Open the Common tab. On the Assign Renderer rollout, click the button next to Production.
  4. Choose the mental ray Renderer, and then click OK.
  5. Open the Indirect Illumination panel.
  6. On the Caustics And Global Illumination rollout, in the Global Illumination group, turn on the Enable checkbox. Leave all other parameters at their default settings.

  7. Render the Camera01 viewport to test the results.

Saving scene states:

  1. Right-click in the Camera viewport.
  2. From the quad menu that displays, choose Save Scene State.

  3. In the Save Scene State dialog, select all the scene parts so that cameras, environment, layers, lights, materials and object properties will be saved with the scene state.

  4. Name the scene state DAY.
  5. Click Save to exit the dialog.

Changing scene parameters:

  1. Go to the Display panel.
  2. On the Hide by Category rollout, turn off Lights.

    Three lights appear in the scene: one that simulates the sun (Sun01), one that simulates global ambient lighting (Sky01), and a simple bulb (FPoint01).

  3. In the Top viewport, select the Sun01 object.
    TipIt may be easier to select Sun01 by pressing H to open the Select Objects dialog.
  4. On the Modify panel, in the Sun Parameters rollout, turn the light off.

  5. Press H to open the Select Objects dialog.
  6. Double-click the object named FPoint01 to select it.

    This represents the bulb that will light the scene at night.

  7. On the Modify panel, in the General Parameters rollout, turn the FPoint01 light on.

    NoteYou do not need to change the state of the IES Sky object since skylight objects are not recognized by the Mental Ray Renderer.
  8. Render the Camera viewport.

    The scene is very dark, and the background still displays daytime lighting.

  9. From the Rendering menu, choose Environment. In the Logarithmic Exposure Control Parameters rollout, turn off the Exterior Daylight option.

  10. Press M to open the Material Editor. Locate the material named Background, and select it.
  11. At the bottom of the Material Editor, expand the Output rollout. Set the RGB Level value to 0.2.

    This will make the background image much darker to simulate a scene at night.

  12. Render the Camera viewport again and notice the changes.

  13. Right-click in the Camera viewport. From the quad menu, choose Save Scene State.
  14. In the Save Scene State dialog, select all the scene parts.
  15. Name the scene state NIGHT.
  16. Click Save to exit the dialog.

Restore scene states to render:

  1. Right-click in the Camera viewport, and choose Restore Scene State from the quad menu.

    Notice the cascading menu lists the two scene states you previously saved.

  2. Choose DAY to restore the daytime scene.

    Notice in the Top viewport that the point light is displayed in black, which means it's inactive. Sunlight is displayed in yellow, which means it is enabled.

  3. Render the Camera viewport to see that all scene parts such as light effects and environment backgrounds have been restored to their original states.