CAP 201a - Computer Animation I
Lesson 7 - Chapter 10, 3DS Max Lighting
This lesson discusses lighting in 3DS Max scenes. Objectives important
to this lesson:
- Lighting concepts
- Three-point lighting
- 3DS Max light types
- Light parameters
- Ambient light
- Lighting the Red Rocket model
- Atmospheres and effects
- Lights lister
The chapter begins with a lesson in lighting a scene. You are
advised that you cannot be a good animation lighter (lighting person)
unless you understand the requirements of a scene that will be dictated
by the objects, the textures, and the animation itself.
In addition, the text says you will need to know how to render
a scene well, which it does not discuss until the next chapter. Well,
you can't learn everything at the same time, so lets take on lighting.
The principle for this chapter seems to be to balance light and dark
in your scene. Examine the two illustrations at the bottom of page 457
to see what the author means. The same scene is shown with too much
light, and with too little light. In both cases, it is hard
to make out the objects in the scene. Unfortunately, there is more
to do than just selecting a light level for the scene, as the discussion
The text turns to 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
This is a classic
approach, but some people prefer other techniques that more
closely simulate nature. This article on light offers an
opposing point of view and other suggestions.
On page 460, the text explains that three-point lighting emphasizes one
subject in a scene, and that a three-point setup should be changed
for each different shot that a camera will take of a scene. The
text also hints 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
Another term is introduced that does not quite mean what it sounds like:
practical lighting. In some scenes, you will have objects
that are supposed to be light sources. The light that they are
meant to emit in the scene is practical lighting. The way to get
them to do this in 3DS Max is to add lights to the scene that correspond
to the locations of the objects meant to emit light. In other words, if
you create a table lamp in a scene, and it is meant to be lit, you fake
it by adding a scene light that does the job for the prop. (It's a prop,
not a scenic, because it is meant to do something.) The text also mentions
that there is a simpler work around for objects that do not give off much
light: the glow effect. It is not discussed in the text at this point.
The text turns to the types of lights that you can create in 3DS
Max. It only lists two types. Our 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 the last text.)
- standard lights - these are like real movie lights,
and they come in several sub-types:
- omnidirectional (omni) - think of a small star
that shines in all directions, like a bare light
- spotlight - light comes from a point
in 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 an object in the scene. It
will stay on the object if the object 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. 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. These lights are not discussed in this chapter.
- photometric lights - complex lights that can represent
real-world lighting. These lights are not discussed in this chapter.
- systems - simulated sunlight, with lots of parameters
to set. These lights are not discussed in this chapter.
There is another kind of light that appears naturally in scenes, the
default light. Note the explanation on page 461 that the default
light is removed from a scene when you create lights in
it. Instructions are given at the bottom of page 461 for changing the
default lighting to include two lights instead of one.
- The text goes on to explain that 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.
For simple scenes in which the viewport does not change,
either method may be enough. If your needs change, and if you are using
two default lights, page 462 tells you that you can convert
the default lights to configurable lights. (Default lights do not
have parameters.) Open the View menu and choose Add Default
Lights to Scene. The default lights will become Omni light objects
in the scene, and the default lighting will no longer be in effect. You
can reverse this by removing all lights from a scene, which will
cause whatever kind of default lighting you have configured to
come into effect.
The text continues to describe commonly used lights in 3DS Max. I have
summarized most of them above.
On page 474, the chapter turns to parameters that are common to most types of lights. You should review this material. Some observations about common parameters:
- Light in a scene can vary in color as well as in intensity. As you add more lights to a scene, you will want to consider both qualities. Mixing colors can be artistic, or it can be a case of less (fewer colors) being more (better output). It is not immediately clear how to change the color of a light. Set the color by clicking the unlabeled panel next to the Multiplier field on the Intensity/Color/Attenuation rollout. The value in the Multiplier field controls the intensity of the light.
- In real life, attenuation means fading over distance. In the real world, the farther light travels, the more it fades in intensity.
In 3DS Max, we can control attenuation. We can set where it begins and ends, and it can even work in reverse. Near attenuation means the illumination will be weak near the light source and stronger as we go away from it. Far attenuation resembles reality: the light is strong close to the light source, and weaker farther from it.
- Decay rate is a separate parameter, that can be turned on or off. In the real world, decay rate and attenuation are the same: they follow what is called the inverse square law in physics. Think about standing two feet from a lamp. Its light has a certain intensity, or brightness. Now walk four feet from the lamp. The light must travel twice as far to you. Its intensity will be 1 over the increase in distance (2, because you doubled the distance) squared. 1/2*2 = 1/4. The light will be one quarter as bright when twice as far away. Changing this or turning it off is unrealistic, but may help fake realism in a scene where we do not notice the light sources. (Inverse square is one of the decay rate choices.)
- Shadows add to the realism of a scene, and we should study placing them to best effect. Two common types of shadow generation:
- shadow maps - a bitmap is dynamically generated for shadows each time the render engine runs; this method is fast, but does not understand transparent objects
- raytraced shadows - this type of shadow casting understands transparent objects, and creates sharp edged shadows, but is slower than a shadow map method
- The text also lists less commonly used shadow types:
- advanced raytraced
- mental ray Shadow Map
- Area Shadow
The text also discusses ambient light. This is light that comes from objects in a scene, not from light sources. It is light that radiated from some light source, hit objects in the scene, and is now bouncing back from those objects (that do not radiate light themselves). It can be thought of as reflected light or indirect light. Think about walls in rooms. Why do we paint the walls of a room a light color when we want to brighten the room? It is because light colors reflect more light than dark colors, adding to the amount of ambient light in a room.
3DS Max does have an ambient light feature, but it does not produce the result we might want. Ambient light in a 3DS Max scene is set to black by default. The problem is that virtual surfaces don't work exactly like real surfaces, so you may want to use secondary light sources to produce the effect of ambient light.
The chapter continues its discussion of features for several more pages before turning, finally, to an exercise.
Project Exercise 1: Lighting the Red Rocket
This exercise starts on page 483.
- Open the file specified on page 483, and ignore the error about the decal file not being found. The problem this time is that the author is trying to use the decal displayed back on page 346, which he did not include with the provided files. It is not important to the exercise, other than the irritation you may feel each time you render the scene.
Select the Lights icon on the Create panel as instructed, then change the dropdown selection from Photometric to Standard. (This is not in the text, but it is necessary.)
- Create a Target Spot light as instructed. Note that the text says you are creating a camera in the last sentence of this step. You are not, but be advised that creating a camera is a similar process. Note that the Camera01 view changes as soon as the light is added.
Question 1: What else changed in the scene when you added the spot light that caused the difference in the Camera01 viewport?
- Activate the Front viewport, and move the light as instructed. The image in the Camera01 viewport will change as you move the light.
- Name the light.
- Find 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.)
- Follow the instructions to set the Multiplier property of the key light.
- 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 Quick Render to check the results.
The text observes, correctly, that the shadow is pretty dark, and so is the whole scene. The next procedure adds a fill light to affect both.
Project Exercise 2: Adjusting the shadow
This exercise starts on page 485.
- The 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.
- 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.
- Start adding a fill light by creating an Omnidirectional light as instructed: near the bottom left corner of the Top viewport. You can barely make out the location the author wants in the gray image in the text. In the image on the right, it is a yellow diamond, and I have added a red ellipse around it.
- Change to the Front viewport, and change the elevation of the fill light as instructed. Again, notice how the scene changes in the Camera01 viewport as you move the fill light.
- This step introduces more settings you can change on a light. The author tells us to note that shadows are turned off by default for lights (General Parameters rollout). You are told, however, to open the Advanced Effects rollout for the fill light and to turn off the Specular effect.
- To turn down the brightness of the fill light, open its Intensity/Color/Attenuation rollout and set the Multiplier to 0.3.
- Check your work with a Quick 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.
- 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.
- Quick Render. Watch the screen, particularly as the render engine redraws the shadow.
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)
- 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)
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.
The text describes one more kind of shadow: area shadows. The author observes that the shadow of a large object tends to be both hard and soft, in different parts of the shadow. The example of a telephone pole is used. The shadow of the bottom of a pole tends to be sharp near the pole, but the shadow of the top of the pole is often softer. as well as being farther away from the pole itself. A area shadow has an Area Light rollout that lets you adjust the softness of the part of the shadow farthest from the casting object.
The next topic in the chapter is Atmospheres and Effects. Oddly for this chapter, it starts with an exercise.
Project Exercise 3: Creating a volumetric light
This exercise starts on page 493.
- Open the file specified in the text. (You will not be bothered by the constant error in the last file.) Click Create panel, Lights tab, Standard (dropdown), and Target Direct.
You are told to select the Top viewport, however, at this point, none of the viewports is labeled Top. You should find, however that the upper left viewport (labeled Orthographic) is actually looking at the top of the scene.
Question 2: How can you know that the orthographic port is looking at the top of the scene?
This step continues with pictures you can't see and instructions you can't follow. First, notice that the scene already has a light called key light, and that it is a Target Direct light. What the author wants you to do is to recreate the key light that is already in the scene.
Create the new light close to the position of the existing key light.
- Change to the Front viewport, and adjust the new light and its target. When you have it adjusted well, press H to bring up the Select from Scene window. Select the key light, and delete it from the scene.
- Quick Render the Camera01 viewport. The scene will look a lot like the illustration at the top of page 495. 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 495.
- Continue with the file you saved at the end of the last exercise. Turn on the Shadows for the new light as instructed.
- 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. Do a Quick Render and note, as the book state, 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.
- Save incrementally
Project Exercise 5: Excluding an object from a light
This exercise starts on page 496.
- 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 496.
- Find the object in the list (on the left) called Glass. Click 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.
- Render again. Now the light passes through the "glass" window, hits the red rocket, and casts a shadow on the floor.
- Save incrementally.
Project Exercise 6: Adding a volumetric effect
This exercise starts on page 496. One more change, to get the desired effect.
- 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.
- In the selection window, click Volume Light and OK.
- Render again. Wonder of wonders, visible beams of light:
- Save incrementally.
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 cast.