Chapter 10. 3ds Max Lighting

Light is everything. By light we see, and by light we show. Light shapes the world around us and defines shape, color, and texture. Computer graphics hang on every word light has to whisper. Without faithful lighting, any good computer graphic will fall to its knees and fail. Lighting is the most important aspect of CG, and it just simply cannot be mastered at a snap of the fingers. The trick to correctly lighting a CG is understanding how light works and seeing the visual nuances it has to offer.

In this chapter, you will study the various tools used to light in 3ds Max. This chapter will serve as a primer to this most important aspect of CG. It will start you on the path by showing you the tools available and a place to begin.

Topics in this chapter include:

  • Basic Lighting Concepts

  • Three-Point Lighting

  • 3ds Max Lights

  • Common Light Parameters

  • Ambient Light

  • Creating Shadows

  • Atmospheres and Effects

Basic Lighting Concepts

On a conceptual level, the lighting in 3ds Max mimics the real-world direct-lighting techniques used in photography and filmmaking. Lights of various types are placed around a scene to illuminate the subjects as they would for a still life or a portrait. Your scene and what's in it dictate, to some degree at least, which lights you put where. A number of considerations must be kept in mind when settling on a methodology and light types for CG, but the overall concept of lighting is strikingly similar between a real-world set lighting and CG.

At the basic level, you want your lights to illuminate the scene. Without lights, your cameras have nothing to capture. Although it seems rather easy to throw your lights in, turn them all on, and render the scene, that couldn't be further from the truth.

Lighting is the backbone of CG. Although it is technically easy to insert and configure lights, it is how you light that will make or break your scene. That skill really only comes with a good deal of experience and experimentation, and it requires a good eye and some patience.

In this chapter, you will learn the basic procedures for lighting a scene in 3ds Max. No single chapter could explain everything about lighting, and no beginner or intermediate CG student should expect to quickly master the art of lighting CG. In short, lighting touches every single aspect of the CG pipeline. A strong lighter understands modeling form and is able to make adjustments to enable efficient lighting. Lighters understand motion and how to light for it. They understand textures and materials, and they frequently are tasked with creating or adjusting materials to work perfectly with their lights. Strong lighters are also rendering experts. When it's time to render, they must know what is and is not doable in a scene. They must diagnose problems and overcome obstacles to make sure every frame is rendered faithfully and with artistic merit.

Develop Your Eye

To be an artist, you must learn to see. This is especially true when CG lighting. There are so many nuances to the real-world lighting around us that we take them for granted. We intuitively understand what we see and how it's lit, and we infer a tremendous amount of visual information without much consideration. With CG lighting, you must re-create these nuances for your scene. That amounts to all the work of lighting.

The most valuable thing you can do to improve your lighting technique is to relearn how you see your environment. Simply put, you must refuse to take for granted what you see. If you question why things look the way they do, you'll find that the answers almost always come around to lighting.

Take note of the distinction between light and dark in the room you're in now. Notice the difference in the brightness of highlights and how they dissipate into diffused light and then into shadow.

When you start understanding how real light affects objects, you'll be much better equipped to generate your own light. After all, the key to good lighting starts with the desire to simply create an interesting image.

Your Scene and Its Needs

Your scene needs a careful balance of light and dark. Too much light will flatten your image and lose details in form. This is the first mistake many beginners make; they tend to over-light to make sure everything is lit. Figure 10.1 is a still life rendering that has too many bright lights. The lighting only flattens the image and removes any sense of depth and color.

On the other hand, under-lighting a scene will make it muddy and gray and pretty lifeless. Your details will end up covered in darkness, and everything will flatten out as well. Figure 10.2 shows you the same still life that is under-lit. You hardly notice the details in the mesh.

Your first job as a lighter is to find the balance between over-lighting and under-lighting. It sounds simple, and it is—although it requires lighting a shot several times and test rendering it to check the outcome. Like a photographer, you want your image to have the full range of exposure. You want the richest blacks to the brightest whites in your frame to create a deep sense of detail. Figure 10.3 shows you a fairly well-balanced lighting for the same still life. The light and shadow complement each other, and the lighting works to show off the features of the objects in the scene.

An over-lit still life

Figure 10.1. An over-lit still life

An under-lit still life

Figure 10.2. An under-lit still life

When the lighting is balanced, the image is more interesting.

Figure 10.3. When the lighting is balanced, the image is more interesting.

Three-Point Lighting

Three-point lighting is a traditional approach to lighting a television shot. After all these years, the concepts still carry over to CG lighting. In this setup, three distinct roles are used to light the subject of a shot. More than one light can be used for each of the three roles, but the scene should in effect seem to have only one primary, or key, light, a softer light to fill the scene, and a back light to make the subject pop out from the background.

A three-point lighting schematic

Figure 10.4. A three-point lighting schematic

This does not mean there are only three lights in the scene. Three-point lighting suggests that there are three primary angles of light for your shot, dependent on where the camera is located.

Three-point lighting ensures that your scene's main subject is well lit and has highlights and a sense of lighting direction using shadow and tone. Figure 10.4 shows you a plan view of the three-point lighting layout. The subject is in the middle of the image.

Key Light

A key light is placed in front of the subject for the primary light. The key is placed off to one side to give a sense of direction to the light, because one side will be brighter than the other. Shadows will fall from this light to heighten the sense of direction and increase the depth of the shot.

Although it is possible for several lights to fulfill the role of key light in a scene—for example, three ceiling lights overhead—one light should dominate, creating a definitive direction. Figure 10.5 shows the subject being lit by a single key light.

Here, the key light produces a moody still life. It may be composed of more than one 3ds Max light, although the intent would be that all the lights that comprise the key should come from the same angle, roughly.

Fill Light

