CAP 203 - Computer Animation III

Chapter 3: Lighting


This lesson covers material from chapter 3 of the text. Objectives important to this lesson:

  1. Lighting basics
  2. Exterior basics
  3. Interior
  4. Sunlight in a room
  5. Mental ray lighting

This chapter has lots of exercises, so we will hit several.

Before we begin the first exercise, there are some basic things about light that the text does not mention. A review from CAP 201 may be useful:

There are three major types of lights in 3DS Max, and lots of subtypes.

  • standard lights - these are like real movie lights, and they come in several sub-types:
    • omnidirectional (omni) - think of a small star or a bare light bulb that shines in all directions
    • spotlight - light starts at a point and grows into a cone shape. In this case, the cone is really two cones that can be set with the same dimensions. The cones are called the hotspot and the falloff. The hotspot is the brightest part of the light, the falloff is the outer cone that is larger and dimmer than the hotspot at most focal settings. When the hotspot and the falloff have the same value in 3DS Max, the light is a sharp spot like you see in a live theater. When the falloff has a larger value, the light from the spot has two regions, and a more gradual change between them. To see the effect in real life, get a MagLite (or other focusing flashlight) and change the focus in a dark room. Unlike a MagLite, you can change the shape of a spotlight.
      Spots come in two sub-types:
      • target - like a target camera, a target spot can be linked to a location in the scene. It will stay pointing at the location if the light is moved (animated).
      • free - free spots can and must be pointed manually at the objects you want them to light
    • direct -the text describes the light from a direct light as coming through a cylinder instead of a cone; the light does not spread out like the cone of a spotlight. It is more like a laser beam that maintains its shape without spreading. Like spots, these lights also come as target or free lights.
    • skylight - simulates outdoor lighting
    • mr Area Omni and mr Area Spot - variations on the omnidirectional and spot lights that are used with the mental ray renderer, a rendering engine that traces rays of light in a scene to realistically portray reflections
  • photometric lights - complex lights that can represent real-world lighting
  • systems - simulated sunlight, with lots of parameters to set

There is another kind of light that appears naturally in scenes, the default light. Remember that the default light is removed from a scene when you create lights in it.

In various lessons the author uses the Light Lister dialog box to quickly change parameters for several lights at once. This is handy when trying to adjust a light problem that must be changed mathematically, but whose result must be judged visually. Look for the Light Lister on the Tools menu.

Here is another thing that will help you with this text, in case you have not worked this out yet. The author continues to provide map files for the scenes that are named incorrectly. Apparently, this version of 3DS Max cares about capitalization in file names. Good lord, why? We must accept that it does. We must also accept that the author has supplied files whose names are different from the ones she used to build the scene in other ways, such as spaces in one name, underscores in another. Method to correct the problem:

  1. Open one of her scenes.
  2. When the Missing External Files screen appears, as it often does, move the screen a bit so you will be able to read it while you do the next several steps. Moving it to the upper left corner of your monitor may be good.
  3. Click the Browse button. The Configure External File Paths dialog box will appear. Drag it back toward the center of the monitor so you can easily read the Missing External Files screen. Click the Add button on the Configure External File Paths dialog box.
  4. Navigate to the folder where you have saved your copies of the map files for this scene. Find a file whose name is similar to the first one on the list. It is important that this is the right file.
  5. Select the file whose name is similar to the first one in the list, right click it,and select Rename. Change the name of the file so that it matches the name in the Missing External Files window exactly. The entire name must match, including the file extension. (If your computer is configured not to show file extensions, that must be corrected or this procedure will not work.)
    When the filename is identical, press Enter to save the name change.
  6. Select the file whose name you just changed, and click the Use Path button.
  7. Repeat this process for each file named in the Missing External Files list. When you have processed all the files, click the OK button on the Configure External File Paths screen. The list of files on the Missing External Files screen should disappear. If file names remain, you have more corrections to make.
    As we have observed in class, it is also possible that the scene is looking for a file that is not even used in the scene, such as a map for a sample slot that is configured but unused. If this is the case, select that sample slot and click the Reset Material button to clear it. Save the scene again, and that particular error will stop being an issue for the scene.

1-2-3 Lighting

