LIBRARY: Tutorials Reviews Interviews Editorials Features Business Authors RSS Feed

Part Three: Creating Cogs and Gears in AE

Part Three: Creating Cogs and Gears in AE 5.5
CreativeCOW Adobe After Effects Tutorial


Creating cogs in After Effects (bought to you by the letter “V”)
Chris Zwar Chris Zwar
Entertainment Media
South Melbourne, AUSTRALIA

©2003 Chris Zwar and CreativeCOW.net. All rights reserved.


Article Focus:
This tutorial from Chris Zwar is a bit of a one trick pony, but it’s a trick that’s worth knowing. Cogs and gears are nice looking design elements and are popular in all sorts of backgrounds. If you do a search on the internet, it’s easy to find a range of techniques for creating cogs in Photoshop and Illustrator, and Illustrator even comes with a few included. This is part 3 of a 4 part series.


Download Movie Project files .sit Project files: .zip


---Part Three: The Worm Gear---

So far we’ve seen how we can use the Path Text effect to construct cogs, and that if we keep the font size and tracking the same, we can create different sized cogs which will happily mesh together and animate seamlessly.

In Part 2, we saw how the Path Text effect can not only create teeth for our cogs, but decorative bodies as well.

In this tutorial, we’ll see how we can also use the Path Text effect to create a worm gear.

As I mentioned earlier, this series of tutorials is basically a one trick pony. In our case, using the Path Text to make teeth for our cogs is the trick, and now we’re just doing variations on a theme. Subsequently, this tutorial will not go into as much detail, because otherwise we’d just be repeating what we did in parts 1 and 2. The idea is to see how we can adapt our trick to new situations.

A worm gear is a long rod with a thick thread running around the outside. To create our worm gear we need a rotating rod in two sizes – one cylinder for the main body of the rod, and another larger one for the thread.

I’ve already created two looping cylinder movies, because AE doesn’t have a cylinder effect as standard. The movies are 25 frames long each.




The Thin version of the cylinder is our central rod, and basically there’s nothing we need to do to it. The trick is to create the thread which runs around the outside. Because the thread is wider than the central rod, we’ll use the thicker cylinder as the source.

Open the project file we created in Part 1, and worked on in Part 2. Import the two Cylinder movies. In some cases, you may need to re-link media in the project files that you've downloaded.

Drag the Thick Cylinder movie onto the composition icon at the bottom of the project window. This will create a new composition with just the Thick cylinder movie in it. The duration of the new composition will be the same as the movie – 1 second.

Open up our original Cog composition – the 24 teeth one – and copy the Path Text effect. Then close the composition to keep our display tidy.

Add a new solid and make it the size of the comp, and paste the Path Text effect. You should see something like this:


Because our project is long and skinny the screenshots only show the top of the frame.

We need to alter the Path Text settings to make our teeth run vertically.

Change the shape type to line.

Change the first vertex position to 92, 0 and the second to 92, 768.



This makes our letters run in a straight line, like this:



Now we need to duplicate our effect for the other side, so select the Path Text effect in the effects window, and duplicate it by pressing Apple-D.



Because we want to see the first set of teeth we need to composite the second Path Text effect onto the original:



Each letter “V” on the right represents a full revolution of the same thread, so the V’s on the left side need to be halfway between the V’s on the right side. Use the “left margin” setting to move the new set of V’s until they sit halfway. In this case, our thread will move upwards so use a negative value. In our case, -12 works.



Our two sets of teeth are identically spaced, and evenly positioned.



To flip our second set of teeth over, reset the Orientation to 0 degrees. All the V’s now face the other way.



We need to re-position the new teeth as well. Because our composition is 100 pixels wide, and our right side had an X-value of 92, our left side will have a value of 100-92, or 8.

So change the vertex positions to 8,0 and 8,768.



Which will give you this:



Now that our teeth are in the correct position, we need to remove the excess parts of the letter.

Add a mask, and re-size it until you can’t see the split in the letter V.




With this font, Arial Black, the settings are:



Then apply the Fill effect, selecting the mask from the pop-up menu. If you don’t select the mask, then the fill command will turn the text red.



Set the colour of the fill to black. To ensure that your worm gear doesn’t have any tiny holes in it, turn off the visibility of the cylinder layer. If your mask is too narrow, you will see tiny black dots in the middle of the teeth, where the split in the letter V is visible. Increasing the width of the mask will solve this. Your window should look like this:




The next stage is to create the diagonal threads linking the left and the right sides. Once again we’ll use the Path Text tool, although this time it will be the letter I and not the letter V.

Apply the Path Text effect and type in lots of letter I’s – I lost count of exactly how many. If you haven’t added more letter Vs to the other Path Texts yet, do so now so the whole window is full of teeth from top to bottom. It won’t matter if you type in too many.

Set the Path Text effect to line, and set the position to 50,0 and 50,768. Make your I’s white.



Using trial and error, we will adjust the font size, tracking, horizontal scale, baseline shift, orientation and left margin settings until all our letter I’s perfectly link our teeth.

Begin by getting one of the top teeth looking this this:



And tweak away.

In this case, the magic settings are:

  • Font size of 47
  • Tracking is 5.26
  • Orientation is –10 degrees
  • Vertical scale is 205 percent
  • Left Margin is –16.10
  • Baseline shift is -17




Which gives us:



Now that we have our thread, the next step is to animate the position to give the illusion that the thread is rotating.

In this case, we will be animating the Left Margin of the three Path Text settings, so that the thread rises.

Because our cylinders loop over a 1 second period, we will make our thread loop over a 1 second period as well.

Each time the worm gear does a full revolution, the threads end up in the same position, although it appears that they have moved one tooth higher. To create this illusion, we need to set keyframes for our threads so that their position at 1:00 is the same as at 0.

Begin by opening up the effects controls in the window and setting keyframes for the Left Margins, at 0.



Make sure the layer is set to “Best Quality”, and take a snapshot of the composition window by clicking the camera icon at the bottom.

Press the “end” button to go to the last frame of the animation. We need to find the values for Left Margin which have moved the text up so it’s in exactly the same position, but one tooth higher.

Because we recorded the composition window at frame 0 by pressing the camera button, we can view that frame at any time by pressing the picture icon next to the camera. This will allow us to flick between the first and last frames of the animation, and ensure they are identical.



In this case, the settings are –23.5 for the first Path Text,–35.5 for the second, and –39.5 for the third Path Text effect.



At this stage, frame 24 is identical to frame 0, but to make this loop over 1 second, we need to make frame 25 identical to frame 0, not frame 24. So press “page down” to move one frame later, and drag the keyframes along. You won’t see anything in the window, because our composition is only 25 frames long and we’re currently looking at the 26th frame.



We need to work at frame 24 so we can see what we’re doing in the composition window… but when we’re finished, move the keyframes one frame along:



What we have now is a loopable composition in which our thread gives the illusion of rotating. Do a RAM preview to see for yourself.

The hard work is done; we just have to finish it off.

Apply the Text layer as a Luma matte for the Thick Cylinder layer. Because we’ve used a black mask to cover up parts of the letter V, we need to use a luma matte in order for the black to be rendered as transparent. If we used an Alpha matte then the black areas would still show up.



Our Worm gear now looks like this:



The next step is to Pre-Render this animation, before we combine it with our central rod. By rendering, the Path Text track-matte will be saved as the alpha channel of the file and make it easier to apply effects. You could pre-compose it if you prefer, but it’s faster working with a rendered file and it’s a good excuse for a coffee.

I called the animation “WormGear-teeth only”.



This should render out the one-second animation and re-import it into the project. Use the Animation Codec at 100%, rendering RGB + Alpha. When the file is rendered After Effects will automatically import it into the Project window.

Create a new composition by dragging the WormGear-teeth only file onto the composition icon at the bottom of the Project window. Then drag the Thin cylinder movie into the same composition, underneath the teeth.



Our worm gear now looks much more like a worm gear:



Although this looks OK, there’s a little tweak needed. In order to reduce the file size for the internet, the cylinder movies were not rendered with an alpha channel. The black areas on either side of the thin cylinder are solid. The simple solution to this is to add a mask.

So select the “Thin Cylinder”, add a mask by pressing apple-shift-N, and then resize it so it is the same shape as the cylinder.


Although you won’t see anything different in the window, we’ve just made the black bits transparent. Otherwise we’d have got a bit of a shock later on.

To make the worm gear look a bit more solid we need to make the teeth stand out from the central rod. The easiest way to do this is to bevel the edges, and use a drop shadow. So apply the “Bevel Alpha” effect, and the “Drop Shadow” effect.

The settings are really up to you – I reduced the size of the highlight of the bevel, and had the drop shadow quite soft.



The results are quite dramatic:



I also used the levels effect on the Thin Cylinder to make the midtones a little darker, by setting the gamma to .8



