CAP 201a - Computer Animation I

Lesson 9 - Chapter 14, Introduction to Lighting

Objectives:

 

Chapter 14 introduces lighting in 3DS Max scenes. Objectives important to this lesson:

  1. Lighting concepts
  2. Three-point lighting
  3. 3DS Max light types
  4. Light parameters
  5. Ambient light
  6. Lighting the Red Rocket model
  7. Shadows
  8. Atmospheres and effects
  9. Light lister
Concepts:

The text begins with a classic lighting technique: three-point lighting. Three kinds of lights (you can have more than three lights) are used in this method:

  • key light - the main light for your scene; the text explains that you should place a key light in front of the subject, and to one side, making the main light in the scene come from that direction, and cast shadows accordingly
  • fill light - a light that fills in shadows that would make the scene too dark; the fill light may also be placed in front of the subject, but it will shine at a different angle, and will be less intense than the key light
  • back light- also called a rim light; a light that fills the background of the subject to give it depth and separation from the rest of the scene

On page 290, the text explains that three-point lighting emphasizes one subject in a scene. It implies, but does actually state that a three-point setup should be changed for each different shot that a camera will take of a scene. The last version of the text also hinted that there are other purposes for lights by mentioning a background light, which is for the background of the scene, not the back side of the main object. It is possible that you will need a background key light, and a background fill light as well.

The text turns to the types of lights that you can create in 3DS Max. It only lists two types. A previous text listed three types:
(It occurs to me that this discussion of lights from the last text requires you to know something about cameras. Your author does not discuss cameras until the next chapter. Follow this link to notes about cameras for a past text.)

There is another kind of light that appears naturally in scenes, the default light. Note the explanation on page 290 that the default light is removed from a scene when you create lights in it. You can change the default lighting in 3DS Max to include two lights instead of one.

  • If you have one default light, it will act like a key light that moves as you change the view in a viewport. It seems to stay in front of the main object, on the object's upper left side.
  • If you have two default lights, the second acts like a fill light, which is an improvement, but neither light will move as you change the view in a viewport. The default fill light will seem to be behind the main object, to the lower right of it, when the light is created.

The text continues to describe commonly used lights in 3DS Max. I have summarized most of them above.

Project Exercise 1: Lighting the Red Rocket 

This exercise starts on page 297.

  1. Set the project folder to be the Red Rocket folder again. Open the file specified on page 297.
    Select the Lights icon on the Create panel as instructed, then change the drop down selection from Photometric to Standard. (You would think something named "Standard" would be the default. It is not.)
  2. Create a Target Spot light as instructed.
  3. Activate the Front viewport, and move the light as instructed. The image in the Camera01 viewport will change as you move the light.
  4. Name the light.
  5. Turn on shadowFind the General Parameters rollout for the light, and put a check in the On box for Shadows. (The On box for Light Type should already be checked.)
  6. Follow the instructions to set the Multiplier property of the key light to 0.8 instead of 1.
  7. Change the Hotspot and Falloff values as instructed. Note: this is an artistic choice. The values you use affect how the scene will look. Do not depend on the viewports to see the effect. Do a Production Render to check the results.


I did this several times and never got a shadow to show up in the render. What do you suppose the problem might be?

Render with Light behind camera

The answer is that my light is located behind my camera. This problem cannot occur in this way in the real world. If you stood in front of your light, you and the camera would cast a shadow on the subject. In the virtual world of 3DS Max, you are not there and the camera casts no shadow, so you do not notice the bad placement. The model is casting a shadow, but it is behind the model where we do not see it. I will leave the camera in place, and move the light over toward the right side of the stage.

Render with light moved to one side

Oh, look, a shadow. The scene is awfully dim, though, isn't it? We will fix that with a fill light.

Project Exercise 2: Adjusting the shadow and the light level 

This exercise starts on page 299.

  1. Add omni fill lightThe author tells us that the rocket appears to be floating in the scene, and that this is caused by the shadow being too far away from it. Change the scene as instructed: select the key light, find the Shadow Map Params rollout, and change the Bias property 0.1.

    The value of Bias determines how far away from an object its shadow starts. Shadows that start very close to an object make it look like the object is resting on a surface.
  2. Change the Size to 1500, which does not change the size of the shadow, but changes the number of pixels that will be used to create it. The larger the value, the greater the pixel density of the shadow.
  3. Start adding a fill light by creating an Omnidirectional light as instructed: near the bottom left corner of the Top viewport.

    In the last version of the book, you could barely make out the location the authors wanted you to use in the gray picture in the text. In this version of the book, guess what? No picture at all!

    In the image on the right, the omni light is a yellow diamond, and I have added a red ellipse around it. That's about where you want it.
  4. Change to the Front viewport, and change the elevation of the fill light as instructed. Notice how the scene changes in the Camera01 viewport as you move the fill light.
  5. This step introduces more settings you can change on a light.
    The authors tell us to note that shadows are turned off by default for lights (General Parameters rollout).
    You are told to open the Advanced Effects rollout for the fill light and to turn off the Specular effect. Do that and continue.

    You should be asking yourself why you should turn this effect off. It's because this fill light is being used to simulate ambient light. Ambient light is indirect light, and should not cause a specular highlight to be created unless it is unusually bright.(Let's see. If the indirect light were caused by the reflection of light from a thermonuclear event, that might be bright enough.)
  6. To turn down the brightness of the fill light, open its Intensity/Color/Attenuation rollout and set the Multiplier to 0.3. The multiplier value is the brightness value.
  7. Check your work with a Render. The instructions have still not corrected the dark shadow. This begs a question: how dark should the shadow be? In this scene, the area covered by the shadow should be no darker than the ambient light in the room would make it, if the key light were not there.
  8. To correct the dark shadow, select the key light (because it is casting the shadow), then open its Shadow Parameters rollout. Change the Object Shadows Dens (density) value to 0.8, which is lighter than 1.
  9. Render. Watch the screen, particularly as the render engine redraws the shadow. The effect is more pronounced the more pixels you devote to the render. In the image below, you can just notice some of the changes.

    Added fill, changed bias, etc.

