This 2 part tutorial is a simulated Pac Man animation as he navigates a maze and gobbles dots along the way… with ghost chasers. The tutorial will include guidelines on building the components in Photoshop or Illustrator and then integrating them into AE to animate Pac Man. This is more of a design project that incorporates many of the foundational skills associated with AE; pre-comps, transformations, layer masks, etc.
Tutorial
In this project we will explore a variety of the many capabilities After Effects provides the user. I like this project for beginners because it starts with fundamental design and animating skills and then progresses the student in his/her understanding of the After Effects application and interface.
The simple Pac Man design breaks down into three elements;
1. Pac Man – a sphere, cut in half
2. The Maze – which can be as complex or as simple as you wish
3. The Munchies – virtually any object you want Pac Man to eat
(In part 2 we will add some more elements.)
Each of these elements are easily created in Photo Shop or Illustrator. My tutorial uses Photoshop as the design tool.
The Basic Pac Man Design –
Preparing Files in Photoshop
Pac Man
1. Launch Photo Shop and open a new document
a. Use a measurement that conforms to your needs. 300×300 will do nicely
b. Use a transparent background
2. Create a sphere, about 2/3 the size of your art board, draw it as close to the middle of the layer as possible.
Using the rectangle marquee tool, select the upper or lower half of the sphere and then “CUT” that half. (It is now in the clipboard)
“PASTE” the half that you previously cut from Layer One into a new layer. You will want to rename these layers so as to better identify them when you import this document into After Effects.
You’re done with this design element. Be sure to save your document as something other than untitled. We will import this file into After Effects as a Composition in a future step.
The Basic Maze – Munchies Included
1. Open a new document in Photo Shop
- Use an aspect ratio that conforms to your needs. I’ll be using a custom size to conform to the maze I created.
- Use a background color to your liking
2. Use your imagination to build your maze and your munchies. Make it as simple or as complex as you wish. Keep in mind that this is the platform on which you will animate your Pac Man. Use my maze and munchies if you want.
Use a second layer to place your munchies inside the maze. (Again, name each layer for identification purposes later.) If you include your munchies with the maze, you will be forced, in After Effects, to use a layer mask to make them disappear. It’s the most time efficient method.
Hint: Use the grid view and guides to create perfectly aligned munchies.
You’re done with this design element. Be sure to save your document as something other than untitled. We will import this file into After Effects as a Composition in a future step.
Pac Man Elements In After Effects
What is offered here are basic guidelines. You may choose to ignore or expand on these to suit your own creative style.
Maze and Munchies in a Comp
1. Launch After Effects and Create a New Composition:
Your Composition should be the SAME SIZE AS YOUR MAZE. Set your Comp duration for 20 seconds. Name it something you can remember.
2. Import the files that you previously created in Photo Shop. Import all files as Compositions. That way your files come neatly bundled in folders.
3. Drag your Maze folder into the Comp Window. You should have two layers showing in the timeline; maze and munchies.
We will come back and use this comp later, but for now let’s work on the other design elements.
THE SIMPLE TWO FRAME ANIMATION: Making Pac Man Work
1. In the Project Window, Double click on your Pac Man comp. Arrange your Pac Man comp layers so that the upper half of the sphere is directly on top of the bottom half. The comp window should look much like your original Photo Shop document. If it doesn’t, simple arrange the halves of the sphere so it does.
The process of making Pac Man’s jaws work is a simple two frame rotation. It doesn’t matter which layer you begin with, but it will go faster if you complete one layer first then move to the next layer. I’ll start with the top layer.
2. Set the top layer to animate the ROTATION property by tapping the R key on the keyboard and then click on the stop watch next to the Rotation animation property. The numeric value of the rotation at this point should be 0, and the time line should now have one key frame at the start point of the layer. Copy this Key Frame.
3. In the comp window, using the anchor-point (pan-behind) tool from the tool palette, reposition the anchor point to the bottom right edge of the hemisphere.
4. Using the page down key, advance the time line marker three frames.
5. Change the rotation value in the layer to
approximately +22 degrees.
6. Using the Page Down key, advance the time line marker and change the rotation value back to 0.
7. Select all three key frames > Hold the Alt Key (Command for Mac) and click on the stop watch to enable expressions for the layer. Then from the expressions language menu, choose Properties > LoopOut(type = “cycle”, numKeyframes = 0) from the expression language arrow.
8. Repeat the above described process for the second layer,using the corresponding anchor point position and the opposite rotation value in steps 2 through 7.
You will notice my key frames do not start at the beginning of the comp.
I’ve repositioned them to start PAC MAN animating after the intro, which
we will cover in part 2.
9. Precompose these layers by selecting both layers and choosing Precompose from the Layer Menu. (Layer>Precompose) Name your pre composition appropriately. You may to need to find it later. You now have one layer of Pac Man animating. Notice the name of this Comp because this is the Comp we will move into our working Composition later. It should look like the Illustration below.
Pac Man’S Journey
We’re now ready to navigate pac man around the maze.
1. Open your maze and munchies comp … at this point in the process it should only contain two layers; a maze layer and a munchies layer. Drag your Pac Man comp into the timeline or comp window. Now you have three layers in the comp.
2. Resize and position Pac Man accordingly. I’m starting my Pac Man in the middle of the maze underneath what will eventually be my “Start Game” slate.
3. Tap the P key for the Pac Man layer. This will reveal the Position properties for the layer. Then enable Position animation for this layer by clicking on the stopwatch.
You will see a diamond show up in the layer.
4. Move the timeline marker to the 1 second mark. And Move Pac Man in the comp window to a new position; to where Pac Man should make a turn. (Hold down the shift key to move Pac Man in a straight line.)
You will notice that After Effects automatically created a new Key Frame in the layer.
5. Move your timeline marker to the 02 second position in the timeline and move Pac Man in the Comp window to a new location. In my example, below, I moved him down.
Whoa! What’s with that curved line, and Pac Man is facing the wrong way! We will fix both of those issues in a few more steps, but right now just finish navigating Pac Man through the maze to a point at which you want him to stop.
WARNING: Avoid Pac Man crossing areas already munched. We will be using a layer mask to eliminate the munchies, and crossing layer masks will “reveal” instead of “hide.”
Fixing the Bezier and Rotation Values
1. In the timeline window –
Click on the Position property label . This will select all of the position Key Frames for the Pac Man layer.
2. In the comp window –
Move the selection tool over one of the Bezier anchor points that was created during the position key changes. Tap the G key until the pen tool turns into the Convert Vortex Tool. It looks like a slightly tilted upside down V. It can also be accessed in the pen tool throw out options. Make sure all of the position Key Frames for the layer are still selected, then click on one of the bezier anchor points to covert them to linear path anchor points.
Preview the animation. Do this by clicking the RAM Preview button in the preview tab, or by tapping 0 on the numeric keypad on your keyboard.
During your preview you probably noticed that Pac Man has a tendency to speed up and slow down between Key Frames. To fix this issue we will have to access a command menu item.
Rove Across Time
Keep all of your position key frames selected … then in the command bar at the top of the After Effects Window, choose Animation > Key Frame Interpolation. Select Rove Across Time in the dialog box, and click OK.
Okay now we’re going to fix that orientation problem Pac Man has.
Fixing the Orientation (Rotation) Values
This process can be a bit arduous and requires a good measure of focus and concentration, so if you feel the need for a break … this will be a good place to take one. What we will be doing here is changing Pac Man’s orientation in the comp window. We will do this using ROTATION values. Also, we need to be zoomed into our timeline because our rotation Key Frames will only be 2 frames apart, so zoom into the timeline using the zoom slider at the bottom of the timeline window.
1. Make sure the Pac Man layer is selected, and tap the R key on your keyboard. This will reveal the rotation properties for the layer.
Then, move the timeline marker to, or as near as possible, to the first Position Key frame. (You can see Position Key Frames by holding the Shift key and tapping P on the keyboard. You can also use your key frame navigator to assist you in getting to each new position in the process. Each animated property has a Go to previous key frame arrow and Go to next key frame arrow on the far left-hand side of the timeline.)
2. Click on the Rotation value stopwatch. This will create a rotation Key Frame. Study the illustration below.
3. Move the timeline marker one frame and (You can do this by tapping the Page Down Key one time.) change the rotation value for the layer accordingly. This will create a Key Frame. Immediately copy it. Study the illustration below.
A key frame must be highlighted in order to copy it. (Control C or Command C on a Mac, or from the Command menu … Edit > Copy)
4. Move your timeline marker to, or near, the next Position Key Frame.
Paste the Rotation Key Frame you previously copied. (Control V or Command C on a Mac, or from the command menu … Edit > Paste) This maintains Pac Man’s new orientation between position key frames.
5. Move the timeline marker one frame. Change the rotation value for the layer accordingly; in my example from-90 to -180 respectively. This will create a Key Frame. Immediately copy the new Key Frame.
6. Repeat steps 4 through 5 for the rest of Pac Man’s navigation.
Start Eating
Now we’re ready to gobble some munchies. Again, this process is arduous and requires a good measure of focus and attention. Take a break here if you feel the need.
What we are going to do next is create an animated layer mask on the munchies layer of our Composition. Our mask will follow the route that we have previously mapped-out for Pac Man. Again we will be using those original Position Key Frames to assist us.
1. Select the munchies layer in the timeline window.
2. Select the Pen Tool from the tool bar. (Shortcut Key is G)
IN THE COMP WINDOW
3. Draw a box around Pac Man at his current position in the timeline.
Tap the M key on the keyboard. (This will reveal the Mask properties for the layer.)
IN THE TIMELINE
4. Click on the Mask Properties stopwatch and then click on the box next to the Inverted option.
5. Advance the timeline marker to the next Pac Man Position Key Frame.
IN THE COMP WINDOW
6. Tap the V key (selection tool) Select the leading two Mask anchor points and drag them along the path to the point where Pac Man is now located. Select the Add Vortex tool and add anchor points to the layer mask to facilitate the next change in the layer mask shape. Zoom in on the Comp Window to assist you in adding anchor points.
7. IN THE TIMELINE WINDOW
Advance Pac Man to the next Position Key Frame.
8. Repeat steps 5 through 7 for the duration of Pac Man’s journey.
FINISHING UP
Included in the project files should be an AIF file called munchie clip.aif.
1. Import the munchie clip.aif file into After effects.
2. Drag the file into the Timeline or comp window.
3. The clip only lasts 8 seconds, so if your timeline is longer than 8 seconds you will need to loop the clip.
In the Project Window
Right click on the file
Select Interpret Footage > Main (a dialog box will open)
At the bottom of the dialog box type in a value that will allow you to extend the clip the length of your timeline. In my example I need 20 seconds, so I’m going loop my audio clip 3 times, which will give me 24 seconds of audio.
4.In the Timeline Window extend the clip in the timeline by dragging it to the end of the timeline.
5. Preview the Comp by pressing the 0 key on the numeric keyboard.
CONGRATULATIONS – You’ve completed Part 1
As you discovered, this isn’t an easy project. It takes time, attention and a creative mind to complete this project in a professional manner.
Look for the second part of this tutorial, where we add some enhancements, including a Game Start Slate, Ghosts and more audio.
Hope you enjoyed working through this project.