The first lesson we will consider in the chapter is 1-2-3 Lighting on page 82. The author is illustrating the classic three-point lighting scheme, which you will recall can use more than three lights, and more than three points.

  1. Open the start file for this lesson. Take a deep breath before starting the exercise, since the author sets a new standard for arranging sequential steps on a page. Overview: read page 82 first. Then look at page 83: step 1 is at 1 o'clock, step 2 is at 9 o'clock, step 3 is at 6 o'clock, and step 4 is at 11 o'clock. I hope she doesn't draw comic books.
    I get it, she is trying to diagram the scene. She already did that on page 82. We'll use her innovation as the inspiration for part of this assignment.
    In step 1, she states that the key light should be the brightest light in the scene. That is one definition of a key light. The location in which you place a key light will not always be the same. In the author's example, the key light may be telling us that it is about ten in the morning on a sunny day. Follow her advice: set up a direct or spot light as she indicates.
  2. Note that she is using omni lights for the other three lights in this scene. In step 2, she is adding an omni light that is a fill light. It should logically be placed on a side of the scene away from the key light. One way to think of it is that the fill light reduces harsh shadows cast by the key light. If the key light is shining from the southeast, the fill light may need to be on the southwest, as indicated, or even the northwest if necessary. Place a fill light in the scene as she indicates.
  3. She adds an omni light under the ground level of the scene, to simulate ambient light bouncing off the ground. Note that this should work, since we have not told the new light to make shadows. (See the tip on page 83 about turning on the Shadow checkbox for a light.) Add a light like this, without shadows, and adjust the intensity level as needed. Why do we care about shadows? A light that casts no shadows can illuminate objects, and it can pass through them as well, to illuminate what is beyond the objects.
  4. Experiment with her fourth light, the rim light, adding a little light to the top of objects in the scene.
  5. New step: see if you can make an animation out of this lesson. I would like to see the lights and their effects added to the scene, one by one. Include some movement of the lights to show the difference in different placements.
  6. Save your file. Render an animation of it, and show it to me.

Exterior lighting

This exercise is on pages 84 and 85. This time the author uses only three lights in her three-point scheme to simulate an outdoor scene.

  1. In step 1 add a direct light to stand for the sun, as indicated by her instructions. Note that she set her key light multiplier to 1.5. See if this is a reasonable setting.
  2. Add an omni light for a fill light. Note that her setting for the fill light multiplier is only a third as bright as the key light multiplier.
  3. She refers to her underground, ambient light as a dim light. Remember that you will want to balance the multipliers of the three lights to reflect whatever actual weather, location, and latitude you are trying to simulate.
  4. Put a camera in the scene, and fly it around to show off the lighting.
  5. Save your file. Render an animation of it, and show it to me.

Interior lighting

This exercise is on pages 86 and 87. The author indirectly makes a point in this lesson that we have been able to fudge a bit in the outdoor scenes. Indoors, the placement of lights needs to be a bit more deliberate, since the light is meant to be coming from light fixtures that we will be able to see in the scene. As such, the placement of our scene lights should often coincide with the placement of the prop or stage dressing lights. Let me hit that again: a mesh that looks like a lamp will not produce illumination until you add a light object to the scene in the same location. The mesh is just a prop or stage dressing. The light object creates the special effect.

  1. Load the scene file, and note the locations of the four major lights. Ignore the windows for this exercise, but think about what you would do if you were not to ignore them.
    Add a spot light at one chandelier and at one entryway light as indicated in the text, and enable them to cast shadows.
  2. Clone the two lights above so that you get instances of those lights on the right side of the scene. The author's point is that instancing these lights will allow you to adjust both entryway lights (and both chandeliers) at once. That would be a problem, however, if you wanted them to be different from each other.
  3. Add omni lights for fill lights and for ambient light.
  4. Save your file. Render a representative frame, and show it to me.

Bright sunshiny day

This exercise is on pages 88 and 89. The exercise uses the scanline renderer, but includes some features to make the light a little better.

  1. Another in a series of short exercises. Open the start file. This time begin with a direct light, like the outdoor scene. Follow the instructions in step 1 to set the shadow type for this light to ray traced shadows.
  2. The author placed some omni lights in the scene to simulate ambient light caused by the sunlight entering through the window. She turned on shadow casting for these lights, which works because the lights are in the middle of the room, but no props are in this location. Only a few shadows will be cast, by objects close to the walls. Configure the shadows for these lights as indicated in the text.
  3. Now for something completely different. She wants the window pane to glow with a render effect, to simulate a much brighter environment on the other side of the window.
    Open the Material Editor and select the window pane material as shown on the bottom of page 89.
    Change the Material ID Channel for this material to a new channel (not 0).
    Follow the directions to create a Glow Effect, and configure its Material ID to the same number you used for the window pane material. The text says to adjust the Intensity and Size parameters for the effect to fine tune it. You may want to know that since this is a Render effect, you must view it in a render window to see it.
  4. As before, render a frame, save it to a file and show it to me for grading.

Mental Ray lighting

This exercise is on pages 92 and 93. The introduction to the exercise tells you how to switch from the scanline renderer to the mental ray renderer.

  1. The external scene already has all the changes in it that the author describes. You can load the scene and experiment with variations in her settings. The results of each change will be difficult to see. I suggest that you save each frame you render with some notation about the change you made, so you can examine the frames side by side in Photoshop to look for changes that produce differences.
  2. In step 2, the author has changed the ballroom scene to use Mental Ray. This scene displays the advantage of Mental Ray reflections much better. It also displays the difference in rendering time required by the Mental Ray renderer. Open the Light Lister, check her settings, and try some variations that occur to you.
  3. Steps 3 through 6 concern the same scene. Once again, open the scene and compare the original that you have seen before to this version.