A more diffused light than the key light, the fill light seems directionless and evenly spread across the subject's dark side. This fills the rest of the subject with light and decreases the dark area caused by the key light.

The fill light shouldn't necessarily cast any shadows onto the subject or the background. In fact, the fill light is actually used to help bring up the darkness and soften the shadows created by the key light. Figure 10.6 shows the same still life with an added fill light in the scene. The fill light clearly softens the shadows and illuminates the dark areas that the key light misses by design.

In most cases, you'll need to place the fill light in front of the subject. The fill, however, is aimed so that it shines from the reverse side of the key light. This angle intentionally targets the dark side of the subject. Even though the still life in Figure 10.6 is still a fairly moody composition, much more is visible than with only the key light in Figure 10.5.

Back Light

The back, or rim, light is placed behind the subject to create a bit of a halo, which helps makes the subject pop out in the shot. As a result, the subject has more presence against its background. Figure 10.7 shows how helpful a back light can be.

The back light brings the fruit in this still life out from the background and adds some highlights to the edges, giving the composition more focus on the fruit.

Key light only

Figure 10.5. Key light only

A fill light is now included.

Figure 10.6. A fill light is now included.

A back light makes the subject pop right out.

Figure 10.7. A back light makes the subject pop right out.

Don't confuse the back light with the background light, which lights the environment behind the subject.

Three-Point Lighting in Action

The focus of the three-point lighting system is the primary subject of the shot. Of course, this means the lighting is based on the position and angle of the subject to the camera. When a camera is moved for a different shot, even within a scene of the same subject, a new lighting setup is more than likely required. This makes three-point lighting shot-specific and not scene-specific. Of course, once you have a shot set up with the lighting you like, changing it slightly to suit a new camera angle is much easier than starting from scratch.

When the lighting is completed for the subject of a shot, the background will probably need to be lit as well. For the background, you would typically use a directed primary light source that matches the direction of the key light. This becomes your background's main light. Then you would use a softer fill light to light the rest of the background scene and to soften the primary shadows.

Practical Lighting

Practical lighting is a theatrical term describing any lights in a scene that are cast from lighting objects within the scene. For example, a shaded lamp on a night stand in the background of a scene set in a bedroom would need practical lighting when the light is turned on. The practical lighting shouldn't interfere with the main lighting of the scene. Although if the scene's lighting is explicitly coming from such a source, you will have to set up your key light to match the direction and general mood of the practical light in the shot.

Each light-emitting object in your CG scene doesn't automatically call for its own light in 3ds Max. Rendering tricks such as glow often simulate the effect of an active scene light. This way, you don't need to actually use a 3ds Max light. Of course, if you need the practical light to illuminate something in the scene, you need to create a light for it.

3ds Max Lights

3ds Max has two types of light objects: photometric and standard lights. Photometric lights are lights that possess very specific features to enable a more accurate definition of lighting, as you would see in the real world. Photometric lights have physically based intensity values that more closely mimic the behavior of real light. They are rather advanced and will not be covered in this book.

Standard lights are still extremely powerful and capable of realism, but they are more straightforward to use than photometric lights and less taxing on the system at render time.

Note

3ds Max Lights

Default Light

What happens if you have no lights at all in your 3ds Max scene? In this case, the scene is automatically lit by default lighting. When you add light objects, the default lighting is replaced entirely by the new lights. There is very little you can do with the default lighting; it is there for your convenience so you easily can view an object in Shaded mode and test render without creating a light first.

One or Two Default Lights

When you use default lighting, there is only one light. However, you can customize the configuration so that you can have two lights for default lighting.

To change to two default lights, in the main Menu Bar choose Customize → Viewport Configuration. In the Rendering Method tab, you can choose whether you want one light or two lights in your default lights under the Rendering Options heading. Figure 10.8 shows the Viewport Configuration's Rendering Method tab.

You can choose one or two lights for your default lighting.

Figure 10.8. You can choose one or two lights for your default lighting.

In a single default light, you have a single key light. This light is linked to the viewport, and it moves with the point of view. Setting up the default lighting to have two lights adds a single fill light that is placed opposite the key light. The key is always placed in front of the scene's object being viewed, on its upper left side. The default fill light, if added, is created behind the object and to the lower right. The link between the default light and the viewport is broken when you have two default lights. In the following images, there is a sphere on the left with a single default light. The same sphere is in the middle with two default lights. In the image on the right, the two default lights are no longer connected to the viewport.

You can choose one or two lights for your default lighting.

In Figures 10.9 and 10.10, you can see how the second default fill light works in the still life. Figure 10.9 has the single default light, and Figure 10.10 has two default lights. You can see the addition of a second set of highlights on the fruit in Figure 10.10 due to the added fill light.

Converting Default Lights

Remember that the default lights have no parameters and cannot be edited. You can, however, convert the default lighting into light objects that can be edited. You can do this only if the 2 Lights default lighting option is selected in the Viewport Configuration.

A single default light provides a key light.

Figure 10.9. A single default light provides a key light.

Two default lights provide a key light and a fill light.

Figure 10.10. Two default lights provide a key light and a fill light.

To add the default lighting to your scene, choose View → Add Default Lights to Scene. If you only have 1 Light default lighting, this menu option will be grayed out. The following dialog box will open, giving you the option to add either one or both default lights to the scene.

Two default lights provide a key light and a fill light.

3ds Max will bring the default lights in as Omni lights (which you will learn about soon). Once you add the default lights, you can edit them like any other light. However, it's always best to just begin lighting the scene with your own lights created from scratch.

Using Default Lights

Once you add a light, any default lighting (that has not been added to the scene) will be removed. Likewise, if you remove all the lights in a scene, 3ds Max will re-create the default lighting. Figure 10.11 shows the two default lights inserted as Omni lights (the diamond shapes) in the sphere's scene.

