Chomp Out Your Own Pac Man Animation – Part 1

Chomp Out Your Own Pac Man Animation – Part 1

Tutorial Details
  • Requirements: Just After Effects and Photoshop... enjoy!
  • Difficulty: Beginner
Download Source Files

Final Product What You'll Be Creating

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. :-)

Add Comment

Discussion 30 Comments

  1. Samir GFX says:

    sorry but i don’t like this technique

  2. Evangelos M. says:

    This is a joke!!!
    Absolutely pathetic…

  3. Anthony Breslin says:

    Make a video tut instead Please!!

    Nice idea though!

  4. Chris says:

    a joke, right?
    from beginner fo beginners?

  5. John says:

    movement is too choppy…this Pac Man stops briefly after each “chomp”, should be a smooth linear motion, not start and stop. (plus…the mouth should be chomping at a faster rate)

    the Devil’s in the details.

  6. Pacphan says:

    I’m sorry, but Pac Man doesn’t hinge his whole head like that to munch. His “mouth” is hinged right at the centre of the circle.

    http://www.cgtutorials.com/oneadmin/_files/linksdir/1328_Pac_Man_with_frame_by_frame_and_motion_tween_animation.gif

  7. Tony says:

    sorry, but the final animation is too unattractive. But thx for sharing and idea.

  8. Wouter says:

    Yout should place the anchor point more to the middle.

    I don’t like this way of animating…. With the masks ect.

  9. IANH - BR says:

    Nice Begginer tut

  10. bakar says:

    nice for beginners thanks for sharing

  11. pedro soto says:

    THANKS FOR SHARE YOUR TUT..NOW WAITING FOR THE NEXT NEW TUTORIAL( AND YES..IM NOT TALKING ABOUT THE SECOND PART OF THIS)….TO MAKE ME STOP THIINKING : “HERE IN AETUTS ARE BETTER THAM THIS”…BUT GOOD FOR BEGINNER….GOOD FOR BEGINNERS..DONT GET ME WRONG

  12. kami says:

    That’s very interesting. Tanx 4 tuts :-)

  13. chetan says:

    i think these guys should do a bit of research on which kind of ppl are logging on to this site, only begginers or intermediates or advanced.. they get ton of comments on what to do what not to do, but yet they end up doing these. when u have learnt these things like masking and key framing from other tuts only why should they repeat the technique?? once u teach something u should not do the same thing in a differnt tut. h ow many of these simple things can u keep on making though?? im sure anyone who comes to this site would have learnt this technique by ur previous tut is what i mean.. anyways. im stopping come looking in this site anymore.. thanks for that,.,

  14. chris says:

    lame tutorial. the idea is a good one to display beginner techniques (precomps, etc)…. but the execution is pathetic.

  15. Rick says:

    just to reiterate the above comments, pacman does not animate like the tutorial shows. google it. pacman need only be a single solid with an extra mask for the eye and animated mask path for the mouth.

  16. Rutger says:

    I don’t like the result, but for beginners this could be a good tutorial. I respect the effort you put in the tutorial!

    You could make it a little more interesting by making the layers 3D and adding a camera with depth of field, making it a little more exiting. Maybe some zooms with heavy motion blur. Make PacMan an action hero ;)

    Keep making tuts, but don’t add the lines “difficuilt and you need to be creative”, because that just isn’t true. Just say you made it for beginners.

  17. Russ says:

    Taking a look at the comments related to this tutorial thus far, it occurs to me that many of the visitors, or at least those who commented on this tutorial are intermediate or advanced users. For those of you who provided constructive feedback, thank you. For the rest of you, please read on. Those of us who endeavor to write tutorials have to operate at a baseline … a baseline that predicts that those who are looking at tutorials are still exploring the various capabilities of After Effects, i.e. beginners, and in need of direction of finding some of the rudimentary capabilities of After Effects; i.e. key frame interpolation, expressions, animated masks, etc. No one forced you to read or follow the tutorial. With that said, I do understand the critical nature of some of the comments. My only response is this: Submit your own tutorial. You may very well get an appreciation of the difficulty and inordinate amount of time it takes to produce one. If I may be blunt: Put up or shut up.
    Pacphan, you are correct, and thank you for bringing to our attention that the real Pacman had a different chomp than the one I offered. The tutorial simply illustrates that the anchor point has to be moved to a position that accommodates the animation.
    Just one more comment for “Chetan,” before you get bent out of shape regarding the validity of a tutorial on this site, you should learn proper spelling, grammar, and syntax before posting comments. You can’t expect anyone to take you seriously until you do. Sorry.

    • chetan says:

      hmmm, good one russ.. nice to see i have been pricking you so well.. notice that i have come back to this site to check whats happening with the next tuts but not to check whats up with this particular comment of mine.. i do like this site a lot, but the thing what i said(which u barely understood even though u r supposed to be some english professor) was that u r supposed to ask ur BEGINNER fellow mates to check the site’s archives to learn some basic stuff.. not to mention but u have very poor understanding of my comment that u should look at nick campbell’s way of doing things. he has extremely advanced tutorials posted as recent ones, but he keeps informing that you are supposed to check his archives to learn in detail of a particular thing. this comment of mine also might lack proper spelling, grammar and syntax, but i can make out that u had all the time an patience to read it,, im a designer, i leave the correction job to my juniors. u interested?? an coming to the fact of making tuts?? i would love to do some, but for now i would prefer to learn more. i have my own plans, not such commenting on comments :P
      an to make something clear : i still love TUTS+, was just upset with the way its quality going down.. mine was just a suggestion, not an advice.

  18. PeterC says:

    Wow the end result is terrible! not smooth at all. Why would anyone want to learn something that looks like it has fallen out of the ugly tree and hit every branch on the way down?

  19. Dan says:

    waste of my time…

  20. laidlow says:

    yeah, i think the original 8-bit anim from the early 80′s is better the result of this tut! good going dude, but thanks anyways…

  21. Stephen Curry says:

    Man you people are harsh….its easy to monday quarterback….like Russ said….create you own damn tutorial if you such a pro at AE….I for one appreaciate every tutorial on AETuts. I dont always use them but I know someone will find it just what they were looking for to get over a hump etc….

    So play nice or shut-up

  22. skulpture says:

    Why so many haters? I learnt this from an Adobe trainer and it taught me a lot.

    Yes, it a bit jumpy etc but so what. I totally agree; make your own tuts and if you are not happy with tuts, then comment critically and nicely. If this kind of negative attitude continues then the site will be removed no doubt. Jeeze…. people need to grow up.

  23. Abby says:

    For what it’s worth: Thank you so much for this tutorial.

    I am a novice in the truest sense of the word and this tutorial was just what I needed to get started. As someone who has never touched After Effects (or even done basic video editing), I found the step-by-step extremely helpful. This was far more productive than being handed a massive manual on After Effects and told to figure it out.

    While I can understand that users with some experience may find quite a few flaws with this, I wholly appreciate the leave-nothing-to-the-imagination approach very useful; this helped turn After Effects from hopelessly overwhelming behemoth to a powerful tool. Many tutorials overlook the very basics, and many authors/teachers forget that not everything is as obvious to viewers as it is to them.

    Certainly, with more experience and tinkering around, I’ll figure out my own style and idiosyncrasies, but I needed to learn to walk before I could run, and this tutorial definitely helped me get my feet planted.

  24. Honestly,I was not impressed with the tutorial and the result..!!I could tell that its not attractive and not nice..!!I am looking forward for the next tutorial,hope I could see an improvement..!!But anyway,thanks for sharing it with us..!!

  25. This is really idea for all the beginners of course,you really did a good job..!!Your work is not a waste of time,it would surely help a lot..!!Good job.!

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.