Using a Ramp to Gradient Blend

mike_in_ky wrote on 9/6/2008, 6:19 PM
I happened on an interesting video series on YouTube called the "Tin Whistle Trio". They are videos showing 3 characters, who happen to be the same person playing 3 different roles but simultaneously in each of the videos. To create each video, 3 separate videos are superimposed, a technique the creator called "using a Ramp to gradient blend" ( . I know about Green Screen and Chroma Keyer in VMS, but I was wondering if anyone knew of another technique within VMS that could emulate what's being used in the above-mentioned video technique?


Tim L wrote on 9/7/2008, 8:43 AM
There are several ways to do this. The most common term for this effect is "cloning". Search YouTube for "cloning vegas movie studio" and you'll find lots of examples. However, that search will include examples done in the full/pro version of Vegas, which has the bezier mask feature that makes this kind of thing very easy.

First of all, when shooting your clone videos, the camera must be on a tripod, totally locked down. One common mistake people make is to move the camera ever so slightly when starting or stopping recording. You don't want your camera to move even a single pixel's worth over multiple shots. If your camera came with a little infrared remote control, now is the time to dig it out so you can start and stop recording without touching the camera at all! (Or, just let the camera run continuously without stopping in between takes.)

Secondly, lock the exposure on your camera before you start recording. That is why the Tin Whistle guy had to adjust his videos to get them to match -- the exposure wasn't locked. (Or else the lighting in his room changed over time.)

You could use white-black gradients like the Tin Whistle demonstrates, but to get 3 clones on the screen you would need a total of 5 tracks, and VMS only has 4.

To do it this way, go to the Media Generators tab and select the "Linear Black to White" gradient and drag it to your top track. Now open up the FX dialog for the gradient event and click on the #2 control point. Change the color for this point from black to transparent by dragging the triangle (below the word "Color") all the way down to the bottom of the checkerboard. Now, in the track header at the left edge of this track, go to the icon to the right of the slider and click it to change from "Source Alpha" to "Multiply".

Next, drag one of your clone videos to the track directly below the gradient. On that track (the one with the video) go to the track header at the left and click the "Make Compositing Child" icon. This is the second icon to the right of the slider and looks like a skinny rectangle with an arrow pointing down. It changes to pointing up after you click it, indicating that now your video track is a child to the track above it. At this point, any place that has solid white in your gradient mask will show your video 100% solid, and anyplace that is checkerboard in the mask will change your video to transparent. Where you have a gradient, your video will become gradually transparent.

Now, put your background clone video on the next lower track. You should now see both clones.

This Multiply Mask approach is a little awkward, but the benefit is that instead of using a color gradient media generator, you could create your own mask in photoshop or even MS Paint and create a mask in any shape you need. If you cannot create a transparent background in your photo editing program, just create a black and white mask, then apply the "Mask Generator" effect to it (from the Video FX tab).

The only problem with this approach is that VMS has a very limited set of shapes for the cookie cutter. The benefit is you only need one track for each clone, so you could have up to four clones in VMS.

Put the leftmost clone on the top track. From the Video FX tab, apply the Cookie Cutter effect. Momentarily set the border color to red with a size of 0.02 or so, so you can see it, then set the cookie cutter shape to a rectangle or square (or whatever shape works best for you) and adjust until you are keeping just the amount of clone you need from this track -- i.e. the left 1/3 of the video. Change the border back to 0.00 to get rid of it.

Now put the middle clone on the next lower track. Apply the Cookie Cutter effect and adjust as before. Note that you don't have to isolate your middle clone -- you can keep the left 2/3rds of the image because the left 1/3 will be covered up by the top track.

Finally, put your full background clone on the next lower track. No cookie cutter is needed for this track.

The best advice is to just play around a lot and experiment on a "test" video before you sit down and try it on the "real" project.

Tim L
mike_in_ky wrote on 9/7/2008, 11:55 AM
Tim, thanks for the advice you've given. I was just wondering how it could be done in VMS and you've told me. I will trying this out in the next days. I appreciate your time on this one...thanks, Mike.
autopilot wrote on 9/8/2008, 3:08 PM
This may have been covered, but watch your lighting and shadows. If you're using natural sunlight, even a few minutes can change the brightness on one of your videos to make it look different than the others.
mike_in_ky wrote on 9/8/2008, 6:56 PM
Autopilot...thank you for your suggestion and input.
mike_in_ky wrote on 9/10/2008, 10:21 AM

I started playing around with the techniques you described. As suggested, I also searched YouTube for "Cloning with Vegas Movie Studio" and found a pertinent video by Dillonp23 ( He was using VMS 7.0 and described setting up masks in the Pan/Crop window. In the lower left corner of the Pan/Crop window, there was a box for "Mask" that he clicked and then he clicked around the image to set up the mask. That technique looks very simple. I have VMS 9.0 and there is no such box to check for setting a mask. Did Sony take away that capability? If not, is it located in a different place?

Tim L wrote on 9/10/2008, 12:11 PM
The YouTube video is using the full Vegas 7 (Pro), not VMS.

Bezier masking is one of the features that is only available in the more expensive pro version, and it is indeed in the pan/crop dialog as shown. This simplifies making clones because you can outline any shape you want quite easily.

However, you can do pretty much the same in VMS, but with more effort involved. Save a frame of video as a .JPG or .PNG file, then bring that into a photo drawing program. Draw the mask you want, using the photo as a lower layer (just as a reference). Make the part you want to keep solid white (255/255/255). If you can make the background checkerboard/transparent, save as a .PNG file and you can use it as a mask as described in my earlier post. If your drawing program can't work with transparent (alpha) data, set your background as black, then apply the "Mask Generator" effect after you bring it into VMS.

More work, but still possible. (But Bezier Masks are one of the features that lured me into upgrading from VMS 6 to the full Vegas 7).

Tim L
mike_in_ky wrote on 9/10/2008, 1:48 PM
Thanks, Tim. Now I understand the issue. You pay the big bucks and you get neat stuff. Perhaps I can talk my wife into doing an upgrade for me for my birthday ( ...and XMAS...and anniversary)! My graphics program is Paint Shop Pro 8 and I can do what you outlined as far as creating a mask.
nihila wrote on 9/10/2008, 2:53 PM

You can still use VMS 9.0 Pan and Crop to make upto 2 clones.

mike_in_ky wrote on 9/10/2008, 5:27 PM
Nihila...thanks for responding. I tried the technique shown in the video link you posted. And with VMS 9.0 I was able to do it that way. However, the YouTube user, Dillonp23, that made the video uses the Pro version of Vegas 7.0. I think the point Tim was making is that in order to make the mask the way it was made in the link I posted, Dillonp23 used a feature in the Pro version of Vegas 7.0 that is not available in VMS. Thank you again for your input.

Tim L wrote on 9/10/2008, 5:57 PM
Yeah, nihila's link shows another way to do it in VMS: pan crop, then use track motion to move the cropped clone back where it should go. This approach would let you do up to four clones in VMS (just like with cookie cutter).

When you crop video without zooming out on it, the resulting video is always centered on the output canvas. Consequently, you then need to use track motion -- as shown in nihila's link -- to slide the cropped video back to where it belongs.

However, you never need to crop or move your lowest, background layer -- it can always be left full size. If you are only doing two clones, for example, you can activate the pan/crop dialog for the top track, de-select the "lock aspect ratio" button, crop the video as needed, then use track motion to position it so that it lines up with the lower layer.

Tim L
mike_in_ky wrote on 9/12/2008, 7:11 AM
Thanks for the clarification, Tim. I've got some interesting ideas that I can now begin using VMS.