Use default lighting as a temporary solution. It gives you an easy way to have a constant light that travels with the viewport's point of view—provided it's the single default light. This helps you see the detail in your modeling, animation, and texturing without having to worry about creating and placing lights, especially lights that would follow the viewport.

Default lights are created in the scene as Omni lights.

Figure 10.11. Default lights are created in the scene as Omni lights.

Standard Lights

Standard lights will be the staple of your lighting diet for some time to come. They are the only lights covered in this book. The lights in 3ds Max try to mimic the way real lights work. For example, a light bulb that emits light all around itself would be an Omni light in 3ds Max. A desk lamp that shines light in a specific direction in a cone shape would be a spotlight. Each of the different Standard lights cast light differently. We will look at the most commonly used lights.

3ds Max has a total of eight light types in its Standard Light collection. The following lights are in the collection:

  • Target Spotlight

  • Free Spotlight

  • Target Direct Light

  • Free Direct Light

  • Omni Light

  • Skylight

  • mr Area Omni Light

  • mr Area Spotlight

The last two on this list have the prefix "mr" to signify that they are mental ray–specific lights. Mental ray is an advanced renderer that is commonly used in production today. It offers many sophisticated and frequently complex methods of lighting that enhance the realism of a rendered scene. Because mental ray is fairly complex, it will not be covered in this book, so its lights will not be covered in this chapter. After you read this chapter, you should be familiar enough with lighting to get started and try new things without using any advanced lighting and rendering methodologies. You will, however, get the chance to light a radiosity effect in the next chapter.

Target Spotlight

A Target spotlight, as seen in Figure 10.12, is one of the most commonly used lights because it is extremely versatile. A spotlight casts light in a focused beam, similar to a flashlight. This type of lighting allows you to light specific areas of a scene without casting any unwanted light on areas that may not need that light. You can control the size of the hotspot. This is the size of the cast beam.

The light is created with two nodes, the light itself (light source) and the Target node at which the light points at all times. This way you are able to animate the light following the subject of the scene easily, as a spotlight would follow a singer on stage. Simply select the target and move it as you would any other object in 3ds Max. The Target Spot will rotate to follow the target. Similarly, you can animate the light source, and it will orient itself accordingly to aim at the stationary target. You could of course animate both as well.

A Target spotlight

Figure 10.12. A Target spotlight

CREATING A TARGET SPOT

