"Imagine what it would be like if TV actually were good. It would be the end of everything we know."
- Marvin Minksy -
        Syndicate

* Atom 1.0
* RSS 2.0

Videopia the Book for only $9.99! 236 pages, all original content on EVERY topic from light to copyright.

"In my opinion, the content is worth much more than you are charging for it..."
                            - David B.

"This booklet is a great resource, and worth many times the price. Heck, it's worth four bucks just for the entertaining read alone..."
                            - Shane G.

"This is the best explanation of
Internet video I have ever read."

                            - Mark H.

Star Trek Transporter: Image Mask PDF Print E-mail
Written by D. Eric Franks   
Thursday, 30 April 2009 21:28

Although I've created a handful of self-contained tutorials explicitly outlining how to create a mask or matte entirely within a particular editing/composting application (Adobe After Effects, Apple Final Cut Pro and Sony Vegas), the general principle is much more fundamental and can be performed in just about any app or even media. Indeed, you can do it with a plate of glass and cheap acrylic paint if you want (that's how they've been doing it for a hundred years now), but we're going to stick to digital production methods.

The only element we need is a freeze frame screen grab of the moment of the transport, with our crew member stoically standing as still as possible. This is not really that big of a deal and all older analog versions of this effect use this technique: if you look closely, you'll see the scene freeze during the transport process. On a modern editing system, it is definitely possible to animate this mask to follow motion and although this process is easy, it is incredibly tedious AND is a feature of professional-level editing apps only, so we're going to stick to the absolute minimum basics here.

Making a Mask

First, grab a still frame from your video. There are lots of ways to do this, but you want to get a pixel-perfect frame if you can. If that means rendering out a single frame to a lossless codec (e.g., PNG), then that's what you've gotta do, but even a desktop screen grab of your full-quality preview window can work.

Now bring the image into Photoshop or Gimp or PhotoImpact or whatever. Our goal is to paint the crewmember 100% white and the background 100% black and there are about a bajillion ways to do this and some fancier/smarter techniques you can use to speed this process up - for example, using the magic lasso tool or a paint bucket dump with the similarity sensitivity set just right - but basically you can do it by hand with little trouble at all. This is just 3rd grade level coloring, so try to stay inside of the lines, but don't worry about it too much: the effect is only going to be onscreen for a second or two and we can apply a light blur to the edges in your video editing app anyhow.

Many image editing apps have better/dedicated tools for creating masks, such as vector outline tools. I would definitely recommend looking for and learning how to use them! The procedure outlined here, however, works in even the most primative paint programs.

Once you have painted your crewmember white, by whatever method you prefer, painting the outer background is just a click or two away.

  1. Use your magic wand lasso tool to select the white crewmember mask.
  2. Invert the selection area (usually right click > Invert or something similar).
  3. Dump a bucket of black paint in the inverted selection area with the sensitivity set to 255.

Again, there are other methods that might work in some situations, such as automatic edge detection and what not. I'd definitely love to hear about those methods in the forums here, since I am competent in Photoshop/PhotoImpact/Gimp, but certainly not an expert. Now for the tricky part.

Traveling Mattes, an Overview

Once you have an image with white pixels that are going to be transparent to the sparkle effect and black pixels that are going to be transparent to the clean plate/crewmember crossfade, you are set to finish the effect. Unfortunately, the procedure here is going to be different for every app and editing environment. Some apps will call it a "Track Matte Key" (Adobe) and some will call it a mask (Vegas). Some apps will arrange the tracks so that it goes Mask > Sparkle > Crewmember Video (Avid, Premiere, Vegas) and some will arrange the tracks from Sparkle > Mask > Crewmember Video (Final Cut Pro). Heck, some apps will even want to make the white part opaque and the black part transparent by default (Avid), although if you are editing digital "film" in your mind, then that makes complete sense, since black areas on a negative are transparent and white areas are opaque. Go figure. 

In any case, the process is fundamental, core compositing technique, is well worth learning and is best explained on dedicated Web pages and video tutorials, which I am working on all this week. Here's what I've got so far: