INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS
Come Join Us!
Are you a
Computer / IT professional?
Join Tek-Tips now!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts
- Keyword Search
- One-Click Access To Your
- Automated Signatures
On Your Posts
- Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.
Partner With Us!
"Best Of Breed" Forums Add Stickiness To Your Site
(Download This Button Today!)
"...I am very happy with the whole site and would like to extend my compliments to all of you who work to make it one of the most useful sites (If not THE Most Useful) ...and the easiest to navigate..."
Where in the world do Tek-Tips members come from?
Creating and applying transparency using alpha channels
Posted: 7 May 08 (Edited 8 May 08)
By and large, Adobe's titler does a great job, especially if you're only playing with text or symbols-you-can-get-from-fonts (such as Zapf Dingbats, etc.) but undoubtedly, you've seen some of the more... interesting... captions in such things as "pop-up video", etc., where little shapes pop open, pulse like little hearts, fly around, or just generally make mischief on the screen while you're trying to watch an otherwise drivel-flavored music video.
Honestly, with some of the videos I've seen, can't say as I blame people for wanting to spice it up with dancing crap all over the screen. Sheesh – nothing's ever gonna be as cool as cave paintings, know what I'm saying?
So, superimposing such images can be a real fun thing to do. The magic, of course, is to make sure that they're all transparent however you like.
Now, most folks would first look at chromakeying, which is perfectly great, by and large. It's served weather forecasters for millions of years (as long as they don't wear green ties). Chromakeying is great if you've got some long continually moving image you need to constantly key out, such as a weather reporter, or a small snub fighter on Hoth.
But let's say you only have a still image. For example, a caption that appears in a little spaceship, or a still image of Ray Walston holding up a finger as if he just had a brilliant idea. Surely Ray Walston deserves more than a crummy fuzzy chromakey. You know it and I know it.
If it's just a still, then you can add an ALPHA CHANNEL to it (assuming you're using Photoshop or some other application that understands how to add alpha channels). Alpha channels are awesome, and for stills, they kick chromakeying to the curb. Here, let me show you:
Open your picture in Photoshop. Find the layers palette. Probably on the right. Note that there's a little tab on that that'll open the channels palette. Click on that tab.
Now you're looking at the CHANNELS in your image. There will probably be three: Red, Blue, and Green. This is because your image is composed of three colors. Get ready, the next part takes a mental leap.
In addition to COLOR information, the channel tab allows you to define other characteristics about your image. In this instance, we're going to make up a NEW channel for TRANSPARENCY.
Look at the bottom of the channels palette, and you'll see the usual icons, such as a little trash can and a little notepad, for making a new (whatever). You've seen this in layers, so you know what I'm talking about. Click the little notepad to create a new channel and voila – a new channel appears (probably called "alpha.")
Okay, this new channel is DIFFERENT than your color channels, so it might take a bit of getting used to. An alpha channel can only be shades of gray, from black to white and all shades of gray in between. Black means this part of the image will be completely transparent. White means this part of the image will be completely opaque. Gray means this part will be slightly transparent (depends on how close it is to black or white). So, for this image you have complete pixel-by-pixel control over transparency and the DEGREE of transparency.
(See what I mean!)
We continue our journey...
Now you have this all-black alpha channel. Great. Click back to the layers palette and go to your image. Use your usual selection tools to pick out everything you want to show on your video. So, for example, select your spacecraft, or your cartoon balloon, or Ray Walston. Feel free to feather your selection tool – it might look better. Use the lasso or the magic wand, or whatever you like. Doesn't matter. Just select the stuff you want to keep. And if you can't select it all, don't worry – you can do this little section repeatedly until you have exactly the image you want.
Got it all selected? Nice. (Took a while, huh? This is why using alpha channels is great for a still image, but if you tried doing it for a constantly moving image, you would be quickly driven insane)
Click the CHANNELS palette again.
Chances are, when you look at the channels palette, the three RGB layers have little eyes and the alpha channel doesn't. If that's the case, click on the alpha channel and its eye will light up and all the other channels will go blind. Your workspace will appear black. Don't panic – you haven't caused any trouble – you're simply ONLY showing the alpha channel (which is all black).
You will also notice that your selection is still flickering along.
Do a quick check of your chosen colors. If you are editing an alpha channel, you can only fiddle with black, white, or gray, but for this, you want your foreground color black and your background color white. Make that the case if it's not already.
Okay, all set.
Keep an eye on your workpiece and press the DELETE key.
Shazam – all the black pixels you selected were yoinked! Now your selection appears as a big white mass in a black field.
This, I assure you, is A Good Thing.
You can peek at the alignment by clicking the eye of one of your channels (doesn't matter). This makes the color channel AND the alpha channel visible, and lets you dummy-check your alignment.
Now you've made an alpha channel.
Export that file as a PCT file, or a TARGA file. Those are the popular forms for video. When exporting those new stills, be sure that "Preserve alpha channels" is SELECTED.
Save your PSD file, close Photoshop, and open Premiere.
Open the Lame Music Video project.
Import your newly created file (the PCT or TGA file – although you could also import the PSD, I suppose – I just usually don't, because I work in ancient versions of the software and PSD import isn't as smooth a process as I would like.)
If you don't already have a video channel for superimposition, make one. Basically any video channel labeled 3 or higher is a superimposition channel. You need a layer numbered 3 or higher.
Place your new still on one of those higher numbered layers. Don't place it on layers 1 or 2. Layers 1 and 2 don't support transparency.
Right-click on the new still and select Video >> Transparency. Behold lots of interesting choices for transparency. Fiddle with all of those later, as they really are a lot of fun. For now, though click the "Show all layers" (I think it's called that – it has an icon that looks like a little onionskin notepad with a sheet pried up) checkbox under the little preview window. Your preview will probably show only your still image. No worries!
For transparency type, check out all those options. The one you're looking for is going to be something like "Alpha channel." You'll know it when you select it, because you'll SEE the results in the preview window. Don't worry about any of the other settings at this point – the presumption is that you cut a perfect mask in Photoshop and so you don't want to jigger with it here.
Once you hook the right transparency type, click [OK] and go back to your editing window.
You can now do pretty much anything you want with that little still. You can make it pulse or fly around using the MOTION commands, you can apply effects to it, you can cut, trim, stretch, or do whatever you want with that clip. No matter how you mess with it, the alpha channel you cut in Photoshop makes all the "background" of your still utterly transparent.
Ray Walston can even wear a green tie!
Bonus: If you're going to make a bunch of superimposed images that are all different in content, but all would have the same alpha channel mask, you can make a separate B&W image and tell Premiere (in the transparency control window) to apply a transparency mask that is in a completely different file. So, you could import "Caption01.bmp", "Caption02.bmp",... "Caption87.bmp". Eighty-seven captions?! Who wants to cut a new alpha channel for each one? Screw that – as long as the mask would be the same, all you have to do is import ONE mask as a B&W image called "CaptionMask.pct" and then use THAT file as your mask for your eighty-seven captions. Takes a bit of fiddling to figure it out, but you will, especially if you end up trying to work out some complicated composition. Have fun!
BonusBonus: It's very possible you can import your PSD file (with empty layers and so forth) directly into Premiere. if so, then your workflow can be even slicker!
Back to Adobe: Premiere FAQ Index
Back to Adobe: Premiere Forum