In this lesson, we will look at what channels our images are made from and how we can use blending modes inside of after effects.
Images that display on our monitors are made of 3 channels, red, green and blue.
Import a photo that you have on your computer (or from the internet) into after effects. Drag it into the New Composition button (labelled 1 in below image).
Number 2 represents which channels we are currently viewing in the composition window. By default we are seeing the red, green and blue channels combined together to create the pretty image we see in the comp window. By combined I mean literally added together on top of each other. If you run your cursor over the image, you will see the values in the info panel (labelled 3).
This shows the values of the RGB channels individually from 0 to 255. To help visualise this, press the show channel icon (labelled 2) and select the red channel (hotkey alt+1). The image will look very different and is black and white, rather than red. That’s because each channel is just a greyscale image that contains values for how much of that channel should be in the image. In the red channels case, we can see that there isn’t much red in the sky, but a fair amount in the road.
Press alt+2 to go to the blue channel, you’ll notice it’s very bright in the sky. Press alt+3 to go to the green channel.
To replicate the process after effects uses to combine all channels, let’s separate the image into its individual RGB channels. Duplicate the image twice, and call one layer red, one green and one blue.
Now search for the effect shift channels and drag it onto all three layers. This effect allows us to isolate one channel for each layer. To do this for the red layer, set the take green and take blue to off (this will leave just the red channel). Do the same for the green and blue layers.
Note that if you adjust the red layer whilst the green and blue layers are on top (as it is in the above image) you won’t see any changes unless you turn the visibility of the green and blue layers off. Alternatively, you can solo the layer you’re working on with the labelled button.
Once all three channels have been isolated on their respective layers, we need to pre-compose them otherwise after effects won’t acknowledge the effects when we use blend modes. To pre-compose a layer, select it and press control + shift + c. Also, make sure to name it and set the “move all attributes into the new composition” option, otherwise the shift channels effect will be outside the composition.
Repeat that process for the blue and green channels. Now let’s discuss blending modes (which are a very important part of compositing). If you don’t see the blend mode options, press F4 to toggle modes and it should appear. When you click on the menu to expand it, you’ll notice there are a ton of modes.
All of these modes are mathematical operations, some are self-descriptive. For example: the add mode simply adds the numerical channel data that we were looking at in the info panel with the layers underneath. If you have a single layer and set the blending mode to add nothing will happen because it has nothing to add to.
You can look up online what each of the blending modes do but here is a quick summary of the most important modes:
- Screen: Adds A over B but doesn’t let the result go past a value of 255 or white (for 8 bit images)
- Multiply: Multiplies A x B, very useful for removing white values from A.
- Soft light: A little more complex than add, screen or multiply but can create some great results. See here: http://en.wikipedia.org/wiki/Blendmodes#Soft_Light
Remembering that we separated all three channels into separate layers, if we were to add these all back together we should have the same image we started with. Go ahead and set the top two layers to add (the bottom layer doesn’t need to have a blending mode).
Excellent, the image is exactly how it used to be. Now try turning off any one layer (the blue layer for example) and you’ll be able to see what the image looks like without any blue information.
One other very important channel found in some images is the alpha channel. Like the red, green and blue channels it is also a greyscale or black and white channel that holds information. Unlike the R, G, B channels it does not determine colour information but opacity. If you import an image that has an alpha channel, you can view this information by pressing alt+4. The alpha information also appears in the info panel. A value of 255 alpha is opaque and a value of 0 alpha means completely transparent.
If you’d like to experiment with this image, type “png transparent image” into Google images and it will be the first image.
The way after effects takes this greyscale alpha channel and produces transparency is by multiplying the colour channels (R, G, B) by the alpha channel. Often this process is done for us and is called premultiplication. Sometimes in compositing, having a premultiplied image will produce incorrect results. There are ways to unpremultiply an image. An image whose colour channels have not been multiplied by the alpha channel are called “straight” or “unpremultiplied”.
An interesting thing to note is that alpha channels exist even when we might not see them. For example you might not think that when we create a new solid (control + Y) that it comes with an alpha channel, but this is how after effects makes our layers transparent when we lower the opacity. The opacity (shortcut T when selecting a layer) is simply manipulating our alpha channel. Also when we isolate selections or create cut-outs with masks, we are manipulating the alpha channel. Create a mask on your solid layer and go to the alpha channel, you’ll see the information after effects is using to control which parts of the image are transparent and those that are opaque. I have added feathering to my mask to illustrate the point further.
In the next lesson we will look at chroma keying.