Extract specific color as different layer or in alpha channe

Discussion and help related to Adobe video software goes here. e.x. Premiere, After Effects, Photoshop, etc.

Extract specific color as different layer or in alpha channe

Postby Perfect-Blue » Fri Mar 09, 2012 5:00 pm

Software: After Effects CS5.5 / Windows 7 64bit Pro / CPU:2600k / GPU: Nvidia 560ti

I have a scene, where i have selected a small area with single specific color, while the all other scene around is in different single color. How can I extract only the small area I want, based on the color? The two colors are red and blue.

Currently I have some progress using with keying, using Keylight, still I'm wondering is there any better and simpler way to deal with it?
User avatar
Joined: 20 Feb 2005
Location: Bulgaria

Re: Extract specific color as different layer or in alpha ch

Postby Eake4 » Sat Mar 10, 2012 4:51 am

You can mask it, but i reckon keylights gotta be the easiet method and most effiencent one too.
User avatar
Australian Zeus
Joined: 26 Jul 2011
Location: Sydney, Australia
Status: Doing something useless again

Re: Extract specific color as different layer or in alpha ch

Postby Brad » Thu Mar 29, 2012 11:42 am

Assuming I'm understanding your setup correctly, you have an image that's essentially 2 colors. 1 is pure blue, 1 is pure red. If this is correct, you can use the effect "Set Matte." Then, for "Use For Matte" choose either the Red Channel or Blue Channel. This is telling the layer "I want you to make the alpha channel of this image the same as the Red/Blue channel of the image" in effect, making the red or blue part opaque, leaving the rest transparent.

However, this will only work if it's pure blue or pure red. Say for example that the blue part of your image is actually more of a slight Purple. If you were to look at the individual color channels, you'd see that in the Red channel, the "blue" part would show up as a very dark gray, because there is some red in there. So if there's any kind of gradient or blurring happening on the image, it'll be matted out semi-transparent in those parts. You just have to play with it.

If you're curious what a practical application for this effect is, a lot of 3D applications will render out multiple passes of an image in order to be composited together later on in something like AE (or Nuke or Fusion or what-have-you). One of those passes might be a combination of multiple things, like Ambient Occlusion, Z-Depth, etc. You can render up to 3 different grayscale images into one pass if you assign each one to a separate color channel, then use "Set Matte" to extract them later on.
Ask Brad an After Effects Question! - Forum - Site
User avatar
Joined: 20 Dec 2000
Location: Chicago, IL

Return to Adobe Software

Who is online

Users browsing this forum: No registered users and 1 guest