The text continues with a discussion of methods to fine tune shadows. As noted above, the default type of shadow is a shadow map, which is a bitmap generated by the render engine. It is quicker to render than other types of shadows, but it does not work properly with transparent objects, like glassware. The text describes three parameters that may be adjusted to make better shadow maps:

  • Bias - as discussed above, this moves the shadow closer to an object (smaller value) or farther away from it (larger value). In general, a small value will reinforce the idea that the object is close to the surface receiving the shadow.
  • Size - as discussed above, this increases or decreases the number of pixels used in the bitmap. Higher values give more resolution to the shadow. Lower values make the shadow blurrier, and jaggier.
  • Sample Range - determines whether the shadow has a hard edge (lower values) or a soft edge (higher values). You can think of a soft edge as a shadow that has a more gradual falloff.

The text turns to the next most used type of shadow: raytraced shadows. Raytracing follows rays of light in the scene as they are reflected and/or refracted by objects. We should see more on this in the chapter on rendering. Yes, we are doing a lot of rendering in this chapter. You have not used any of the options for it yet.

The next topic in the chapter is Atmospheres and Effects. You should like the progression in this section to a nice special effect at the end.

Project Exercise 3: Creating a volumetric light 

This exercise starts on page 304.

  1. Open the file specified in the text. Your click path: Create panel, Lights tab, Standard (drop down), and Target Direct.
    You are told to select the Top viewport. Create a light that is in a position like the one in the pictures on page 304. You will adjust its position as we go.
    Create the new light close to the position shown in the text.
  2. Change to the Front viewport, and adjust the new light and its target. Adjust its target? Yes. A target light has a little cube object where the focus of the light occurs. Find that cube, and you can select it and move it. The trick is to find the target cube. If you just move the light, the target remains wherever it already is.
    When you have adjusted both the light and the target, name the light Key Light. Make sure you are naming the light, not its target.
  3. Render the Camera01 viewport. The scene will look a lot like the illustration at the top of page 305. The text observes that the scene is being lit from the direction of the light. No, it isn't but the book won't admit that for a few paragraphs. If you render the scene, you should notice that the only light in it is not coming from your new object. It is coming from hidden omni lights. Why isn't your light working? Could something be in the way? Patience, illumination is coming.

    Save with your initials in the name to prevent overwriting the original file.
    Now, continue with the next part.

Project Exercise 4: Adding shadows 

This exercise starts on page 305.

  1. Continue with the file you saved at the end of the last exercise. Turn on the Shadows for the new light as instructed.
  2. Find the Shadow Map Params rollout. Set the Size to 2048 (to get more detail than the default size) and set the Bias to 0.1 to move objects' shadows closer to them. Render and note, as the book states, that you do not see any shadows.
    As the text explains, the light you created is not shining into the scene, because the window in the scene is blocking the light. You need to tell the light to ignore the window. That's in the next exercise.
  3. Save incrementally

Project Exercise 5: Excluding an object from a light 

This exercise starts on page 306.

  1. Continue with the file you saved at the end of the last exercise. Find the General Parameters rollout for your light. The Exclude button is in its lower right corner. Click it. You will see the Exclude/Include selection window, as shown in the illustration on page 306.
  2. First, make sure the radio button near the top right of the dialog box that just opened is set for Exclude, not Include.
    Find the object in the list (on the left) called Glass. Select it, then click the button that looks like two greater-than symbols (>>) to add the Glass object to the list of objects excluded from the effects of the light. Click the OK button.
  3. Render again. Now the light passes through the "glass" window, hits the red rocket, and casts a shadow on the floor.
  4. Save incrementally.

Project Exercise 6: Adding a volumetric effect 

This exercise starts on page 307. One more change, to get the desired effect.

  1. Continue with the file you saved at the end of the last exercise. Find the Atmosphere & Effects rollout for your light. Click the Add button in it.
  2. In the selection window, click Volume Light and OK.
  3. Render again. Wonder of wonders, visible beams of light:
    Volumetric light
  4. Move the light as needed to get a good effect in the scene. Save incrementally.

The text provides a list of settings to try with the Volume Light object. Try some before you show me your work on this scene.

The last topic in the chapter is the Light Lister.
The Light Lister gives you quick access to key features for lights. Note that it actually tells you what to click to change the color of a light. To see it, open the Tools menu (third item on the menu bar) and select Light Lister. Try giving the sunlight a yellow or red cast.