This tutorial describes how to use the Video Sequence Editor (VSE) in Blender to build an animated alpha image sequence that reveals different parts of an underlying static image. The end result of the video track layering will look like the image below.
If you need more detailed general information regarding Blender's video sequence editor you may want to refer to this article: http://dreamsteep.com/tutorials/blender/202-working-with-the-video-sequence-editor-vse.html
In the finished sequence the star shape above will move and change over time to reveal different parts of the underlying static image.
An alpha channel, also known as a mask, is a special channel of an image used to make parts of the overall image opaque, transparent, or partially transparent or opaque. Typically, the darkest areas of an alpha channel are most transparent, white areas are opaque, and shades of gray represent varying levels of transparency. This transparency mapping scheme comes from traditional film compositing techniques where a high contrast film such as Kodalith is combined with another strip of traditional color or black and white film. Wherever the high contrast film is not black, the light shining through the transparent areas of the film expose part or all of the underlying image to the final printed image. The original Star Wars movies employed travelling matte and alpha blending techniques extensively.
Digital image formats such as PNG and TGA may be saved with 32-bits of data per pixel. These data are broken up into four virtual data channels containing an 8-bit channel for red, green, and blue (RGB), and one 8-bit alpha channel, thus 8-bits x 4 channels = 32 bits. Sometimes images of this format are referred to as RGBA. The alpha channel is really a mask; it specifies how the pixel's colors should be merged with another pixel when the two are overlaid, one on top of the other.
To summarize visually, alpha blending the two images below will result in an image similar to the one at the top of this article.
You may notice I said above that darker areas of an alpha channel are typically the most transparent, yet in the above image the star is white and its background is black. In Blender's VSE you have a choice to make the alpha image appear as shown above, or inverted, depending on which effect setting you use.
In the example that follows we will use a static image as the background, and an image sequence that includes an alpha channel in each image. When the sequence plays over time the alpha-blended star will appear to animate over the red and yellow star background.
Here is a screenshot of some of the images we will be using in the sequence:
Download the Source Files
All of the source files referred to in this tutorial may be downloaded here.
Step 1 - Add Images to the VSE
The first thing we will do is load the background image into the VSE. Note: You can quickly get to the VSE layout once Blender is running by holding down the Control key and tapping the Right or Left Arrow Key repeatedly until the VSE layout appears.
To load the background image click the Add button, then choose Images from the menu.
Step 2 - Choose a Background Image.
For this example we'll load the image named "Stars-Background.png". Right-Click the image named "Stars-Background.png", then hit the Enter key, or click the Select Images button.
Step 3 - Place the Image in the Timeline as a Video Track
Once the image is loaded into the VSE it will be rubber-banded to the cursor as a video track. Move the video track so it starts in frame 0, as shown below, then Left-Click to place it.
Step 4 - Choose a Foreground Image Sequence
Click the Add button, then choose Images from the menu. In the Alpha Star directory you will see a number of images. We need to select all of the images in the Alpha Star folder and import them as an image sequence. To select all of the images in the Alpha Star folder hit the A key so all of the files are highlighted blue, then hit the Enter key, or click the Select Images button.
Step 5 - Move the Image Sequence Video Track in the Timeline
Drag the image sequence video track to the start of the timeline, so it matches the timline position of the background static image.
Step 6 - Extend the Duration of the Static Image Video Track
We need both video tracks to be the same length. To extend the background image video track Right-Click the right side of the video track as shown below, so the left-pointing triangle is highlighted white. With the end of the video track selected, hit the G or E key to grab, or extend the clip in the timeline. Drag your mouse to the right and Left-Click when the the background image video track matches the duration of the image sequence video track.
The video track layout should now like similar to the timline below.
Step 7 - Select the Image Sequence Video Track
We will now select both of the video tracks. First, select the image sequence video track by Right-Clicking it.
Step 8 - Select the Static Image Background Video Track
Holding down the Shift key, Right-Click on the static image background video track. When both tracks are selected they will have white text, and look like the image below.
Step 9 - Add an 'Alpha Over' Effect
There are a number of visual effects to choose from. What we want here is the "Alpha Over" effect, which will allow the alpha "star" image to mask the underlying static image.
When the "Alpha Over" effect has been added, the track layout should look like the screen below, and you should see the overlay effect in the preview panel.
Step 10 - Set the Overall Duration for the Animation
If you decide to render this as a video, or an image sequence we will need to adjust a few settings. First, we need to set the frames to be rendered so they match the timeline in the VSE window. If you're using the standard "VSE" layout in Blender you will see Start and End controls in the timeline window panel. These should be set to 1 and 120 respectively. If you leave the End set to Blender's default of 250 you will see 120 frames of animation followed by 130 frames of black.
Step 11 - Set the 'Do Sequence' Render Option
By default Blender renders a camera view from the 3-D viewport. Instead we need to render the output of the VSE. To enable this click the "Do Sequence" button. This tells Blender to render whatever is in the timeline of the VSE, rather than what is in the 3-D viewport.
Step 12 - Choose the Rendered Output Size and Format
Blender will render the VSE output to whatever size you tell it to, but the results will look best if you match the dimensions of the video to the source image size. In this case the source images are 640 x 480, so we will set the SizeX to 640 and the SizeY to 480.
You may choose any output format that works with your version of Blender. In the example below PNG is used. This will render an image sequence in a PNG format that can be imported into a video editor, QuickTime Pro, or any other video utility that allows static images to be imported as a sequence. Alternatively, you could import the image sequence back into Blender and render that out as a QuickTime or AVI file. Every image format has some advantages and disadvantages over other formats. It's a good idea to experiment with different formats and settings to see what works best for your needs.
Here is how the finished movie will appear when rendered as a video: