Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Understanding alpha channels

From: After Effects Apprentice 02: Basic Animation

Video: Understanding alpha channels

Now if you remember, earlier in this lesson, when we imported our snowstorm title, After Effects asked us what type of alpha channel this layer had. At the time, we clicked on Guess, and After Effects correctly guessed that it was pre-multiplied with white. I thought it would be useful to explain, in a little more detail, the difference between straight and pre-multiplied. Now you will not see this dialog, unless the alpha channel is unlabeled. Unlabeled alpha channels may come from outside of the Creative Suite.

Understanding alpha channels

Now if you remember, earlier in this lesson, when we imported our snowstorm title, After Effects asked us what type of alpha channel this layer had. At the time, we clicked on Guess, and After Effects correctly guessed that it was pre-multiplied with white. I thought it would be useful to explain, in a little more detail, the difference between straight and pre-multiplied. Now you will not see this dialog, unless the alpha channel is unlabeled. Unlabeled alpha channels may come from outside of the Creative Suite.

Photoshop, Illustrator, and After Effects always label their alpha channels, but if you don't ever see this dialog box, I do want to point out that there's a preference that someone may have set that will always get the dialog. Click OK and I'll show you Preferences > Import. The default is to always ask the user if After Effects comes across an unlabeled alpha. If someone had set this preference to Guess, After Effects will always guess, and sometimes it guesses incorrectly. So I like to leave it set to Ask User.

That way it makes me think whenever I come across an unlabeled alpha channel. Now if I drag this title I just imported into my composition, I can see it has a nice shadow fading out to transparency. Again, my background color is transparency. I can also refer to the alpha channel in order to see transparency. But I did want to point out that underneath the hood, After Effects processes all layers for transparency as if they had a straight alpha channel.

You can see this view by checking on the Channel's pop up and selecting RGB straight. Whoa! This looks a little strange, but this is actually what's going on underneath the hood. The drop shadow surrounding the letters is being extended all the way out well past the edge of the shadow. You could think of this as it's bleeding. It's bleeding the color all the way past the edge of the alpha channel. So when the alpha channel is used, you get a nice clean image.

So even though the black drop shadow was originally mixed with a white color, After Effects has un-multiplied the white and has returned the shadow to be 100% black. Now you will never work in this view, but it's sometimes worth looking at it just to reiterate how After Effects renders internally. Now to explain the differences between straight and pre-multiplied, I created a couple of files that I will open in Photoshop. First, I'd like to remind you what a normal Photoshop layered file would look like.

I probably would have created it as a layered file on a transparent background. In that case, the channels would simply say RGB. It would not have a separate alpha channel. That's because each layer in Photoshop has an alpha channel built-in. When I save this file and import it into After Effects, the alpha channel would be labeled, so After Effects would not ask me to interpret it. I just wanted to point out this version first, before we see the two odd versions I've created.

The first one is pre-multiplied with white. This is the same file we imported earlier. In this case, my image is on the background, and I have RGB and alpha, four channels--a 32-bit file, in other words--and the transparency is built into the alpha channel. Now you probably know that the background layer in Photoshop has no alpha channel, so that's why we had to create the alpha channel separately. Now normally, you would not create a file like this directly in Photoshop, but if you were rendering, let's say a 3-D animation from another program, when it renders with an alpha channel, it will be in the form of a 32-bit file: RGB and a separate alpha.

Whether or not it's a pre-multiplied alpha will be determined by how you save it, from that program. If I had saved it as pre-multiplied with white or black or yellow or blue or any color, any areas that are semi-transparent in the color channels would be mixed with that background color. In this case, it's mixed with white. This is why we call this a pre-multiplied with white file. Now, After Effects needs to know this, because it needs to remove the white from that black drop shadow.

Let's look at the other file I have created. This is a straight alpha channel. Again, I'd never create this directly in Photoshop, but this could simulate a frame rendered from a 3-D program, if you set it to render with a straight alpha. In this case, the black shadow would be extended all the way past the edge of the alpha channel. In fact, you may not even see this white background. It would be just totally black all the way to the edge of the frame. The alpha channel, by the way, is the same in all files.

So when After Effects asks you to interpret the alpha channel, it's kind of like a trick question, because the alpha channel is the same in both versions. The difference is how the color channels are created. Are the semi-transparent pixels, mixed with the background color, or do they bleed past the edge of the semitransparent pixels in the alpha? Let's return to After Effects, and I wanted to point out one other thing. What happens if you interpret the alpha channel incorrectly? In this case, this is my regular title, which has a black shadow. I know it has a black shadow.

I've seen it in Photoshop. And yet when I import it into After Effects, it has this odd white halo. This might be an indication that After Effects guessed incorrectly, or maybe I guessed it incorrectly. Now this is easy to fix. You don't need to re-import the file; the dialog that you saw for interpreting the alpha can be brought up again at any time. So here is the title I am using in this composition, Snowstorm title, and it's being interpreted as having a straight alpha channel.

Now, we know that's not correct. It should be pre-multiplied with white. So if you think the alpha channel is interpreted incorrectly, select the footage item in the Project panel and click on the Interpret Footage button at the bottom left-hand corner of the Project panel. When the Interpret Footage dialog opens, at the top will be the alpha channel options you saw before. The other options below, we will cover those in the later lesson. So again the options for alpha are to ignore the alpha, consider it as a straight alpha--meaning don't do any correction around the edges to try to remove any color--and then pre-multiplied with whichever color you like.

If I click Guess, it will correctly guess it's pre-multiplied with white. When I click OK, After Effects will update its alpha channel interpretation. You can see that it clearly has a nice clean alpha channel. Now the opposite may also be true. Quite often, you may have a title with a nice white glow on a black background, so, the opposite of a black shadow on a white background. In that case, the correct interpretation would be pre-multiplied with black. And if you use straight, then instead of white glow, you would have a black halo.

But generally speaking, if the edges look a little weird, do check the interpretation, and make sure that it's correctly interpreted. I will leave you with this final thought. Here are my three files: the layered Photoshop file, the file pre-multiplied with white with the white removed, and the straight alpha channel. If you're wondering what the difference is, there shouldn't be a difference. If After Effects has correctly interpreted the alpha channel for each individual file, they should all look identical when placed in the composition.

In addition, the alpha channels are also identical. Remember what type of alpha channel it has is a trick question. The alpha channels in this case are exactly the same in each file, and I hope that helps you understand a little about the differences between a pre-multiplied and a straight alpha. Alpha channels is a big subject, but I hope that's enough to get you started, especially when you're importing sources.

Show transcript

This video is part of

Image for After Effects Apprentice 02: Basic Animation
After Effects Apprentice 02: Basic Animation

29 video lessons · 31945 viewers

Chris Meyer and Trish Meyer
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed After Effects Apprentice 02: Basic Animation.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.