|CreativeCOW Adobe After Effects Tutorial
||John Starr Dewar
Orange, California, USA
©2003 John Starr Dewar and CreativeCOW.net. All rights reserved.
The key to a good composite is successful integration into the background image. Sometimes you may have a very bright background or be keying from a DV camera, which nearly always results in imperfections because of the choke or screen blur effects that are necessary to achieve good edges. Light wrap, or light spill, is a very handy in these situations. In this tutorial, John Starr Dewar demonstrates an easy way to achieve light spill with a little bit of pre-composing. At the end, John also shows you how to simulate volumetric shadows using Trapcode's Shine plug-in.
|How To Use Light Spill for Better Composites Without Plug-ins
The key to a good composite is successful integration into the background image. It doesn't matter how perfect your key is (the one you pulled from your matte, not the one in the first sentence). With After Effects 6, we got Keylight, which automates quite a bit of this process. However, sometimes you may be compositing with a very bright background like a window. Or you may be pulling a key from DV footage, which nearly always results in imperfections because of the choke or screen blur effects that are necessary to achieve good edges.
Light wrap, or light spill, is a very handy in these situations. If you get out your Star Wars Episode I DVD and go to the first Jedi Council meeting (with commentary on), you can hear John Knoll talking about how nice the light spill is. Light spill is easy to achieve with a little bit of pre-composing. I'll also show you how to simulate volumetric shadows using Trapcode's Shine plug-in. Volumetric shadows used in this manner are kind of showy and distracting most of the time, but they are very cool and can be used to great effect in some cases.
Let's start at the beginning. Once upon a time, I decided to film the last thirty-seven minutes of Hamlet entirely on bluescreen, so that I could have the action take place in a medieval castle (as they are in short supply here in California). Let's look at one shot where light spill turns out to be very helpful and also let's take the opportunity to admire how absolutely outstanding my lighting was:
Yes folks, that's a quality lighting setup!
Anyway, you can see I was going to have a hard time pulling a decent key from that. But after much mucking around with masks, difference key, and color range, here's what I came up with (Keylight's screen blur function would probably yield better results, but this is an AE 5.5 project):
As you can see, circled in red are some problem areas: artifacts left over from the blue screen (insidious, because they really only show up after one renders the comp, and your eyes can detect their motion), and a dark line around the whole thing, particularly apparent on the lit part of the face.
Not perfect, but it is no matter! The light wrap will hide these problems for the most part. If you're wondering what happened to Laertes' torso, I haven't really put much effort into that area, because it will be hidden when I add my widescreen cutoff bars. If you have a lot of difficult keys like I did, I highly recommend you make your production widescreen, because it will save you a considerable amount of time, and it gives you a lot of compositional choices. For instance, in this shot I moved Laertes down 20 pixels, for a better composition. The downside, of course, is that you will lose resolution on widescreen monitors. If you're wondering why Laertes is so angry, it's because Hamlet has killed his father (accidentally), driven his sister to suicide (unintentionally), and has just given the first hit, for which the trumpets are speaking to the cannons, the cannons to the heavens, and the heavens to the earth!
It is most important that your key and your background are each in their own separate comps. If you don't set up your scene this way, the technique won't work properly in all situations, you'll have a messier timeline, and you'll have less flexibility when you want to change the positions of your elements to correct perspective issues, for example. In my scene, the background image is very large and can be scaled up a great deal depending on the situation; thus by rendering eight views (N, NW, W, SW, S, SE, E, NE) of the environment, I was able to support well over one hundred comps without creating a new background image.
Once this is done, create a new composition. Since the other two should be named "Key" and "Background", I usually name this "Composite". Here's what we should be looking at:
It doesn't look too great. Let's do our best to rectify the situation:
1.) Duplicate the Background layer and place it on the top of the stack.
2.) Choose (Effect > Channel) "Set Matte".
3.) Check "Invert Matte" and set the "Take Matte From Layer" pop-up menu to "Key".
In the main window, you should have seen your subject disappear and then reappear when you finished with the settings. What you have now is a background, the foreground, and then the background on top with a hole cut out for the foreground. Now we want to make it spill over onto the subject:
4.) Make sure that the top layer is selected, then choose (Effect > Blur & Sharpen) "Fast Blur".
5.) Add some blur: a setting between 20 and 40 should do the trick.
That looks pretty weird, doesn't it? There are some interesting possibilities with this alone
By applying Fast Blur, we've caused a bit of the background color to spill onto Laertes' shoulder. Now, we want our original background back again. That part's easy!
6.) Duplicate the top Background layer. Remove its fast blur effect by deleting it or unchecking the little f.
Depending on the situation you may want to set the spill layer's mode to "Lighten". This will prevent dark background objects from casting shadows onto the subject, which doesn't look right. However in some cases, this effect may be desirable, and will help soften the transition between the foreground and the background, especially if you're using a luma key.
7.) Because my foreground is so grainy, I'm going to add some (Effect > Stylize) "Noise" to the background, to make it look as though they were shot at the same time.
I'm also going to add back in some Fast Blur, about 5 pixels worth. This will soften the background and also further softens the edges again. (If you want to add more blur, do it in the original "Background" comp; otherwise you'll get that weird halo again. I'd recommend modifying the pre-comp exclusively, if you have a really good key from hi-res footage and you want to keep hair strands and such.)
Ok, now it looks an awful lot better, doesn't it? Now what if you decide that you want a stronger light wrap effect? No problem! Just add another light spill layer, as shown below:
See the difference?
Now, you may have been wondering why we have kept the original background layer. It really depends on whether or not you feathered the top layer slightly, but your background color has a tendency to show through if you delete the first layer.
The left side of the red line shows what happens when you delete your original background layer. (My composition background color is bright green).
Perhaps you've noticed that in that last image, the colors are a little better integrated. That's because I took my screenshots out of order. But the colors are what we'll tackle next, anyway!
As you can see from the previous screenshots, our colors are very orangish, and are much different from the background's shades of blue. Therefore, we need to adjust our foreground colors to match the background. The Tint effect is very good for this purpose.
8.) Select the "Key" layer, and then go to (Effect > Image Control) "Tint".
9.) Now choose a black point and a white point from your background image, using the two eyedroppers. Then adjust the "Amount to Tint" slider until it looks about right.
|How To Make Your Key Affect Volumetric Shadows With Shine
Well, Laertes is starting to look like he actually belongs in that castle! Except
You may have noticed that I have a lot of light beams streaming through the windows behind Laertes. I think it would look cool if he had some light beams that he could cast volumetric shadows through. (Even though if you think about it, he must be standing in the shadow of something, because there isn't any light on his right side. A paltry detail of little import.)
To do this we'll make use of the Shine plug-in, one of the coolest plug-ins ever!
10.) Make a new composition. Name it "LightRayMask", or whatever you like.
11.) Drag the "Key" Comp into the timeline. You can turn off its visibility if you like.
12.) Make a new solid, comp size, and white. Then make another new solid, comp size, and black.
13.) Add a "Set Matte" filter to the top, black solid. Make sure the pop-up menu is set to "Key". You should now have this:
The view from the main window.
14.) Go back to "Comp 1". Drag "LightRayMask" from the Project Window to the top of the stack. Now add (Effect > Trapcode) "Shine".
15.) Now add Fast Blur and then adjust your settings as shown below:
I put the source point way out to the left where the windows would be. This gives me more-or-less parallel beams that roughly match the direction of the beams in the background. Make sure that "Transfer Mode
" is set to "None", and leave "Shine Opacity" alone. The reason I added Fast Blur is that I feel it makes the effect subtler and less distracting. The less obvious things are, the better. Make sure to select "Repeat Edge Pixels". Otherwise you'll have a strange dark border around your image.
16.) Go to the timeline and activate the transparency attribute of the top layer by selecting it and typing "t". You can now adjust the intensity of the effect.
If it is not intense enough, go ahead and duplicate the layer. You can try setting the mode to either "Normal" or "Add". For bright light, use "Add". I'm going for a dark, smoky look, so I used "Normal". Finally, I reduced the amount of Tint on the "Key" layer, so that Laertes wouldn't be too monochromatic (he's already too melodramatic, anyway).
Finally, I created a new comp, named it "Final", dragged "Composition" and my widescreen cutoff bars into the layer stack, set everything to high quality, and called it finished. Have fun playing with and modifying this technique, and good luck on your compositing projects!
Discuss this technique in the After Effects forum at Creativecow.net
Please visit our forums and view other articles at Creativecow.net if you found this page from a direct link.