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

Home > Articles

Shadows and Occlusion

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

Shadow Color

In real life, shadows often appear to be a different color than the area around them. For example, outdoors on a sunny day, shadows can appear to be tinted blue. The shadows appear blue because the bright yellow light from the sun is blocked from the shadow area, leaving only indirect light and blue light from other parts of the sky.

There is a parameter on most lights called shadow color, which adds color to the shadows cast by that light. Pure black is the default shadow color, which means that no extra color or brightness is added to a shadow. When shadow color is set to any value above pure black, it brightens the shadow by letting some of the original light leak into the area where it should be blocked. A shadow color of pure white would look the same as turning off shadows completely.

If you have a scene where the shadows are too dark or need color added, as on the left frame of Figure 3.8, one option would be to adjust the shadow color of your light. The middle frame of Figure 3.8 shows the results with the shadow color set to a deep blue. That was quick and easy, and didn't require any new lights to be added to the scene, but it's not very realistic. Notice how the blue in the middle frame fills in only the shadow itself; it does not extend naturally into the unlit side of the object.

dir2_03_08.jpg

Figure 3.8 A black shadow colorblack shadow looks unnatural (left), but the shadow color parameter lightens only the cast shadow, not the unlit side (middle). Colored fill lights added to tint shadows achieve more believable results (right).

The best way to re-create blue outdoor shadows is not to use the shadow color parameter at all. Adding blue fill lights to the scene, which will naturally become more visible where the sunlight is blocked, is a better option. The right frame of Figure 3.8 shows a more natural result; the shadow color parameter is turned back down to pure black, and blue fill lights are added around the scene. The fill light can come from multiple spotlights or sky-dome-type lighting, but any source of light that comes from different angles will add color more naturally than the shadow color parameter. You may need to tint the key light color to compensate for the fill light, removing blue from the key so that the color balance of the scene does not shift.

In realistic lighting, adjusting your shadow tones by adding colored fill lights should always be your first choice, and the shadow color parameter should be used sparingly, if at all. The only physically correct setting for your shadow color parameter is pure black, because that means that an opaque object would block all of the light from the light source. Using the shadow color parameter at all is a cheat. If it is adjusted cautiously, with very dark color values, the shadow color parameter can make a shadow a little lighter or add a subtle tint to a shadow. If used too visibly, shadow color creates a mismatch between the cast shadow that it lightens and the unlit side of your subject that it does not lighten. Setting the shadow color parameter too high also creates the unrealistic situation of having a light that partially leaks through opaque objects.

Some artists generalize that shadows should always be of complementary colors to the objects casting them or to the key light. As a creative decision, you may use shadows with complementary colors to make colored objects pop out more visibly, but this is an artistic stylization, not something that always happens as a rule in real life. For example, the combination of yellow light with blue shadows that you often see outdoors would be unrealistic if recreated in an indoor scene that lacked a motivation for the blue fill light.

Testing Shadows

Even if you avoid using the shadow color parameter as a part of your general lighting, it is a handy tool for highlighting a shadow during test renders. Cranking the shadow color up to a bright red, as shown in Figure 3.9, is a great way to isolate exactly where a particular light's shadow is going. Use this whenever there is room for confusion between several overlapping shadows, or if you are not sure which shadow comes from which light. If you make adjustments while the shadow color is bright red, you can see what you're doing even when adjusting shadows that will be subtle in the final render. When you're done with your adjustments, just set the shadow color parameter back to pure black.

dir2_03_09.jpg

Figure 3.9 Temporarily assigning a bold shadow color makes it easier to see and adjust an individual shadow within your scene.

  • + Share This
  • 🔖 Save To Your Account