If you do a RAM preview then you might notice something a little bit odd, and you’re right.

When I made the two cylinder files, I wanted the larger cylinder to look a bit different from the smaller cylinder, to help give the illusion that the teeth are cut wider than the central rod. So when I rendered out one of the cylinders, I flipped it first, so the wood texture would be reversed.

Although it’s subtle, it makes our teeth look like they’re from a different part of the wood than the rod, but it also means they turn in the opposite direction. This is now a problem, because there are no worm gears in existence that have the thread spinning in the opposite direction to the rod in the middle.

The solution is quick and easy – just play the cylinder movie backwards.

Click on the triangles at the bottom of the timeline window, to display the time stretch properties.





To play a layer backwards, we need to enter in –100% as the stretch.

The teeth are turning in the correct direction; it’s the Thin cylinder which needs to be reversed. Click in “100%” and type in “-100%”



The layer is now backwards, but it also means that the out point has changed. Drag the layer into the correct position. The red stripes are to indicate the layer is reversed.



To this:



We’ve now finished the worm gear animation, all we have to do is render it.

Choose Pre-render as we did before, and call the movie “WormGear – 1 second loop”. Because it’s a small movie, use the Animation Codec at 100% and render with an alpha channel.

After Effects will automatically re-import the rendered file. All we have to do now is loop it. You can see here how AE has imported the file, and the information at the top tells us the file has a duration of 1 second.



Go to the “interpret settings” window, and under the “Other Options” type in 60 for the loop value. This will loop the 1-second animation 60 times, making it 1 minute long.



After Effects now reports the duration of the file as 1 minute.




So that’s our worm gear.

---To keep you interested, here are a few other things to try---




By rotating the “V’s” a different value from 180 degrees, we can create a “ratchet” style cog.



These V’s are exactly the same as in our first Cog – the 24 tooth one – but they’re been rotated only 150 degrees.







And by using brackets (these things) instead of the letter I, we can get a different look for our 36 tooth cog:





But the most important thing to remember about all of these variations is that they will still mesh together perfectly and create seamless animations.

So now that we have a few different cogs and a nice looking worm gear, let’s get on to the stage of actually making them all work together.

Before I went of to Stage 4, I had a bit of fun creating different types of cogs.



I rendered them out as still files, and we’ll be using them in the next stage.


---Finished here? Go on to the next part or go back---


In part one, we look at the basic concept behind making cogs in After Effects, using the Path Text effect. This will demonstrate our “trick” in detail.

In part two, we look at how we can extend this basic technique to produce more interesting looking cogs, using textures easily found on the internet.

And part four demonstrates how we can use simple expressions to create amazing animations using the parts we created in parts 1, 2 & 3.

--- Chris Zwar

Please discuss this technique in the After Effects forum at Creativecow.net



Please visit our forums and view other articles at CreativeCOW.net if you found this page from a direct link.




Related Articles / Tutorials:
Adobe After Effects basics
Part One: Creating Cogs and Gears in AE

Part One: Creating Cogs and Gears in AE

This tutorial from Chris Zwar is a bit of a one trick pony, but its a trick thats worth knowing. Cogs and gears are nice looking design elements and are popular in all sorts of backgrounds. If you do a search on the internet, its easy to find a range of techniques for creating cogs in Photoshop and Illustrator, and Illustrator even comes with a few included.

Tutorial
Chris Zwar
Adobe After Effects basics
Part Two: Creating Cogs and Gears in AE

Part Two: Creating Cogs and Gears in AE

This tutorial from Chris Zwar is a bit of a one trick pony, but its a trick thats worth knowing. Cogs and gears are nice looking design elements and are popular in all sorts of backgrounds. If you do a search on the internet, its easy to find a range of techniques for creating cogs in Photoshop and Illustrator, and Illustrator even comes with a few included.

Tutorial
Chris Zwar
Adobe After Effects basics
Part Four: Creating Cogs and Gears in AE

Part Four: Creating Cogs and Gears in AE

This tutorial from Chris Zwar is a bit of a one trick pony, but its a trick thats worth knowing. Cogs and gears are nice looking design elements and are popular in all sorts of backgrounds. If you do a search on the internet, its easy to find a range of techniques for creating cogs in Photoshop and Illustrator, and Illustrator even comes with a few included.

Tutorial
Chris Zwar
Adobe After Effects basics
Extras: Creating Cogs and Gears in AE

Extras: Creating Cogs and Gears in AE

