Animated
Masks in After Effects |
||||||||||||||||||||
This tutorial demonstrates a really impressive and often under used feature of Adobe After Effects. Animated masks. These masks allow you to cut out objects from a non-greenscreen environment and place other objects behind them, allowing you to change something that looks like this: |
||||||||||||||||||||
![]() |
||||||||||||||||||||
![]() |
||||||||||||||||||||
...into something that looks like this. All that existed in the 'before' picture was an old kitchen door with a few bricks underneath. Afterwards they are running into a shuttle bound for deep space. Let's see how to create this type of effect. |
||||||||||||||||||||
Step
1 |
N.B. Although it is possible to do this kind of shot with a moving camera, it is MUCH easier to film with the camera static. Any camera movement needs to be replicated in the matte painting and so is much harder. Lock down the camera to preserve your sanity. |
|||||||||||||||||||
![]() |
||||||||||||||||||||
After filming the footage outside I took a screengrab from the sequence and pulled that into photoshop. Then I rendered out a 3D model and pulled that into photoshop, placed it on top of the screengrab, and worked on the shot until I had a useable matte painting, that looked as though it was actually in the location. It is worth taking your time to get something at least half way believable. If the matte painting looks utterly fake, all of the hard work you'll do later will also look utterly fake, no matter how well you create your animated masks. |
||||||||||||||||||||
![]() |
||||||||||||||||||||
Begin
by pulling all of the relevant footage into your timeline. In this case
there is the original footage shot 'Droids!.mov' and 'Explosion.mov' file,
plus the matte painting of the shuttle itself. As the picture was create
in Adobe Photoshop, I could save it as an RGB .psd file, which created
it's own alpha channel, ideal for then pulling into After Effects. |
||||||||||||||||||||
![]() |
||||||||||||||||||||
Step
2 |
After pulling all of the footage in I made sure the 'Droids! file' was at the bottom of my timeline, and the Shuttle matte on top of it (we'll deal with the explosion later) I ended up with something that looked like the shot below. |
|||||||||||||||||||
![]() |
||||||||||||||||||||
The
entire point of this tutorial is to show how to make it look as though
the ship is BEHIND the actors, and not in front. What I am going to do
is create individual layers with all of the moving actors on (one for
each person) and cut around them so I can place them INFRONT of the ship,
and make it look as though the ship was on the set the entire time. It
is time consuming, but a lot easier than building a ship for real. |
||||||||||||||||||||
Step
3 |
||||||||||||||||||||
![]() |
||||||||||||||||||||
Step
4 |
Using the Pen tool in the tools palette, I began describing a line around the first person I wanted to cut out. To do this I simply clicked and moved all the way around the actor. Every mouse click created a point along the outline. Here I have clicked around the person in all the areas that would be affected by the ship matte. As his feet did not interact with the ship in any way I didn't worry about this part. The more accurately you do this, the more convincing the cut out will be. Sadly, the longer it will take too! |
|||||||||||||||||||
![]() |
||||||||||||||||||||
Step
5 |
In order to increase the accuracy of the cut-out you can enlarge the footage and really go in close. Go to VIEW > ZOOM IN to do this. Now you can edit and drag the lines around to make the cut-out perfect. If you now click on the arrow tool (top left) in the tools palette, then click on any of the points in your cut out, bezier handles will appear. By pulling these handles you can create curves that will follow your arcs more effectively. Go around the entire object like this until you are happy with the results. Do a test to see how accurate youactually need to be, remember the more accurate you are, the better the result, but the longer time it will take. To add more points to your cut-out click and hold on the pen tool, and a toggled set of tools appear. The pen with a plus to the right of it will add a point, and the pen with the minus will delete a point. |
|||||||||||||||||||
![]() |
||||||||||||||||||||
![]() |
||||||||||||||||||||
Step
6 |
Once you are happy with your first cutout you need to create a keyframe for it. Click on the arrow to the left of your footage in the timeline and click on the arrow to the left of MASKS. (If you can't work out this section, click on the movie icon to the left to see a 28k movie of the proceedure) Here you will find further subsets of MASKS. Click on the stopwatch icon to the left of MASK SHAPE (cirled) to mark this point. As there was a slight motion blur on the footage I also put a 1.5 pixel feather on the mask to help take the sharp , unnatural edge off the footage. Experiment with this to see what looks best in your footage. |
|||||||||||||||||||
![]() |
||||||||||||||||||||
Step
7 |
Now the pain begins. I have just completed cutting out ONE frame of footage from ONE character. I have seventy five frames of footage to work on (it was a three second clip) and FOUR characters to cut out. Once you have completed this project, you will be able to laugh in the face of people that say rotoscoping lightsabre footage is hard! The timeline above shows one character cut out entirely. Notice all of the diamond shapes along the timeline. These represent individual keyframes along the way. If your actor happens to stand still in front of your background object for a while, you can obviously use the same keyframe for all, and just create another keyframe when they move again. This is the real strength of animated masks. |
|||||||||||||||||||
![]() |
||||||||||||||||||||
Step
8 |
Remember that once you have completed one mask frame and moved the timeline onto the next point you have to again double click on the footage, and open it up in a seperate window, but this time you will already have a mask created, now you just need to alter the mask. To do this click and drag the points to the new positions. Do this with all the points, and then create another keyframe (as mentioned before) HINT: create one keyframe about every ten frames to begin with, you will find that after effects animated mask will 'inbetween' the frames in the middle, which helps make the process of moving points a little easier, as they may almost be in the right place already. |
|||||||||||||||||||
![]() |
||||||||||||||||||||
Step
9 |
The
process is identical now for all four characters. Remember (to make life
slightly easier!) to create a new layer of footage for each character.
It's to confusing to have multiple masks on one layer, although it is
possible to do. After finishing I rendered out the footage as a filmstrip file, added a laser blast in photoshop, and then finally had the completed shot. Click on the image below to view that finished shot. You will need Quicktime 5.02 or above to view. Download the latest version of Quicktime from here |
|||||||||||||||||||
![]() |
||||||||||||||||||||