Tuesday, August 7, 2007

Tutorial: AO and Baked Light Maps - Part 2

Execution:

First, let's take care of that skylight shadow on the ground-plane.

  1. Open the starting-point file
    1. File|Open... field-guide_ao_bake_start.max
    2. Render to see what we're starting from.
  2. Setup a new render preset for testing with skylight only
    1. Open the Render Dialog and click the Render panel
    2. Go to the "Brazil Bridge Renderer" rollout, and click "Manage..."
    3. Select "full render" from the list, and click "Clone"
    4. Rename the new preset ("Copy of full render") to "skylight only"
    5. close the "Manage Brazil r/s Renderers" dialog box
    6. In the render panel, in the Brazil Bridge Renderer rollout, change the "Active Setup:" to "skylight only"
  3. Change your renderer settings so they render skylight only
    1. In the Renderer Panel of the render dialog, open the "Brazil: Luma Server" rollout
    2. Turn off "Point Lights" and "Area Lights" in the Direct Illumination section
    3. Turn off the "On" box under Global Illumination
    4. Render. You're now seeing your skylight only render
  4. Exclude the ground-plane from skylight
    1. select the ground plane in the scene
    2. Right click the "Receiver Exclude..." button in the Luma Server's Skylight section and select "Add Selected"
    3. Render. The ground-plane should now be rendering black, as it is receiving no skylight.
  5. Put a Brazil2 Occlusion texture in the Extra Light channel of the ground plane's material
    1. open the material editor, and select the "plane" material
    2. open the Brazil2 Advanced material "Basic Surfaces Properties" rollout, and click the button that says, "(None)" in the "Extra Light" channel.
    3. Double Click "Brazil2 Occlusion" to assign the Ambient Occlusion texture to the Extra Light slot.
    4. Render.
      Tip: By default, the Occlusion map is aligned to the surface "Normals", which acts the same way skylight does, but the Occlusion map gives you more controls.
  6. Adjust the Brazil2 Occlusion shadow.
    1. First, use a tape measure helper object to measure the height of the teapot. In this scene, it is approximately 32 meters tall (that's a big teapot!)
    2. Turn on "Attenuate" in the Brazil2 Occlusion map.
    3. Set the "End" distance to about 20m.
    4. Render. The shadow under the teapot is slightly tighter, and the plane gets a bit brighter overall, but lets really make this obvious:
    5. Set the "End" distance to 5m and Render. Now the shadow looks like an illustrative 2D-drop-shadow, and we'll say this is what the director wanted.

That takes care of that skylight shadow on the ground-plane in a skylight-only situation, but as we re-enable the full GI lighting scheme, we'll realize that this problem is a bit more complex than at first glance, and that an overlooked setting in the original scene will throw our simple plan -- "fix the skylight and then bake the lighting" -- completely off the rails, requiring use of the Brazil2 Utility material to get back to our original look.