This tutorial from Chris Zwar is a bit of a one trick pony, but its a trick thats worth knowing. Cogs and gears are nice looking design elements and are popular in all sorts of backgrounds. If you do a search on the internet, its easy to find a range of techniques for creating cogs in Photoshop and Illustrator, and Illustrator even comes with a few included.

Tutorial
Chris Zwar
Adobe After Effects basics
AE Basics Extras: Butterfly Wing Text Animation

AE Basics Extras: Butterfly Wing Text Animation
  Play Video
In the first part of this two part AE Basics Extra tutorial, Andrew Devis starts to show how to create a butterfly wing with text. The purpose of these tutorials is to give additional hints and tips for text animation in After Effects. Items covered in this tutorial include, using the pen tool, paths, copying mask paths to shape layers, text along a path and path option, 3D layers, animation of a wing, loopOut expression and viewing your composition in a different viewer. In the second part of this tutorial Andrew will go on to complete the animated butterfly in 3D and show how to have it fly around your screen.

Tutorial, Video Tutorial
Andrew Devis
Adobe After Effects basics
AE Basics Extras: Butterfly Wing Text Animation Part TWO

AE Basics Extras: Butterfly Wing Text Animation Part TWO
  Play Video
In the second part of this two part AE Basics Extra tutorial, Andrew Devis continues to build the butterfly in After Effects and then shows how to keep it 3D as it is formed. Items covered in this tutorial include custom views, 3D and collapse transforms to keep items working in 3D once pre-composed, duplication and flipping layers, vertical type, text formatting, and complex animations with motion sketch. These tutorials will be valuable for anyone learning and developing text animation skills in After Effects.

Tutorial, Video Tutorial
Andrew Devis
Adobe After Effects basics
AE Basics Extras: Caterpillar Text Animation

AE Basics Extras: Caterpillar Text Animation
  Play Video
In this AE Basics Extra tutorial, Andrew Devis shows some more text animation techniques by animating 'Caterpillar' text in After Effects. Andrew shows how to shape your text so that it curves from large to small to create a 'tail' for the text and then he shows how to set up and animate the path that the text will use. Andrew then goes on to lock the text to the animated path and continues by adding additional animators to give body movement to the animated text. This is a helpful tutorial for anyone wanting to learn to use a wider range of options for text animation in After Effects. Andrew will be following up with a similar but different tutorial looking at creating a flying butterfly text!

Tutorial, Video Tutorial
Andrew Devis
Adobe After Effects basics
AE Basics 65: Expression Controllers PART TWO

AE Basics 65: Expression Controllers PART TWO
  Play Video
AE Basics - A Creative COW series for new users of Adobe After Effects. Lesson 65: In this second follow-on tutorial, Andrew Devis continues to demonstrate how to apply a color Expression Controller to one part of the production and then how to quickly apply it to other parts of the same composition. He then goes on to show how to separate out parameters to two different control points of one Expression Controller finishing by controlling parts from different areas of the shape layer as you would in a composition which has multiple layers.

Tutorial, Video Tutorial
Andrew Devis
Adobe After Effects basics
AE Basics Extras: More Repetition PART ONE

AE Basics Extras: More Repetition PART ONE
  Play Video
AE Basics - A Creative COW series for new users of Adobe After Effects. Having recently completed a training course, Andrew Devis was asked about some more advanced uses for the repeater tool when working with shape layers in After Effects. Andrew has produced 2 'Extra' tutorials to go with his earlier tutorial on the repeater. In this first 'Extra' tutorial, he shows how to create a simple man with shapes, repeat him across screen and then down screen with a couple of repeating options to create different looks and then how to scale the whole animation on the screen to give space for additional motion graphics work. In the next tutorial, he will show how to create shapes from text, how to rotate that shape into a circle and then how to move the circle into a line and how to create other very interesting looks with the use of the repeater tool.

Tutorial, Video Tutorial
Andrew Devis
Adobe After Effects basics
AE Basics Extras: More Repetition PART TWO

AE Basics Extras: More Repetition PART TWO
  Play Video
AE Basics - A Creative COW series for new users of Adobe After Effects. In this second 'Extra' tutorial in the AE Basics series, Andrew Devis shows how to create shapes from text, how to rotate that shape into a circle, how to move the circle into a line and finally how to create other very interesting looks with the use of the repeater tool - including how to create spirals, make the shapes seem to come out at you from the screen and how to move and control these exciting options, all within the one layer.

Tutorial, Video Tutorial
Andrew Devis
MORE
© 2016 CreativeCOW.net All Rights Reserved
[TOP]