Create a Target Spot by going to the Create panel and clicking the Lights button (

CREATING A TARGET SPOT
CREATING A TARGET SPOT

Click the Target Spot button, and in the Top viewport, click and drag to create a Target spotlight, as shown here.

CREATING A TARGET SPOT

FALLOFF/FIELD

Select the light source of the Target Spot. Go to the Modify panel, and open the Spotlight Parameters rollout as shown in the following graphic. The falloff is the area in which the intensity of the beam falls off, or dissipates, creating a soft area around the Hotspot circle, as seen in Figure 10.13. The falloff is represented in the viewport by the area between the inner light-blue cone and the dark-blue outer cone. The light diminishes to 0 by the outer region.

FALLOFF/FIELD

SPOTLIGHT SHAPE

You can also change the shape of a spotlight from circular to rectangular by selecting either Circle or Rectangle in the Spotlight Parameters rollout. In addition, using the Aspect value, you can set the height-to-width ratio for the hotspot for either Circle or Rectangle spots. Figure 10.14 shows a rectangular spot with an Aspect of 4.0.

The falloff of a hotspot

Figure 10.13. The falloff of a hotspot

A spotlight can also be rectangular.

Figure 10.14. A spotlight can also be rectangular.

When rendered, the rectangular spot looks like the image here.

A spotlight can also be rectangular.

SELECTING THE LIGHT

You can move (and animate) the entire light, including the light and the target, by selecting the light object in the viewport in the middle of its display, as shown in the following graphic on the left. To access the parameters of the light, you have to select the light, as shown on the right. The target does not list any parameters for the light.

SELECTING THE LIGHT

INTERACTIVE CONE SETTINGS

3ds Max has the ability to control the Hotspot/Beam and the Falloff/Field parameters in the viewport. Follow these simple steps to interactively change a spotlight's hotspot and falloff:

  1. Select the spotlight's source.

  2. Click the Select and Manipulate tool in the main toolbar (

    INTERACTIVE CONE SETTINGS
  3. Click and drag the green circles at the end of the spotlight cone to set the hotspot and falloff ranges, as shown here.

    INTERACTIVE CONE SETTINGS

TARGET DIRECT LIGHT

A Target Direct light has Target and Light nodes to help you control the direction and animation of the light. It also has a hotspot and beam, as well as a falloff much like the Target Spot. However, where the Target Spot emits light rays from a single point (the light source) outward in a cone shape, the Target Direct light casts parallel rays of light within its beam area. This helps simulate the lighting effect of the Sun, because its light rays (for all practical purposes on Earth) are parallel. Figure 10.15 shows a Target Direct light in a viewport.

A Target Direct light

Figure 10.15. A Target Direct light

Because the directional rays are parallel, the Target Direct lights have a beam in a straight cylindrical or rectangular box shape instead of a cone.

You create a Target Direct light much the same way as a Target Spot. Select Target Direct from the Create panel and click in an Orthographic window to set the light and define the Target direction and length of the light by dragging.

Select the light for the Target Direct and open the Modify panel. In the Directional Parameters rollout, you'll find the same parameters for the Target Direct light that you had for the Target Spot. The procedure to select the light is the same as for the Target Spot as well. You can select the middle of the light for the whole object, or you can select either the target or light. You have to select the light to bring up the parameters for the light object.

Although the spotlight and the directional light don't seem to be very different, the way they light is strikingly different, as you can see in the following graphics. The image on the left is a Target Spot casting light and a shadow on a sphere and ground plane. The image on the right is a Target Direct from the same angle, distance, and falloff casting a light on the same sphere and ground plane.

A Target Direct light

The spotlight rays cast an entirely different hotspot and shadow than the directional light, despite having the same values for those parameters.

Note

It's preferable to create lights in the Orthographic viewports because they give you a better idea of size and direction than a Perspective or Camera viewport.

Free Spotlight

A Free Spot is virtually identical to a Target Spot, except that this light has no target object. You can move and rotate the free spot however you want, relying on rotation instead of the target to aim it in any direction. A Free spotlight is shown in Figure 10.16.

A Free spotlight does not have a target.

Figure 10.16. A Free spotlight does not have a target.

To create a Free spotlight, simple choose Free Spot in the Create panel and click in a viewport and drag to set its initial direction and length. The one other difference with a Free Spot is that whereas the length of the Target spotlight is controlled by its target, a Free Spot has a parameter in the General Parameters rollout of the Modify panel, as shown here. You set the length by adjusting this unmarked value next to the Targeted check box. You will study the General Parameters rollout in the next section.

A Free spotlight does not have a target.

Adjusting the length of a spotlight will not matter when the light is rendered; however, seeing a longer light in the viewports can help you line up the light with objects in the scene. Likewise, you can shorten the length of the light to clear some wireframe clutter from your viewports.

Spotlights (including Target Spots) are great for key lighting because they are very easy to control.

FREE DIRECT LIGHT

The Free Direct light is identical to the Target Direct light, but it doesn't have the Target node. Its parameters are the same as the Free Spot's, and it is selected and moved in the same way. Figure 10.17 shows a Free Directional light.

Directional lights (including Target Directs) are also great lights to use as key lights. You can also use them for fill lights, although the beam size must be large to avoid seeing the edges of the hotspot.

Directional lights are also used frequently to simulate sunlight, although their beams must be quite wide to avoid any chance of seeing the hotspot or falloff area.

A Free Directional light

Figure 10.17. A Free Directional light

Omni Light

The Omni light in 3ds Max is a point light that emanates light from a single point in all directions around it. Figure 10.18 shows an Omni light.

Omni Light

Unlike the Spot and Directional lights, the Omni light does not have a special rollout, and its General Parameters rollout is much simpler, as shown here.

An Omni light is shown rendered in Figure 10.19. Notice how the ground plane is brighter directly below where the light sits.

Omni lights are not very good for simulating sunlight, as Directional lights are. The Omni light's rays spread from a single point source, so by the time they reach their subjects, the light direction and shadows will be too disparate across a scene. In the following graphic, an Omni light in the image on the left creates different shadow and lighting directions for all the objects in the scene, and the Directional light in the image on the right creates a uniform direction for the light and shadow, as would the Sun here on Earth.

Omni Light
An Omni light is a single-point source light.

Figure 10.18. An Omni light is a single-point source light.

An Omni light lights the sphere and floor.

Figure 10.19. An Omni light lights the sphere and floor.

Note

Try to avoid casting shadows with Omni lights because they will use a lot more memory than a spotlight casting shadows.

Omni lights are good for fill lights as well as for simulating certain practical light sources that have a brighter center and falloff evenly around that bright spot in all three axes. You could even use Omni lights for all three points in your three-point lighting system, as seen here on the fruit still life scene. The scene has a nice soft feel.

An Omni light lights the sphere and floor.

Skylight

Skylight is a special 3ds Max light used with a special rendering method to quickly generate a scene rendered in a soft outdoor light. We will not be covering this more advanced lighting and rendering methodology; however, here is a quick introduction to the light itself.

Figure 10.20 shows a skylight high above the scene with the three spheres. It is created by simply selecting the Skylight button in the Create panel and clicking to place it in a viewport. The skylight's Skylight Parameters rollout is shown here.

Skylight

The skylight is used to create a soft, global lighting to simulate light from the sky. This look is often seen with renders using Global Illumination or Radiosity. In these lighting/ rendering solutions, the skylight creates a sky dome that sits around the objects in the scene. Light is emitted, essentially, from the entire surface area of the dome to cast an even light throughout the scene, much as a sky lights an outdoor area.

The rendering of a Skylight scene, as shown in Figure 10.21, is flat and bright. There is no definition because shadows are not enabled. Turning on shadows gives you a beautiful render, as seen in Figure 10.22, with soft shadows and contact shadows that really make the spheres look as if they are sitting outside on an afternoon day.

A skylight placed over the spheres and ground plane

Figure 10.20. A skylight placed over the spheres and ground plane

The skylight flattens out the spheres and blows them out.

Figure 10.21. The skylight flattens out the spheres and blows them out.

Turning shadows on for the skylight dramatically increases render times, but it gives a nice effect with soft shadows mimicking a radiosity effect.

Figure 10.22. Turning shadows on for the skylight dramatically increases render times, but it gives a nice effect with soft shadows mimicking a radiosity effect.

The render time for this frame, however, is significantly longer than any of the other renders so far in this chapter. Calculating soft light such as this is quite intensive, unless a lighting plug-in such as Light Tracer is enabled in the render setup.

Note

The Skylight light is not intended to be used without some other light source(s) in the scene. It is designed to be used only with Radiosity, Light Tracer, or mental ray rendering techniques. As these techniques are more advanced, they will not be covered in this book. It is important to learn traditional lighting and rendering methods before moving into advanced techniques.

Common Light Parameters

Most of the parameters for the Standard lights are the same for all the lights and will be described in this section. You may want to create a spot or directional light so you can follow along with the information about light parameters given here.

General Parameters Rollout

The General Parameters rollout for all the Standard lights (except for skylight) is shown in Figure 10.23. In the Light Type section, you can change the type of light that is currently selected. Simply choose the type (Spot, Directional, Omni) from the drop-down menu. 3ds Max will replace the light with the new light type; it won't change its position or orientation. This can be immensely helpful when you are deciding which light will work best for a scene. Otherwise, you would have to delete and re-create lights to find the solution that best suited your scene best.

You can turn a Free Spot or Free Directional to a target of the same kind by simply checking the Targeted check box. Of course, the On check box controls whether the light is on or off in the scene.

In the Shadows section of the General Parameters rollout for these lights, you will find the controls for the shadow casting properties of the selected light. Use the drop-down menu to select the type of shadows to cast. The two most frequently used shadow types, Shadow Map and Ray Traced, are discussed later in the chapter.

The General Parameters rollout for all the Standard lights is the same.

Figure 10.23. The General Parameters rollout for all the Standard lights is the same.

The Use Global Settings toggle can be very useful. When it is turned on, all of the lights in your scene will be set to use the same Shadow Parameters of the light you have selected and for which you have enabled Use Global Settings. This is useful in the event you need the same type of shadows cast from all the lights in the scene. It can save you the hassle of specifying the settings for all the lights. It does, however, limit you to the same shadow settings for all the lights. While you are learning, you should leave Use Global Settings off and set each light manually as needed. Again, shadows are covered a little later in this chapter.

Intensity/Color/Attenuation Rollout

The Intensity/Color/Attenuation rollout, shown in Figure 10.24, is used to adjust your light's brightness and color settings.

The Intensity/ Color/Attenuation rollout

Figure 10.24. The Intensity/ Color/Attenuation rollout

Light Intensity

The Multiplier parameter works like a dimmer switch for a light. The higher the value is, the brighter the light will be. The Multiplier can go into negative values. A negative amount will subtract light from your scene, allowing you to create dark areas within lit areas or to remove excess light from a surface that has unwanted spill light.

Light Color

The Color Swatch next to the Multiplier is used to add color to your light. Simply click on the color swatch to open the Color Selector. The darker the color, the darker the light.

Light Decay

Under the Decay section, you can set the way your light fades out across distance. This is not the same as falloff with spots and directional lights, though. Falloff occurs on the sides of a hotspot, whereas decay happens along the path of the light as it travels away from the light. Figure 10.25 shows a light with no decay type set. Figure 10.26 shows the same light with its decay Type set to Inverse Decay. Figure 10.27 shows the same light with decay Type set to Inverse Square Decay. Notice the decay rate increases with each successive figure.

If no decay is set for a light, its intensity remains at full strength from the light to infinity. An Inverse Decay diminishes the intensity of the illumination over distance traveled according to some brainy formula. An Inverse Square Decay more closely resembles the decay of real world light, and it is a stronger rate of decay than Inverse Decay. Use this decay rate to drop off the effect of a light quickly before it reaches too far into the scene; however, you will need a stronger Multiplier value to increase your light's intensity to compensate for the much faster decay.

A light with no decay illuminates all the numbers evenly.

Figure 10.25. A light with no decay illuminates all the numbers evenly.

A light with Inverse Decay illuminates the back numbers less.

Figure 10.26. A light with Inverse Decay illuminates the back numbers less.

In Figure 10.28, you can quickly see and set the start of a decay in spot and directional lights by changing the Start value in the Decay section of the rollout. In the following images, you can see a decay start that is closer to the light and its effect on the render in the top-left corner, while the start of the decay is moved closer to the spheres in the image on the right.

A light with Inverse Decay illuminates the back numbers less.

Light Attenuation

Light attenuation is another way to diminish the intensity of a light over distance. With attenuation, however, you have more implicit control on the start and end of the fade, and you can specify an area where the light fades in and then fades out. You simply set the Attenuation distances to the desired effect.

A light with Inverse Square Decay illuminates the first two numbers and begins to lose the remaining three.

Figure 10.27. A light with Inverse Square Decay illuminates the first two numbers and begins to lose the remaining three.

Seeing the start of a light's decay helps you see how it will illuminate your scene.

Figure 10.28. Seeing the start of a light's decay helps you see how it will illuminate your scene.

NEAR ATTENUATION GROUP

The following values set the distances where the light fades into existence:

Start—

The distance at which the light starts to fade in.

End—

The distance at which the light reaches its full intensity.

Use—

Toggles on/off the use of near attenuation for the light.

Figure 10.29 shows a render of near attenuation at work. The first numbers are darker, the back number are brighter. Figure 10.30 shows a spotlight and the Attenuation display in the viewport.

FAR ATTENUATION GROUP

The following values set the distances where the illumination fades out of existence:

Start—

The distance at which the illumination starts to fade away.

End—

The distance at which the illumination has faded to nothing.

Use—

Toggles on/off the use of far attenuation for the illumination.

Figure 10.31 shows a render of the far attenuation on the same set of numbers, using the same light as before. Now the lights fade into darkness the farther back they are in the scene, which is similar to decay. Figure 10.32 shows the far attenuation display for the spotlight. Figure 10.33 shows the attenuation display for an Omni light in a viewport.

You can always use both near and far attenuation to set a sliver of light in your scene, as shown in Figure 10.34. As you can see, attenuation is a more precise way to set a diminishing light intensity over the Decay Type.

Near attenuation fades in the light.

Figure 10.29. Near attenuation fades in the light.

The spotlight displays the attenuation distances.

Figure 10.30. The spotlight displays the attenuation distances.

Far attenuation fades out the light.

Figure 10.31. Far attenuation fades out the light.

The spotlight displays the attenuation distances.

Figure 10.32. The spotlight displays the attenuation distances.

The attenuation display for an Omni light

Figure 10.33. The attenuation display for an Omni light

Using both near and far attenuation gives you a slice of light where you need it.

Figure 10.34. Using both near and far attenuation gives you a slice of light where you need it.

Note

Both decay and attenuation are important to use when the light needs to be realistic. Light decays in real life; your renders will assume a higher fidelity when the lights in them decay. The effect may be subtle, but it can make a large difference.

Advanced Effects Rollout

Advanced Effects Rollout

The Advanced Effects rollout (shown in the following graphic) enables you to control how a light affects the surfaces it illuminates. You can increase or decrease the contrast and softness of a light's effect on a surface. You can also dictate which lighting component of the light is rendered on the surface.

Contrast and Soften

By adjusting the Contrast and Soften Diffuse Edges values, you can alter the way the light hits your surface. The following image on the left was rendered with default Contrast and Soften Diffuse Edges values, and the image on the right was rendered with a Contrast of 25 and a Soften Diffuse Edges value of 50. The image on the right has deeper contrast, but with slightly softer values leading from the diffuse color.

Contrast—

Changes the contrast level between the diffuse and ambient areas of the surface when lit.

Soften Diffuse Edge—

Controls the softness of the edge between the diffuse and ambient areas of the lit surface.

Contrast and Soften

Light Components

Light in a CG program is differentiated into an ambient, a diffuse, and a specular component. You may recall these components covered in Chapter 7, "Materials and Mapping." The ambient component of light is the general ambient light in a scene. There is no direction to ambient light, and the light itself is cast evenly across the extent of the scene. The diffuse component of light is the way it illuminates an object by spreading across its surface. The specular component of light is how the light creates highlights on a surface, especially when that surface is glossy.

In the Affect Surfaces section of the Advanced Effects rollout, you can toggle the check boxes that will render only those components of the light on the surfaces they illuminate. This is a good way to separate your renders into lighting components that you can later control in compositing, although it leads to a longer workflow.

Figure 10.35 is rendered with the diffuse component of the lights in the scene. Figure 10.36 shows only the specular highlights rendered. Figure 10.37 shows only the ambient light rendered on the objects.

Only the diffuse component of the lights are rendered.

Figure 10.35. Only the diffuse component of the lights are rendered.

Only the specular component of the lights are rendered.

Figure 10.36. Only the specular component of the lights are rendered.

Only the ambient light in the scene is rendered.

Figure 10.37. Only the ambient light in the scene is rendered.

Ambient Light

Ambient light in 3ds Max is not a light per se, but rather it is a global setting in the render environment. Ambient light, in short, is an even light with no direction or source. It is a way to globally brighten the entire scene to add an even light to all objects. Using too much ambient light will wash out your objects and give you flat renders.

To set an ambient light level in your scene, in the main Menu select Rendering → Environment to open the Environment and Effects window shown in Figure 10.38.

To set an ambient light, click on the Ambient color swatch under the Global Lighting section and pick an appropriate color. The brighter the color value, the brighter the ambient light will be throughout the scene.

Note

You can also create an ambient light in your scene by creating an Omni light and toggling on the Ambient Only check box under the light's Advanced Effects Parameters rollout.

Creating Shadows

Don't be too quick to smother your scene with light or too eager to show off your careful modeling work and textures. Leaving objects in shadow and darkness is as important as revealing them in light. You can say a lot visually by not showing parts of a whole and leaving some interpretation to the audience.

The Environment and Effects window

Figure 10.38. The Environment and Effects window

A careful balance of light and dark is important for a composition. The realism of a scene is greatly increased with the simple addition of well-placed shadows. Don't be afraid of the dark. Use it liberally, but in balance.

You can create the following types of shadows in 3ds Max:

  • Advanced Raytraced

  • mental ray Shadow Map

  • Area Shadow

  • Shadow Map

  • Raytraced Shadows

Each type of shadow has its benefits and its drawbacks. The two most common types used are Shadow Maps and Raytraced Shadows.

When you use shadows, controls in the Shadow Parameters rollout and the shadow type-specific rollouts are available when you select the shadow type.

Shadow Parameters Rollout

The settings in the Shadow Parameters rollout govern the common parameters for all shadow types discussed here. In this rollout, you can adjust the color of your shadow as well as its density (i.e., how dark it appears).

Shadow Parameters Rollout

You should always check your light's Multiplier values first to make sure your fill light does not wash out your shadows before you adjust the shadow parameters themselves. For instance, the fill light(s) generally have a lower intensity than the key light(s).

Click on the Color swatch to pick a color for your shadows. More often than not, you will have your shadow colors at black, if not close to black. You can also control the density of the shadows by adjusting the Density value. As you can see in Figure 10.39, adjusting the density changes how much of the shadow is rendered. A Density of 0 will turn off your shadows in essence.

Interestingly enough, you can also apply a map to your shadow by checking the Map box and clicking on the button bar currently labeled None. From there, you can choose a map. In Figure 10.40, a checker map was mapped to the shadow.

Shadow Density

Figure 10.39. Shadow Density

You can map a texture to the shadow.

Figure 10.40. You can map a texture to the shadow.

Selecting a Shadow Type

For the most part, you will be more than happy with the results from a Shadow Map shadow in your scenes. However, to get shadows to respond to transparencies, you will need to use Ray Traced Shadows. Additionally, if you need to soften your shadows the farther they are cast from the object, you will need to use Area Shadows. These shadow types are discussed next.

Shadow Maps

Seeming to be the fastest way to cast a shadow, the Shadow Map shadow generates a bitmap file during a pre-rendering pass of the scene. This map is used to place the shadows in the final render. However, Shadow Map shadows do not show the color cast through transparent or translucent objects. Once you select Shadow Maps in the General Parameters rollout for a light, the rollout appears. It is shown here.

Shadow Maps

Because this shadow type relies on maps, it is important to be able to control the resolution of the generated maps. When you are close to a shadow, the resolution needs to be higher for the cast shadow than if it were farther from the camera in order to avoid jagged edges around the shadow.

The following parameters are useful for Shadow Map creation:

Bias—

The shadow is moved, according to the value set, closer or farther away from the object casting the shadow. Figure 10.41 shows how the bias moves the shadow away the higher the value is set.

Size—

Detailed shadows will need detailed Shadow Maps. Increase the Size value, and 3ds Max will increase the number of subdivisions for the map which in turn increases the detail of the shadow cast. Figure 10.42 compares Shadow Map sizes of 64 and 1024. Notice how the shadows on the left (Size = 64) are mushy and barely noticeable and the shadows on the right (Size = 1024) are crisp and clean. You don't want to set your Shadow Map Size too high, though. It will increase render time for little to no effect. A range between 512 and 1024 is usually good for most cases.

The Bias offsets the shadow from the casting object.

Figure 10.41. The Bias offsets the shadow from the casting object.

Note

In some scenes, you may discover that no shadow map size will give you good results (for instance in large outdoor scenes). In these cases, you will have to revert to a different shadow method, such as Ray Traced Shadows.

Sample Range—

This creates and controls the softness of the edge of shadow-mapped shadows. The higher the value, the softer the edges of the shadow. Figure 10.43 shows you how a soft edge (on the left) can make the lighting seem less strong or farther away from the subject than crisp shadows (on the right).

The Shadow Map size affects the shadow detail.

Figure 10.42. The Shadow Map size affects the shadow detail.

Soft edge shadows

Figure 10.43. Soft edge shadows

Ray Traced Shadows

Raytracing involves tracing a ray of light from every light source in all directions and tracing the reflection to the camera lens. You can create more accurate shadows with raytracing. However, the render takes significantly longer to calculate. Additionally, Ray Traced shadows are always hard edged, yet they are realistic for transparent and translucent objects. Figure 10.44 shows the still life render with a plane casting a shadow over the fruit. The plane has a checker mapped to its opacity, so it has alternating transparent and opaque squares defining the checkerboard.

On the left side of the image, the light is casting Shadow Map shadows, while on the right the light is casting Ray Traced Shadows.

Use Ray Traced shadows when you need highly accurate shadows or when Shadow Map resolutions are just not high enough to get you the crisp edges you need. You can also use Ray Traced Shadows to cast shadows from wireframe rendered objects.

The Ray Traced Shadow rollout, shown here, controls the shadow. The Ray Bias parameter is the same as the Shadow Map Bias in that it controls how far from the casting object the shadow is cast.

Ray Traced Shadows

Creating Soft Shadows Due to Distance

The only way you will be able to create a natural shadow that softens the farther it gets from the casting object is to use Area Shadows. These types of shadows are natural. If you notice a telephone pole's shadow, the farther the shadow is from the pole, the softer the shadow becomes. Adding such a shadow to a render can greatly increase the realism of the scene.

To enable a soft shadow such as this, select Area Shadows as your shadow type. By default, the Area Shadow will work for you. Figure 10.45 shows a regular Ray Traced shadow. Figure 10.46 shows an Area shadow at the default settings.

Ray Traced shadows react to transparencies, and Shadow Maps do not

Figure 10.44. Ray Traced shadows react to transparencies, and Shadow Maps do not

A Ray Traced shadow is too hard-edged.

Figure 10.45. A Ray Traced shadow is too hard-edged.

An Area shadow begins to soften at the ends.

Figure 10.46. An Area shadow begins to soften at the ends.

Go to the Area Shadows rollout shown here. To adjust the softness of the shadows, you will not want to increase the Sample Spread because that parameter, just like the Sample Range of the Shadow Map shadow, softens the entire shadow. A true shadow is crisp where it meets the casting object and softens as it casts away.

An Area shadow begins to soften at the ends.

To further soften the ends of the shadows, in the Area Light rollout, set the Length to 80 and the Width to 60. This will increase the softness of the shadow in a realistic way, while keeping the contact shadow crisp. However, the render, shown here, does not look very good. The soft ends are very grainy.

An Area shadow begins to soften at the ends.

You will need to increase the quality of the shadow, so set the Shadow Integrity to 6 and the Shadow Quality to 10. The render will take longer, but you will get a beautiful shadow, as shown in Figure 10.47.

Increase the shadow quality to obtain a very realistic shadow.

Figure 10.47. Increase the shadow quality to obtain a very realistic shadow.

Atmospheres and Effects

Creating atmospheric effects with lights, such as fog or volume lights, is accomplished through the Atmospheres and Effects rollout, as shown here.

Atmospheres and Effects

Using this rollout, you can assign and manage atmosphere effects and other rendering effects that are associated with lights. In the following exercise, you will learn how to create a volumetric light (similar to a flashlight shining through fog). You will also learn how to exclude objects from a light, so that the light does not illuminate them. This is an important trick to know.

Creating a Volumetric Light

Let's create a fog light using the following steps:

  1. Creating a Volumetric Light
    Creating a Volumetric Light
  2. Now move to the Front viewport and move the light up along the Y-axis, and then move the target so it is centered to point the light directly at the fruit, as shown here.

    Creating a Volumetric Light
  3. If you do a Quick Render, you will see that the scene is being lit from the direction of the light (Figure 10.48). Now you need some shadows in the scene.

Adding Shadows

  1. In the General Parameters rollout for the light, go to the Shadows section and check the box to enable shadows. Select Shadow Map from the drop-down menu. This will turn on Shadow Maps shadows for this light.

  2. Go to the Shadow Map Parameters rollout and set the size to 1024; this will add some sharpness to the shadow's edge and make it more like a daylight shadow. If you do a Quick Render, you won't see any shadows (as shown in the following graphic). This is because the window is blocking the light. The window glass object has a Material that has the Opacity turned down to 0; however, Shadow Map shadows don't recognize transparency in materials. To solve this problem, you need to Exclude the Window Glass object from the Light.

    A test render of the fruit

    Figure 10.48. A test render of the fruit

Excluding Object from a Light

Excluding Object from a Light
  1. The Exclude button is in the General Parameters rollout for the light, just below the Shadows. Click the Exclude button to bring up the Exclude/Include window shown in Figure 10.49.

  2. Click on the Glass object and press the right arrows in the middle of the window (Figure 10.49) to add the Glass to the other side, excluding the object from receiving light and casting light. Click OK.

  3. Quick Render your scene to take a look. Now you can see shadows. We didn't exclude the whole window with its frame because the inside frame is a nice detail to cast shadows. Figure 10.50 shows the render with the shadows.

The Exclude/Include window allows you to exclude certain objects from being lit by the light in the scene.

Figure 10.49. The Exclude/Include window allows you to exclude certain objects from being lit by the light in the scene.

Adding a Volumetric Effect

  1. The whole point of this exercise is to add volume to the light. This will give this scene some much needed atmosphere. Go to the Atmosphere and Effects rollout for the light. Select Add from the rollout to open the Add Atmosphere or Effect window, which is shown here.

    Adding a Volumetric Effect
  2. In the window, select Volume Light and click OK to add the effect to the light.

  3. Volume Light will be added to the rollout, as shown here. Render the scene. You should see a render similar to Figure 10.51.

    Adding a Volumetric Effect

To adjust the volume light, select the Volume Light entry in the rollout and click the Setup button. This will bring up the Environment and Effects dialog window. Scroll down to Volume Light Parameters section to access the settings for the volume light, seen in Figure 10.52. Experiment with different settings to see how the volume light renders. The settings are described next.

Shadows!

Figure 10.50. Shadows!

Volume light!

Figure 10.51. Volume light!

Volume Light Parameters

The default parameters for a Volume light will give you some nice volume in the light for most scenes, right off the bat. However, to tweak or change the volume settings to your liking, you will be editing these following parameters:

Exponential—

The density of the volume light will increase exponentially with distance. By default (Exponential is off), density will increase linearly with distance. You will want to enable Exponential only when you need to render transparent objects in volume fog.

Density—

This value sets the fog's density. The denser the fog is, the more light will reflect off the fog inside the volume. The most realistic fogs can be rendered with about 2 to 6 percent Density value.

The Environment and Effects window displays the Volume Light parameters.

Figure 10.52. The Environment and Effects window displays the Volume Light parameters.

Most of the parameters are for troubleshooting volume problems in your scene if it is not rendering very well. Sometimes you just don't know what that problem is and you have to experiment with switches and buttons. The Noise settings are another cool feature to add some randomness to your volume:

Noise On—

This toggles the noise on and off. Render times will increase slightly with Noise enabled for the volume.

Amount—

This is the amount of noise that is applied to the fog. Of course a value of 0 creates no noise. If the Amount is set to 1, the fog renders with pure noise.

Size, Uniformity, Phase—

These settings determine the look of the noise, along with setting a Noise Type (Regular, Fractal, or Turbulence).

Adding atmosphere to a scene can heighten the sense of realism and mood. Creating a little bit of a volume for some lights can go a long way to improving the look of your renders. However, adding volume to lights can slow your renders, so use it with care. Also be aware that adding too much volume to a scene may look peculiar, so use volumetric light sparingly and with good reason—that is, if it is called for in the scene and adds ambience to the image.

Light Lister

If several lights are in your scene and you need to adjust all of them, selecting each light and making one adjustment at a time can become tedious. This is where 3ds Max's Light Lister comes in way handy. Accessed through the main Menu Bar by choosing Tools → Light Lister, this floating palette gives you control over all of your scene lights, as seen in Figure 10.53.

The Light Lister window

Figure 10.53. The Light Lister window

You can choose to view/edit all the lights in your scene or just ones that are selected. Using this easy dialog window gives you instant access to pretty much all the important light parameters in one place. When you adjust the values for any parameter in the Light Lister window, the changes are reflected in the appropriate place in the Modify panel for that changed light. This is the perfect tool to edit your lights once you have them set up initially.

Summary

Lighting is no laughing matter. It is the aspect of CG that is arguably the most difficult to master (alongside character animation perhaps), and it is the most easily criticized. People in the CG industry can tell very quickly when lighting is done poorly.

In this chapter, you began by reviewing some key concepts in CG lighting, including Three-Point lighting. Then you learned the different types of lights that 3ds Max has to offer, from default lights to Target Spots, and how to use them. You dove into the common light parameters to gauge how best to control the lights in your scene before you moved on to creating all different types of shadows. The chapter finished with a quick exercise on creating a volumetric light for a fog effect and a tour of the Light Lister window.

Several books are devoted to CG lighting. It is a craft that takes getting used to, and this chapter serves to introduce you to the concepts and tools you need to begin. The onus is on you to take the models you have created—and the ones you will create in the future—texture them, and light scenes with them to develop an eye for the ins and outs of lighting. There really is no quick way to learn how to light. It would be quite a disservice to pretend that a chapter, or even an entire book, will give you everything you need to know. Take the information and references in this chapter and apply them on your own. Working on your own may not sound like fun, and it may not seem as easy as being guided step by step, but it is honestly the best education you will get.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset