Chapter 12. Light

image

Light seeking light doth light of light beguile.

—William Shakespeare

There’s more to light than physics and optics, although those are certainly essential components. The work of a compositor is akin to that of a painter or cinematographer, in that a combination of technical knowledge, interpretation, and even intuition all contribute to getting a scene “right.”

Other areas of digital production rely on elaborate models to simulate the way light works in the physical world. Like a painter, the compositor observes the play of light in the three-dimensional world in order to re-create it two-dimensionally. Like a cinematographer, you succeed with a feeling for how lighting and color decisions affect the beauty and drama of a scene and how the camera gathers them.

Several chapters in this book have already touched upon principles of the behavior of light. Chapter 5 is about the bread and butter work of the compositor—matching brightness and color of a foreground and background. Chapter 9 is all about how the world looks through a lens. Chapter 11 explores more advanced technical ways in which After Effects can re-create the way color and light values behave.

This chapter is dedicated to practical situations involving light that you as a compositor must re-create. It’s important to distinguish lighting conditions you can easily emulate and those that are essentially out of bounds—although, for a compositor with a good eye and patience, the seemingly “impossible” becomes a welcome challenge and the source of a favorite war story.

Source and Direction

In many scenes, there is clearly more involved with light than matching brightness and contrast channel by channel. Light direction is fundamental, especially where the quality of the light is hard (direct) rather than soft (diffuse).

Such a huge variety of light situations are possible in a shot, and in an infinite array of combinations, that it becomes difficult to make any broad statements stand up about lighting. This section, however, attempts to pin down some general guidelines and workflows for manipulating the light situation of your scene.

Location and Quality

You may have specific information about the lighting conditions that existed when source footage was shot. On a set, you can easily identify the placement and type of each light, and away from set, this information may be found in a camera report or on-set photos. For a naturally lit shot, it’s mostly a question of the position of the sun relative to the camera and the reflectivity of the surrounding environment.

Sometimes the location and direction of light is readily apparent, but not as often as you might think. Hard, direct light casts clear shadows and raises contrast, and soft, diffuse light lowers contrast and casts soft shadows (if any). That much seems clear.

Tip

image

One of the primary responsibilities of the on-set visual effects supervisor is to record light conditions on set to augment what shows up in the image and what appears in the camera report.

These, however, are broad stereotypes, which do not always behave as expected in the real world. Hard light aimed directly at a subject from the same direction as the camera actually flattens out detail, effectively decreasing contrast. And artificial lighting is usually from multiple sources in a single scene, which work against one another to diffuse hard shadows (Figure 12.1).

Figure 12.1. Interior sets, like interior environments, are typically lit by more than one source, creating multiple soft highlights and shadows.

image

Neutralize Direction and Hotspots

Mismatched direction or diffusion of light on a foreground element is clearly a fundamental problem for the compositor and can only be the result of poor planning or limited resources. The solution is generally to neutralize the mismatch by isolating and minimizing it. Relighting the element in 2D generally offers a result that might technically be called “cheesy.”

Every shot in the world has unique light characteristics, but a couple of overall strategies apply. Once you’ve exhausted simple solutions such as flopping the shot (if the lighting is simply backward), you can

• isolate and remove directional clues around the element, such as cast shadows (typically by matting or rotoscoping them out)

• isolate and reduce contrast of highlights and shadows in the element itself, typically with a Levels or Curves adjustment (potentially aided by a luma matte, described later in this chapter)

• invert the highlights and shadows with a counter-gradient

The simple way to undo evidence of too strong a keylight in a scene is to create a counter-gradient as a track matte for an adjustment layer; a Levels or Curves effect on this layer affects the image proportionally to this gradient. The Ramp effect can be set and even animated to the position of a keylight hotspot (Figure 12.2).

Figure 12.2. Counter-gradients (this one created with the Ramp effect) can serve as an adjustment layer used to lower the brightness and contrast in the hotspot region.

image

A radial ramp is merely linear, which is not the correct model for light falloff. Light’s intensity diminishes proportionally to its distance from the source squared, according to the inverse square law. An object positioned twice as far from a single light source is illuminated by one-quarter the amount of light. To mimic this with a gradient, precomp it, duplicate the radial gradient layer, and set the upper of the two layers to a Multiply blending mode (Figure 12.3).

Figure 12.3. A standard Ramp gradient (top left) is linear, as can be seen in the histogram, but light falls off in a logarithmic, inverse-square pattern, so the matte used in Figure 12.2 multiplies together two linear gradients (bottom left) with Linear blending enabled (bottom right) in Project Settings even though it’s not a 32-bpc linear HDR project. Again, light works in linear.

image

Of course, you don’t want to fight the fundamental source lighting in this way unless you absolutely must; hopefully you will rarely have to “fix” lighting and will most often want to work with what you’ve got to make it even stronger and more dramatic.

Color Looks

Have you ever seen unadjusted source clips or behind-the-scenes footage from a favorite movie? It’s a striking reminder about the bold and deliberate use of color in modern films. Look at the work prints or on-set making of video—the magic more or less disappears.

In older films color looks had to be accomplished optically and photochemically. The well-known bleach-bypass method would be used to strip certain colors out in the film lab. Nowadays, a digital production pipeline has made the photochemical approach rarer, although optical filters still play a large role in shooting. Meanwhile, it’s becoming more and more common for an entire feature-length production to be graded through a digital intermediate, or D.I.

After Effects has an advantage over D.I. software such as DaVinci Resolve in that it is a true compositing system with fine controls over image selection. After Effects was not created principally with the colorist in mind, so its primary color tools (as described in Chapter 5) are simpler and less interactive. Third-party solutions such as Colorista and Magic Bullet Looks, both from Red Giant, help bridge this gap.

Keeping in mind that your job as a compositor is to emulate the world as it looks when viewed with a camera, it can be effective to begin by emulating physical lens elements.

The Virtual Lens Filter

Suppose a shot (or some portion of it) should simply be “warmer” or “cooler.” With only a camera and some film, you might accomplish this transformation by adding a lens filter. It could be a solid color (blue for cooler, amber to warm things up) or a gradient (amber to white to change only the color of a sky above the horizon).

Add a colored solid and set its blending mode to Color. Choose a color that is pleasing to your eye, with brightness and saturation well above 50%. Use blue or green for a cooler look, red or yellow for a warmer one (Figure 12.4).

Figure 12.4. Here, the four color filters are applied as a test with a Color blending mode, and with the Linear mode, so that they behave a lot like lens filters of an equivalent color.

image

At 100%, this is the equivalent of a full-color tint of the image, which is too much. Dial Opacity down between 10% and 50%, seeking the threshold where the source colors remain discernable, filtered by the added color to set the look.

Notes

image

The use of solids as if they were lens filters can be found in the 12_solid_color_filters folder on the disc. One project is linear color, the other standard video.

To re-create a graded filter, typically used to affect only the sky, apply the Ramp effect to the solid color and change the Start Color to your tint color; an amber filter adds the look of a smoggy urban day. The Add mode (with Blend Colors using 1.0 Gamma enabled in Project Settings) re-creates the real-world optics of a color gradient filter over an image.

Black and White

Counterintuitively, Hue/Saturation is not effective to create a black-and-white image because it maintains luminance proportions, and as mentioned in a sidebar back in Chapter 6, that’s not how the eye sees color. Figure 12.5 illustrates the difference.

Figures 12.5. This is the flag of Mars (left): it shows three fields of pure red, green, and blue. Tint (center) compensates for the perceptual differences in human color vision when desaturating, Hue/Saturation (right) does not.

image

Notes

image

The flag of Mars is a red, green, and blue tricolor selected by the Mars Society and flown into orbit by the Space Shuttle Discovery. It was not used by Marvin the Martian to claim Planet X.

If it’s truly a black-and-white version of the color source that is required, several options will work better than lowering Saturation to 0.0:

• Tint effect at the default settings weights the color channels, as does a fully desaturated solid (black, white, or gray, it doesn’t matter) with a Color blending mode.

• For more control of color weighting, you can make use of the Black & White effect added to After Effects CS5. Because this effect originated in Photoshop, it doesn’t support 32 bits per channel, but if you’re applying it directly to 8- or 16-bit source, even in a 32-bpc project, that limitation won’t cost the image any accuracy.

Notes

image

Check the 12_black_and_white_conversion folder on the disc to compare the methods described here.

Taking care with the conversion from color to black and white and in particular the weighting of the color channels can heavily influence the look of the shot (Figure 12.6).

Figure 12.6. A real color-to-grayscale conversion may involve carefully rebalancing color, contrast, or saturation. Here, the face and lamp are important and get individual adjustments in color prior to conversion.

image

(Images courtesy of 4charros.)

Day for Night

Stronger optical effects are often possible, such as making a daytime scene appear as if it were shot on a moonlit night. Known in French as la nuit américaine (and immortalized in Francois Truffaut’s ode to filmmaking of the same name), this involves a simple trick. Shoot an exterior scene under ordinary daylight with a dark blue lens filter to compensate for the difficulty of successful low-light night shoots. If there is direct sunlight, it’s meant to read as moonlight.

Tip

image

Many images benefit from a subtle reduction in overall Saturation using the Hue/Saturation tool. This moves red, green, and blue closer together and can reduce the “juicy” quality that makes bright-colored images hard to look at.

Lighting techniques and film itself have improved since this was a common convention of films, particularly Westerns, but digital cameras tend to produce noisy and muddy footage under low light.

Figure 12.7 shows the difference between a source image that is blue and desaturated and an actual night look; if instead you’re starting with a daylight image, look at the images on the book’s disc, which take the image more in that direction. Overall, remember that the eye cannot see color without light, so only areas that are perceived to be well illuminated should have a hue outside the range between deep blue and black.

Figure 12.7. An ordinary twilight shot of a house at dusk (left) becomes a spooky Halloween mansion. Converting day for night avoids the problems associated with low-light shooting.

image

(Images courtesy of Mars Productions.)

Color Timing Effects

Digital tools can of course go far beyond what is possible with lens filters. The industry standard tools rely on a three-way color corrector, which allows you to tint the image in three basic luminance ranges—highlights, midtones, and shadows—adjusting each separately via wheels that control hue and brightness.

Just such a color corrector is now found in Synthetic Aperture Color Finesse 3, included with After Effects. Twirl down the Simplified Interface and there you find the Hue Offset controls, known colloquially as “color pots,” along with the three main color correction tools introduced in Chapter 5: Curves, HSL (equivalent to Hue/Saturation), and RGB (which contains the Levels controls, minus the histogram—for that, click Full Interface).

A contemporary color look will have you pushing (via clicking or dragging) the Shadows control in a blue-green direction and Highlights in the opposite pink-yellow direction. (In fact, the Mojo plug-in from Red Giant is predicated on the concept that color looks take shadow/highlight areas toward cyan/orange. This look endures in large part because of the orange character of human skin tones—the contrasting shadows can give them an even warmer and healthier glow to make talent look best.)

Having set that contrast, you’re now free to set the overall mood with the Midtones control, or change the entire look by adjusting the Master color. If things get a little juicy you can pull back saturation for any or all of these color ranges, particularly if you’ve increased contrast using Curves or RGB controls.

Tip

image

Red Giant Software has several useful plug-ins for colorists: In addition to Mojo, Colorista applies Lift/Gamma/Gain via color pots, and the all-encompassing Looks creates an entire color pipeline that is actually fun to use, thanks to its engaging production metaphor.

Once a hero grade is established, it can then be saved and applied across several shots in what is traditionally called the color timing process—literally, making color consistent across time, which typically involves much more than simply applying the same adjustment to every shot. You can use the techniques described here and in Section II to first balance a shot, then add its color look, finally bringing out any key exceptional details. As as soon as you understand someone asking you to “silver it up” or “crush” it, voilà, you’re a colorist—here’s your Ferrari.

Source, Reflection, and Shadow

Sometimes you work with source footage that contains strong lighting and thus offers a clear target. Other times, it’s up to you to add a strong look. Either way, reference is your friend. You will be surprised how much bolder and more fascinating nature’s choices are than your own.

Unexpected surprises that simply “work” can be the kiss of love for a scene—that something extra that nobody requested but everyone who is paying attention appreciates. Details of light and shadow are one area where this extra effort can really pay off.

Big, bold, daring choices about light don’t call attention to themselves if appropriate to a scene, adding to the dramatic quality of the shot instead of merely showing off what you as an artist can do.

Script

image

The light wrap formula outlined below has been converted to a script created by Jeff Almasol. You can find it on the book’s disc as rd_Lightwrap. Select the matted source layer and let this script do the work.

Backlighting and Light Wrap

The conditions of a backlit scene are a classic example where a comped shot falls short of what actually happens in the real world.

This technique is designed for scenes that contain backlighting conditions and a foreground that, although it may be lit to match those conditions, lacks light wrapping around the edges (Figure 12.8).

Figure 12.8. The silhouetted figure is color corrected to match but lacks any of the light wrap clearly visible around the figures seated on the beach.

image

A lot of people wish for an After Effects light wrap plug-in. Simply creating light around the edges of a figure just doesn’t look right. The light needs to be motivated by what is behind the subject, and that presents a difficult procedural problem for a plug-in. The following method has you create your own color reference for light wrapping and use that.

Set up a light wrap effect as follows:

  1. Create a new composition that contains the background and foreground layers, exactly as they are positioned and animated in the master composition. You can do this simply by duplicating the master comp and renaming it something intuitive, such as Light Wrap. If the foreground or background consists of several layers, it will probably be simpler to precompose them into two layers, one each for the foreground and background.

    Notes

    image

    Check out the 12_lightwrap folder on the disc to see this example in action.

  2. Set Silhouette Alpha blending mode for the foreground layer, punching a hole in the background.
  3. Add an adjustment layer at the top, and apply Fast Blur.
  4. In Fast Blur, toggle the Repeat Edge Pixels on and crank up the blurriness.
  5. Duplicate the foreground layer, move the copy to the top, and set its blending mode to Stencil Alpha, leaving a halo of background color that matches the shape of the foreground (Figure 12.9, top). If the light source is not directly behind the subject, you can offset this layer to match, producing more light on the matching side.

    Figure 12.9. The background is blurred into the matte area (top) in a precomp and added back into the scene to better integrate the silhouette (bottom).

    image

  6. Place the resulting comp in the master comp and adjust opacity (and optionally switch the blending mode to Add, Screen, or Lighten) until you have what you’re after. You may need to go back to the Light Wrap comp to further adjust the blur (Figure 12.9, bottom).

When there is no fill light, the foreground subject might appear completely silhouetted. Because the foreground subjects are often the stars of the scene, you might have to compensate, allowing enough light and detail in the foreground that the viewer can see facial expressions and other important dramatic detail.

In other words, this might be a case where your reference conflicts with what is needed for the story. Try to strike a balance, but remember, when the story loses, nobody wins.

Flares

For our purposes a “flare” is any direct light source that appears in shot, not just a cheesy 17-element lens flare whenever the sun pokes around the moon in some science-fiction television show from the early 1990s (or even a few shots from Hancock). These don’t come for free in After Effects; 3D lights don’t even create a visible source if placed in shot until you add the Trapcode Lux effect (included on this book’s disc).

Close-up: What Causes a Lens Flare?

image

Unlike your eye, which has only one very flexible lens, camera lenses are typically made up of a series of inflexible lens elements. These elements are coated to prevent light from reflecting off of them under normal circumstances. Extreme amounts of light, however, are reflected somewhat by each element.

Zoom lenses contain many focusing elements and tend to generate a complex-looking flare with lots of individual reflections. Prime lenses generate fewer.

Many factors besides the lens elements contribute to the look of a flare. Aperture blades within the lens cause reflective corners that often result in streaks; the number of streaks corresponds to the number of blades. The shape of the flares sometimes corresponds to the shape of the aperture (a pentagon for a five-sided aperture, a hexagon for six). Dust and scratches on the lens also reflect light. And few light elements look as badass as the anamorphic lens flare you might get shooting into a light source for 2.39:1 widescreen scope display.

Lens flares also appear very different depending on whether they were shot on film or video; excess light bleeds out in different directions and patterns.

Real lens flares aren’t cheesy, but natural, even beautiful artifacts the eye accepts without necessarily understanding anything about what actually causes them (Figure 12.10). ILM in particular seems to excel at great-looking light optics (and cannot be held responsible for the over-the-top look on the bridge of Star Trek).

Figure 12.10. You might think of a lens flare as one of those element rings caused by a zoom lens pointing at the sun, but flares occur anytime a bright light source appears in or near frame. Here, the green traffic light causes a large flare without even appearing in frame, and numerous other lights bloom and flare.

image

(Image from Quality of Life, courtesy of Benjamin Morgan.)

Therefore, to get lens flares or even simple glints right, good reference is often key. Only a tiny percentage of your viewers may know the difference between lens flares from a 50 mm prime and a 120 mm zoom lens, yet somehow, if you get it wrong, it reads as phony. Odd.

Here are some things you should know about lens flares:

• They are consistent for a given lens. Their angles vary according to the position of the light, but not the shape or arrangement of the component flares.

• The big complex flares with lots of components are created by long zoom lenses with many internal lens elements. Wider prime lenses create simpler flares.

• Because they are caused within the lens, flares beyond the source appear superimposed over the image, even over objects in the foreground that partially block the source flare.

Moreover, not every bright light source that appears in frame will cause a lens flare—not even the sun.

Notes

image

Prior to the 1970s-era of Easy Rider and moon shots, flares were regarded as errors on the part of the cinematographer, and shots containing them were carefully noted on the camera report and retaken.

The Lens Flare effect included with After Effects is rather useless as it contains only three basic presets. Knoll Light Factory, available from Red Giant Software, is much more helpful both because the presets correspond to real lenses and because the components can be fully customized in a modular fashion. The new challenger on the lens flare scene is Optical Flares from videocopilot.net. Either of these will improve dramatically upon what you can achieve with the built-in effect, so investment in one or the other is recommended for this purpose (assuming you’re not the type of nerd to create your own lens flares as a 3D precomp, which would be much more time consuming).

Reflected Light

Reflected light is another “kiss of love” opportunity for a scene. You might not notice that it’s missing, but a glimmer, glint, or full reflection can add not only realism but pizzazz to a shot.

Glints are specular flares that occur when light is reflected toward the camera from shiny parts of an element in scene, such as the chrome of the taxi in Figure 12.11, taken from the Chapter 5 color matching example.

Figure 12.11. This sequence shows the glint that plays off the chrome areas of the taxi as it passes a spot in the frame where the sun is reflected directly into the camera lens.

image

The same plug-ins used for flares (Trapcode Lux, Knoll Light Factory, Tinderbox, and Optical Flare) can be used to create glints, with more modest settings that don’t create all the lens reflections. Figure 12.12 shows that there’s not necessarily a whole lot to a single glint. An Add mode makes these work even in 32-bpc HDR (in which case they create over-range values, just as they would on film).

Figure 12.12. There’s not a whole lot to a glint when you look at it closely, but it helps sell the plane.

image

Close-up: Three Ways to Blur

image

After Effects offers quite a few blur effects, but three are most common for general usage: Gaussian Blur, Fast Blur (which at best quality is no different), and Box Blur, which can match the other two but offers more flexibility.

At the default Iterations setting (1), a Box Blur can seem crude and, well, boxy, but it can approximate the look of a defocused lens without all the more complex polygons of Lens Blur. You can also hold it out to the horizontal or vertical axis to create a nice motion blur approximation (where Directional Blur is actually too smooth and Gaussian).

Raising the Box Blur Iterations setting above 3 not only amplifies the blur but refines the blur kernel beyond anything the other two effects are capable of producing. What actually occurs is that the blur goes from a square appearance (suiting the name box blur) to a softer, rounder look. You’re more likely to notice the difference working with over-range bright values in 32-bit HDR.

Fast Blur and Box Blur also each include a Repeat Edge Pixels check box; enable this to avoid dark borders when blurring a full-frame image. The same setting with these two effects will not, alas, produce the same amount of blur even if Box Blur is set to 3 iterations (to match Fast Blur).

Light Scattering and Volume

Light scatters as it encounters particles in the air, most dramatically causing the phenomena of volumetric light or “God rays.” Our atmosphere does not permit light to travel directly to the camera, uninterrupted, as it does in outer space. Instead, the light ricochets off tiny particles in the air, revealing its path.

The effect can be subtle. Lights that appear in the scene, casting their beams at the camera, tend to have a glowing halo around them. If the light traveled directly to the camera, the outline of the source light would be clear. Instead, light rays hit particles on their way to the camera and head off in slightly new directions, causing a halo (Figure 12.13).

Figure 12.13. You’re so used to light halation (left) that it looks wrong to lower the exposure so that it disappears.

image

Add more particles in the air (in the form of smoke, fog, or mist), and a halo may appear, along with the conditions under which volumetric light occurs. God rays are the result of the fact that light from an omnidirectional source, such as the sun, travels outward in a continuous arc (Figure 12.14).

Figure 12.14. God rays, with which nature evokes the vast and eternal from an ordinary sunset.

image

The CC Light Rays effect is probably most helpful among those included with After Effects to re-create volumetric light effects and even God rays. The honest truth is that Trapcode Shine outperforms it, but where possible, this book provides methods that don’t involve buying a plug-in.

Notes

image

To see the setup used to create volumetric light with built-in After Effects tools, check out 12_godrays_built_in_effects on the disc.

Light Rays not only boosts and causes halation around the source light, but it also adds rays coming straight at camera. These rays can be made more prominent by boosting radius and intensity, but in order to create a God rays effect and not overwhelm an entire image with rays, it’s usually best to make a target source and apply the effect to that. For example:

  1. Add a solid of your preferred color.
  2. Apply Fractal Noise (default settings are acceptable to begin).
  3. Mask the solid around the target God rays source area. Feather it heavily.
  4. Apply CC Light Rays. Place Center at the God rays target. Boost Intensity and Radius settings until the rays are prominent.
  5. For rays only (no fractal noise) set Transfer Mode to None.
  6. Set a Subtract mask or Alpha Inverted track matte to create occluded areas for the rays to wrap around, as in Figure 12.15.

Figure 12.15. The included CC Light Rays effect is essential to creating your own volumetric light effects in After Effects. Masks or mattes can be used to occlude rays.

image

You can further hold out and mask out the rays as needed, even precomping and moving the source outside of frame if necessary. To make the rays animate, keyframe the Evolution property in Fractal Noise or add an expression such as time*60 to make them undulate over time. Different Fractal Type and Noise Type settings will also yield unique rays.

Notes

image

A more straightforward plug-in for volumetric light is Trapcode Lux, which can derive volume and a flare from any After Effects 3D light simply by applying it to an adjustment layer.

Shadows

As there is light, so must there be shadows. Unfortunately, they can be difficult to re-create in 2D because they interact with 3D space and volume, none of which 2D layers have. The behavior of shadows can be unpredictable, but luckily, your audience typically doesn’t know how they should look in your scene either (until there is some reference right there in the shot).

You can certainly cast a shadow from a matted layer onto a plane by positioning each of them in 3D space and properly positioning a light. Be sure that you first change Casts Shadows for the matted layer from its default Off setting to On or Only (the latter option making it possible to create a precomp containing only the shadow).

You can instead corner pin the matte to the angle at which the shadow should fall and avoid the 3D setup altogether. In either case, the problem is that the illusion breaks if the light source is more than 10 degrees off-axis from the camera. The more you light a 2D element from the side, the more it just breaks (Figure 12.16).

Figure 12.16. Compare the fake 3D shadow (left) with the real thing and you instantly grasp the problem with this approach. You can cast a good shadow head-on, but not at this steep an angle.

image

There’s also the possibility of cheating: If it’s easy to add ground surface that would obscure a shadow (for example, grass instead of dirt), do so, and no one will even expect to see a shadow because it no longer belongs there.

Contact Shadows and Indirect Light

For the most part, successful shading in a 2D scene relies on achieving what you can practically, and getting creative when practical shadows aren’t present. There are plenty of cases where a full cast shadow would be correct and no shadow at all would clearly look wrong, but a simple contact shadow can at least remove glaring contrast so that no one really notices.

A contact shadow is a lot like a drop shadow—basically just an offset, soft, dark copy directly behind the foreground. A drop shadow, however, is good only for casting a shadow onto an imaginary wall behind a floating logo, whereas a contact shadow is held out to only the areas of the foreground that have contact with the ground plane.

Figure 12.17 shows the foreground layer duplicated and placed behind the source. A mask is drawn around the base, and it is then offset downward. A blur is applied to soften the transparency channel. That gives you the matte. Red Giant Warp includes a Shadow effect that not only facilitates the process of creating this type of shadow, but adds the ability to project across a floor and a back wall, with an angle and position that are determined parametrically.

Figure 12.17. A simple contact shadow (middle) can make the difference between an object that appears to sit on a surface and an object that appears to float in space.

image

Notes

image

Some simple shadow-casting setups can be found in the 12_shadow_casting_basic folder on the disc.

A real shadow is often not just black; it’s an area of reduced light and therefore color. Instead of darkening down the matte itself to create the shadow, create an adjustment layer just below the contact shadow layer and set an alpha track matte. Add a Levels (or if you prefer, Curves) effect and adjust brightness and gamma downward to create your shadow. Treat it like a color correction, working on separate channels if necessary; the result is more interesting and accurate than a pool of blackness (Figure 12.18).

Figure 12.18. By applying the shadow layer as a track matte to an adjustment layer, you can treat it as a color correction and match the color and contrast of the scene’s existing shadows (top). Add a color correction pass and a day-lit American street takes on a more exotic vibe (bottom).

image

Reflected light is another type of contact lighting that plays a role in how things look in the real world, and thus can play a role in your composited scenes. Most objects in the world have diffuse surfaces that reflect light; when the object is prominent or colorful enough, your eye simply expects it to affect other more neutral neighboring surfaces, whether or not your brain is aware of the phenomenon (Figure 12.19).

Figure 12.19. The color influence of indirect light is not always so evident as with a bright saturated object, but it is always in play in a natural setting.

image

In 3D computer graphics this situation is re-created via global illumination, which includes light and surface interactions in a render. If you’re working with a computer-generated scene, aim for a pass that includes these types of light interactions. If you have to create the effect from scratch, the method is similar to that of shadows or color matching: Create a selection of the area reflecting light, including any needed falloff (that may be the hard part), and use color correction tools to color match the adjacent object reflecting color.

Multipass 3D Compositing

Lighting in computer-generated scenes has advanced to an astonishing extent, with stunning scenes from Avatar or Toy Story 3 displaying all of the loveliness of natural light with no compositing needed. Nonetheless, when attempting to match a computer-generated element to a live-action backplate, it’s more effective to divide the render of a single element into multiple passes.

This is different from simply rendering in layers, which while also useful for compositing is really only about separating foreground elements from the background. Multipass rendering is the technique of isolating individual surface qualities and creating a separate render for each. “Surface qualities” are things like specularity, shadows, and wear and tear (or grunge). In his excellent book Digital Lighting & Rendering, Second Edition (Peachpit Press, 2006), Jeremy Birn calls out multiple benefits yielded by rendering a model on multiple passes:

Changes can be made with little or no re-rendering. If a shadow is too dark or a glow is the wrong color, the adjustment can be made right in After Effects.

Integration often requires multiple passes where the model interacts with the scene, casting a shadow on the ground or being reflected in water. If the cast shadow is simply part of a single render, you lose all control over its appearance and cannot apply it as recommended in the previous section.

Reflections, which often consume massive amounts of time to process, can be rendered at lower quality and blurred in After Effects.

Bump Maps can be applied more selectively (held out by another pass such as a highlight or reflection pass).

Glows can be created easily in 2D by simply blurring and boosting exposure of a specular pass.

Depth of Field can be controlled entirely in 2D by using a Z pass as a matte for a blur adjustment layer.

Less render power and time is required to render any one pass than the entire shaded model, so a lower powered computer can do more, and redoing any one element takes far less time than redoing the entire finished model.

Close-up: RPF and EXR

image

RPF files are an Autodesk update to RLA. After Effects offers limited native support for these files (via the effects in the 3D Channel menu), but more robust support for some of the finer features of RPF such as Normal maps is only available via third-party plug-ins. Commercially available plug-ins that can translate normal maps for use in After Effects include ZBornToy (which also does amazing things with depth maps) from Frischluft and WalkerFX Channel Lighting, part of the Walker Effects collection. There is a free option for Windows called Normality (www.minning.de/software/normality).

As mentioned in Chapter 8, After Effects can also extract camera data from RPF files (typically generated in 3DS Max or Flame); place the sequence containing the 3D camera data in a comp and choose Animation > Keyframe Assistant > RPF Camera Import.

The most popular way to get a multipass render into After Effects these days is via the EXR format, which can store all of the various passes and related data in a single file. EXR is now supported directly in After Effects via EXtractoR and IDentifier, two plug-ins from fnordware.

Putting multiple passes to use is also surprisingly simple; the artistry is in all of the minute decisions about which combination of adjustments will bring the element to life. Table 12.1 (on the next page) describes some common render passes and how they are typically used.

Table 12.1. Ten Typical Multipass Render Layer Types

images

images

Notes

image

Got UV Maps? After Effects has the means to use them with the RE:Map plug-in from RE:Vision Effects. This allows you to map a texture to an object, using the UV map for coordinates, without returning to the 3D app that generated it or waiting for Live Photoshop 3D to support mapping in After Effects.

Other passes for specific objects might include a Fresnel (or Incidence) pass showing the sheen of indirect light and applied to an adjustment layer with a luma matte (raise Output Black in Levels to re-create sheen); a Grunge or Dirt map, applied as a luma inverted matte, allowing you to dial in areas of wear and tear with Levels on an adjustment layer; a Light pass for any self-illuminated details; and a Normal pass showing the direction of surface normals for relighting purposes. Many, many more are possible—really anything that you can isolate in a 3D animation program. Figure 12.20 shows a model set up for multipass rendering and a few of its component render layers.

Figure 12.20. A basic multipass setup (A) with the beauty pass (B) as reference, made up of the following color passes: diffuse (C), specular (D), and reflection (E) as well as grayscale passes applied as luma mattes to adjustment layers, each containing a Levels effect: grunge (F), incidence (G), and occlusion (H). A depth matte (I) can be applied in various ways; here it is used as reference for a lens blur on an adjustment layer (to give the appearance of shallow depth of field).

image

None of these passes necessarily requires a transparency (alpha) channel, and in old-school effects it is customary not to render them, since multiple passes of edge transparency can lead to image multiplication headaches.

Notes

image

It’s more typical to simply apply grayscale layers via blending modes such as add or multiply (Figure 12.21)

Figure 12.21. Just to show there’s no hard-and-fast rule for multipass rendering, here’s a setup (and set of source layers) completely unique from the previous. The color pass (A) is minimal. Precomping the canopy (B) and glass (C) separately with Collapse Transformations on gives individual control of that translucent element.. The decals (D) are held out by a hi-con pass (E) to give the color pass most of its surface attributes. A specular (F) and three individual reflection passes (G-I) give full control over the plane’s salient shininess. The ambient occlusion pass (J) is multiplied in to give weight to the shadows, and an adjustment layer applies HDR Highlight Compression to this 32-bpc assembly so that it can be rendered and used as an 8- or 16-bit element if necessary.

image

The general rules for multipass compositing are simple:

• Use the Diffuse layer as the base.

• Apply color layers meant to illuminate the base layer, such as specular and reflection, via Add or Screen blending modes.

• Apply color layers meant to darken the base layer, if any, via Multiply or Darken blending modes.

• Apply grayscale maps as luma mattes for adjustment layers. Apply Levels, Curves, and Hue/Saturation to allow these mattes to influence the shading of the object or scene.

• Control the strength of any layer using Opacity.

Multipass renders provide an excellent opportunity to enable Blend Colors Using 1.0 Gamma in Project Settings, whether or not you assign a working space (and whether or not that working space is linearized). With this setting enabled, specular and reflection passes naturally light the model via Add mode and shadow, grunge, or ambient occlusion passes naturally darken it via Multiply.

Notes

image

Check out the 12_multipass folder on the disc for a couple of setups, and try your own versions!

Multipass rendering is only partially scientific and accurate; successful use of multiple passes is a highly individualized and creative sport. I personally like to cheat heavily instead of going by the book if I’m happy with the result. With the correct basic lighting setup you can use multipass renders to place a given 3D element in a variety of environments without the need for a complete re-render.

Varied environments are themselves the subject of the following chapter.

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

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