Back to Index

Lightsabers in motion with After Effects
by Joe Bloe


STEP 3: LAYERING

If you haven't already, go back and make keyframes for all the other sabers in your composition.

You will probably notice that sometimes a saber is under another one, when it should be over it. To fix this, you will need to split your saber layers and make them appear in the right order at the right times. For example, in this clip, the first time the sabers hit each other, the red one is on top. But for the second hit, the green one needs to be on top. So I split the green layer and put it on top at that time so that it works correctly. I did the same later in the clip with the red saber, so it could be on top again for the third saber hit.

 

Now your composition should be starting to look real. But there's a problem: The sabers are never behind the things they are supposed to be behind!

So we have to isolate part of the video that we want to be in FRONT of the light saber. We need to put another copy of the captured footage in front of the light saber, with the stuff we need to be in front "cut out" by using a matte, or alpha channel.There are two methods I can think of to do this: Using after effects's built in bezier masks, or using another program (I use Elastic Reality 3.1) to create a sequence of greyscale matte images and use it as a track matte. I prefer to use Elastic Reality because I like its bezier tools better than Adobe's. But not all people have ER so I will explain both methods.

 

First, find out which frames you will to make a "in front" object, because you would not want to do it for the entire clip if you only need it for 12 frames.

 

After Effects:

Duplicate the background footage clip, layer it on top of the saber layer you are trying to cover up, and trim the edges so it is only there for the frames you need it to be there for. I only needed to use it for 16 frames. It looks like this:

 

Then draw a Bezier mask around the foreground object. Like this:

You can set keyframes for the mask by pressing M in the comp layout, and clicking the stopwatch for mask shape. Put a keyframe at the beginning and one at the end of the small clip that needs to be in front. Adjust the bezier handles at each keyframe to follow the shape of the object. Do this for each object you need to, and hopefully if you did it right the final video will look realistic.

 

Elastic Reality:

The concept is similar, but this way Elastic Reality is used to draw the mask. I use ER because I like it better than After Effects shape tool, but with the new version After Effects 4.0 coming out, I might change my mind. Anyway, export only the part of the clip you need to make the mask for, and import it into Elastic Reality as the A-roll.. You don't need a B-roll or background. Then make some shapes and keyframe them as necessary, I assume you know how to do this. If not read the manual. In the Shape Options, set the edge density as high as it can go, 50. You don't need to Join any shapes.

In the Render Options, hit the Mattes tab, and set the Save Matte to Cookie-cut. (and the preview matte to Save).

 

When you preview it (control-P) and view the alpha (shift-A), it should look something like this

In Output Options, set the format to Targa, and save the matte externally. You will NOT need to save the Result, if you do you are only wasting hard drive space.

 

Then import the targa sequence into After Effects. Make a duplicate of the main footage, to serve as your "front" layer, and put it above the sabers. Put the targa sequence above the front layer, disable it by clicking the eye, and set the front layer mode to Luma Matte. It should look something like this: (the highlighted layer is the "front" layer)

You don't need to trim the edges of the front layer to match the smaller size of the matte layer above it, but you can if you want to make it look prettier. This is the end of the tutorial. I hope you learned something new.

If you have any questions, or if you want to share any ideas or methods, feel free to give me an email :)

Back to Joe Bloe's Star Wars Stuff.



Back to Index