One of the more subtle tricks used in compositing is the lightwrap, where you create an edge blend effect between your foreground and background elements. This gives the illusion that bright light-sources in the background are bleeding around the foreground subject. In Motion, the key to building a lightwrap is through the use of image masks.
Download the two tutorial image files: lightwrap.zip (1.2MB). The sunset image, 'Red Sunset', is courtesy of Jeanette K. Shribbs and is provided under a Creative Commons license
.
We will be compositing a greenscreen hand shot over a Costa Rican beach scene. It will be necessary to key and color-correct the hand before we create our lightwrap.

Primatte correctly guessed the background color of our shot (green) and got us part of the way to a smooth key, but there are still some adjustments to be made. To get a better idea of the keying results, let's take a look at the alpha.

Some nasty stair-stepping is visible in the matte, as well as some loss of hair detail. We will fine-tune the Primatte filter to correct the problems.

Our matte is looking much better: the jagged areas have been smoothed and the hair detail mostly restored. Let's switch back to the color view.

As you can see, our changes caused a lot of green spill to appear in the hair and edge areas. Primatte's built-in spill suppressor can sometimes be a little heavy-handed, so we'll use the Spill Suppressor filter to correct our image.

The spill has been cleaned up from the edges and the hair is, once again, brown. With our foreground element completed, let's move on to our composite.