Two Cats From One
Using the Difference compositing mode to create masks is an effective tool to keep in your Vegas 5.0 bag of tricks. With very little forethought this method can be used to key out a background, create a mask layer for effects, or allow for the use of real locations to compose scenes for which virtual sets would be far too difficult to create (reflections and shadows on the real scene can be easily composited into a scene using this method). The following example demonstrates what can be done with poorly shot footage and a little bit of tinkering.
|
Fig 1. A frame from the final composite, showing two instances of the same cat. |
The footage in this example was shot by placing a Sony DSR-PDX10 on a coffee table and recording a few minutes of a white and brown cat ("Faye") chasing a piece of cardboard on wire. An important element of this effect is that the footage was acquired with all automatic exposure and focusing features disabled, including shutter-speed and white balance. This is not a
requirement for this type of effect, but it can help to avoid several headaches down the line. Even with this in mind while shooting, the source footage for this example is not ideal, as shown in
Raw Clip 1 (WMV) and Raw Clip 2 (WMV). During shooting, the animal handler cast shadows on the background, and the toy used to guide Faye was commonly in frame. In this project, we attend to these problems with Bezier Masks.
Examining the project from the bottom up, we first encounter the background on Track
8 (Fig 2). Its playback rate is set to
four to cause temporal resampling to occur, averaging-out possible noise. More careful creation of this background would make use of only four source frames, as this background also serves as our differencing template.
|
Fig 2. The background. |
Composited upon the background layer we find Tracks
6 (Fig 3) and
7. Track
7 accounts for a right side shadow difference between
Raw Clip 2 and the background clip. This is for detail coverage, as a Bezier Mask is used on the event on Track
6 to mask out the toy.
(If you are curious, Mute Track 7 to catch what appears to be an artificial shadow creeping over the right side of the frame.)
|
Fig 3. A layer containing one instance of Faye, making use of Bezier Masks. (Shown over red for clarity.) |
Composited onto these we find Tracks
2-5 (Fig 4), which are the heart of the project. Track
3 (the background) uses the
Difference composite mode over
Raw Clip 2 to leave only the footage of Faye and areas of the scene that she affects. To Track
3, several effects are added to properly tune the mask (Fig 5). These effects are toggled to
Post, allowing the entire effects chain to operate on the result of the
Difference operation.
|
Fig 4. A layer containing a second instance of Faye, masked with a mask created by differencing the background and the footage in question. (Shown over red for clarity.) |
In the effects chain we find:
- A Black and White filter used to fold any individual color differences into grayscale. Whether this should be done to both input clips or at all depends on the footage and desired effect.
- A Levels filter with a low Input end (to enhance relatively small differences between the two input tracks) and a just-slightly-lower Input start (to suppress noise, but low enough to allow for some gradiation in output).
- Three Median filters (Fig 6) for soft mask expansion, strong vertical mask expansion, and light mask suppression, respectively. These are keyframed to account for the crossing of the difference-masked Faye (Tracks 2-5) in front of the merely-cropped Faye (Track 6). This calls for the use of an overlay to cover the mask phasing in the upper-left of the frame. A simple Bezier Mask is used on Track 1's event with decent results.
- A Gaussian Blur filter to soften the mask as a whole.
- A Mask Generator filter to bring it all together.
|
Fig 5. The effects chain as applied to Track 3. Note the relatively small input range in Levels. These values will be footage specific for different applications of this technique. |
|
Fig 6a. Median settings for Track 3. This median is used to expand the mask gently by applying an Offset only slightly greater than a pure median. This has the effect of reducing single-point noise with a bais towards mask expansion. Circular area processing is enabled to more evenly restrict the range of the median, leading to a more rounded mask appearance after expansion. |
|
Fig 6b. Median settings for Track 3. This median is intended to expand the mask vertically. The Offset of one makes this filter behave exactly like Max. As this is essentially a one-dimensional application of median, Circular area processing is not enabled. |
|
Fig 6c. Median settings for Track 3. This median is used with a low offset to reduce any vertical striping introduced by the previous median and any other over-zealous mask expansion. |
Finally, we patch up a bit of sloppiness with Track
1 and a thrown-together Bezier Mask. The final output can be found
here (WMV). With any luck you'll while away hours creating duplicates of single actors exchanging soda cans in break rooms, composites of people jumping over cars, or semi-invisible characters taking out the trash. You may even find ways to streamline relatively tedious existing work with semi-automatic mask generation. At least try to have fun...