Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Digital Audio, Video > 3D

  • Print
  • + Share This
This chapter is from the book

Distance and Depth

You can divide up space and show distance with your lighting in many ways. Instead of lighting all parts of a natural environment uniformly, you can depict natural variation in color and tone that exist in different parts of a scene.

Dividing Up Space

Many scenes let you look through a door or stairway so you can view more than one room, area, or floor of a building. Each area of a scene like this can have different lighting. If one room has a window that lets in daylight and another room is lit by a lamp or a ceiling light, then you’d expect the room lit by daylight to be brighter and have cooler, more blue-colored light, whereas the room lit by the ceiling light would appear less bright but have warmer colored illumination, as shown in Figure 4.30.

Figure 4.30

[Figure 4.30] Mixing colors of light sources with a dimmer, warmer light in the foreground hallway helps divide the space in this scene.

Even within a room, corners can receive different light than the middle of the room, or there can be a transition of color and brightness between the area around a window and the parts of the room farther from the window.

If you can create a distinction between areas that are in direct sunlight and areas that are in the shade, then that’s another good way to divide up your scene. Indoors, parts of your scene can be in a sunbeam while other parts are outside of it. Often, a scene split between sunlight and shade serves to highlight the objects or characters that appear in the sunlight, but this isn’t always true. It’s possible to have a central subject that stands prominently, entirely in the shade, and have it set apart from a brightly overexposed background that is in direct sunlight. No matter where your center of attention is positioned, it’s the contrast between the subject and the background that helps it pop out.

Even small differences between rooms—such as differently adjusted blinds or shades on the windows, or different color curtains or walls can lead to differences in the lighting in different rooms. Although light can flow through doors, windows, and stairways within your scene, the light cast through an opening only lights one part of a room, and where a scene is divided into different spaces you always have the opportunity to vary your lighting.

Defining Depth with Lighting

When designing the lighting for any larger set, you need to choose a strategy for how to portray the distance as you head away from the camera, into the background. Many approaches are possible: You can move from a bright foreground to a dark background, you can have a dark foreground and a bright background, you can alternate light-dark-light, or you can separate areas with color. Different designs work for different spaces. The important part of this issue is that you are creating a two-dimensional image that needs to depict three-dimensional space, so your viewers are able to see the difference between things that are close to camera and things that are farther away.

Figure 4.31 starts with a simple version of this: It has a bright, colorful foreground area, full of warm light, and a background that gets darker and uses cooler, blue tones.

Figure 4.31

[Figure 4.31] Space can be divided between a brighter foreground and a darker background, among other variations. This scene is Lighting Challenge #18, modeled by Juan Carlos Silva.

In Figure 4.31, the background itself is broken up into different regions. Although the whole background is dominated by blues and cool tones, the middle hallway is lit from above, with light coming down through a fan, whereas the far background is less saturated, with more blue-colored instrument lights.

Whenever the background is a different color from the foreground, or you have bright light visible in the background, you can think about adding some rim light to the subjects in the foreground motivated by the background light. A few highlights or some rim light that match the background color can help tie together the background and foreground. In this case, the blue rim light along the robot’s back also helps separate the robot from the darker background area behind it.

In real cinematography (unlike computer graphics) the camera is a physical object that can cast a shadow. Because of this, objects often appear darker when they get extremely close to the camera. For example, if a door is opened or closed in the foreground, the door itself often looks very dark when it shuts into a position near the camera, as if the scene itself were being wiped to black. Or if a ball is thrown directly at the camera, the ball becomes darker as it reaches the camera and fills the frame. You can avoid this effect in real cinematography in several ways (you can attach a ring light to the camera lens, brightening what’s right in front of the camera, for instance), but the convention of objects in the foreground becoming darker, or turning into silhouettes, is seen in many films.

Adding Atmosphere

Atmosphere plays a role in many scenes, tinting and changing the appearance of more distant objects. In any situation in which it might be appropriate, you should look for a chance to use atmosphere to add variation with distance.

  • Dust adds to the atmosphere of many outdoor environments and sometimes is visible in the air indoors in barns or old buildings.
  • Any room with smoke in it, including rooms lit by torches or candles or places where people smoke or burn incense, can have a lot of visible atmosphere.
  • Underwater scenes are essentially scenes with a lot of atmosphere that tints and desaturates and causes distant objects to fade away.
  • Almost all outdoor scenes, if you can see all the way to a distant horizon or distant hills, have atmospheric perspective that shifts the more distant parts of the scene into a bluer, less saturated tone, as shown in Figure 4.32.

    Figure 4.32

    [Figure 4.32] Each successive mountain in this photograph has a lighter, bluer color, thanks to atmospheric perspective.

  • Many kinds of weather conditions make the atmosphere more visible. Rain adds the drops themselves, plus extra mist and fog as well. Snow in the air also creates atmospheric perspective as distant objects become whiter.
  • Even depictions of outer space sometimes have something like an atmosphere, in the sense that dust particles or the emissions from a rocket can float in space in between the objects in your scene.

Modern rendering software offers you a whole range of different approaches for adding atmosphere to your scenes.

One simple, but somewhat limited, option is to turn on a fog effect from an individual light. This allows you to create a visible light beam easily, such as a beam of light coming through a window. However, it can sometimes look unrealistic because in real life, atmosphere tends to be spread through an entire room so that areas in the light or not in the light are all filled with the same amount of dust or smoke. If you set individual lights to emit visible fog effects, then you should also think about adding an overall atmosphere to the whole room, including the areas outside of the light beam.

An efficient approach to adding overall atmosphere to a scene is covered in more detail in Chapter 11. If you render a depth pass of your scene, which shows the distance from the camera to each object, then the compositor can use that information to tint, desaturate, or soften distant parts of the scene. This approach lets you simulate the overall look of atmospheric perspective in your scene, although it doesn’t visibly respond to each light.

For atmosphere that responds realistically to each light, by forming visibly brighter areas or light beams in the air wherever the light is brightest, you can apply volumetric fog shaders, which are available in many programs. Volumetric fog makes the air (or water) in your scene respond realistically to light so that shafts of light or visible light beams can form where light and shadows cut through space, as shown in Figure 4.33. Using volumetric fog can add greatly to your rendering time, but the results often look much more realistic than what you can create in compositing software from an overall depth pass.

Figure 4.33

[Figure 4.33] Volumetric fog makes light filtered through stained glass windows visible in the air. This scene is Lighting Challenge #8, modeled by Dan Wade, concept by Gary Tonge.

Finally, moving into a full particle simulation within your environment is an option that can simulate not only the presence of atmosphere, but also the movement of smoke or dust through the scene, as it responds to wind or character movements. When you fill a dusty barn with a particle system of floating bits of dust, you give a tremendous boost to the dimensionality and realism of the overall space, and you also add to the overall effect of fading out and desaturating more distant surfaces.

You can render using a depth of field (DOF) effect that simulates selective camera focus to complement and enhance the effects of atmospheric perspective while diffusing more distant objects and drawing our attention to the foreground (or to whatever object is in focus). If your final scene will be rendered with DOF, then it’s a good idea to turn it on when you test your atmospheric effects, because the two effects work together to create the final look of your scene.

Going Underwater

Being underwater is like having a very thick “atmosphere” around you. Even though we are trying to simulate water instead of air in this section, we can apply all of the same rendering techniques to create an underwater environment. Some computer scientists use the term participating media instead of atmosphere to describe whatever gas, liquid, or solid particles fill space in the scene and influence and respond to illumination.

You begin creating an underwater scene just as if it is above water. Add a directional light to simulate the sun. In a shallow pond or a swimming pool, you might need some fill light from the sky as well, although deeper in the water this might not be necessary. You can aim a bounce light upward to simulate light bouncing off the bottom of the pond to illuminate the bottom of objects. Figure 4.34 shows the humble beginnings of an underwater scene that still looks as if it is above water.

Figure 4.34

[Figure 4.34] An underwater scene without any atmosphere or water surface appears to be set on dry land. This scene is Lighting Challenge #5, modeled by Serguei Kalentchouk.

When we look out into an underwater landscape, the entire surface of the water looks just like a rippling mirror above us. Even if you make the water surface both transparent and reflective, giving it a realistic index of refraction of about 0.75 causes it to show mostly reflections. Only one area of the water surface above us, called Snell’s Window, lets us see through to the sky and the world above the water.

The sunlight in such a scene should appear dappled, as if it is refracted caustics that have passed through the water surface. Although it might be possible to render this in a physically correct manner, you can save time by applying a cookie to the sunlight instead. If you want the sun to appear dappled below the water but not to appear dappled above the water, then you can transparency-map the caustic texture pattern onto a plane at the level of the water surface, and you can set that plane so it casts shadows but is not directly visible in the rendering.

Figure 4.35 shows the scene with the water surface above and the dappled effect on the key light. However, it still doesn’t appear to be underwater. What’s missing is the atmosphere.

Figure 4.35

[Figure 4.35] Adding a reflective water surface and dappled light gets this scene closer, but an essential ingredient is still missing.

You can use a volumetric fog shader contained within a cube that fills the entire underwater area to add the atmosphere that really makes it look as if we are underwater, as shown in Figure 4.36. You need to tweak this to make sure the fog color (or scatter color) is bright enough to respond to light, which creates shafts of light where the dappled sunlight comes through the scene, and to make sure the shader absorbs light or darkens with distance enough so that the more distant parts of the water fade naturally and don’t become too white. The best approach to this process is to set the resolution of your scene very low, with very low anti-aliasing quality and low quality for volumetric rendering; then you render small postage stamp–sized tests until you get the overall colors and brightness right. At this stage, the fill light can be turned down if you want to focus on the shafts of light from the key, or you can turn it up if you can’t see enough of the foreground. Only once you like the overall colors and tones in the scene should you move into higher-resolution renderings.

Figure 4.36

[Figure 4.36] Adding atmosphere (or participating media) to the scene creates the impression of being underwater.

You can add a whole range of different effects beyond this. Sometimes you can use particles to simulate dirt and debris in the water, or add bubbles that float upward. Sometimes you can add pieces of sediment as individual polygons with transparency-mapped textures, thus scattering organic detail through the space.

In a pond, you don’t want the view through the water to be too clear. Although the compositor can achieve other effects (blurring based on distance, or blurring what is seen through floating particles or bubbles), using DOF on your camera also helps blur the background and add realism to an underwater scene, as shown in Figure 4.37.

Figure 4.37

[Figure 4.37] Rendering with DOF nicely complements the underwater effect.

  • + Share This
  • 🔖 Save To Your Account