Part I




When I was a kid, I used to take things apart to see how they worked. Of course, the fact that those things that I disassembled never worked AGAIN was irrelevent to me at the time.  I remember being fascinated at the tiny little gears that I found in the first watch that I opened. Gears make things move, and are an indispensible part of any mechanical device, real or imagined.

To create gears of the type shown here, start by opening a new file with 16 million colors and a white background (File > New.) Give yourself plenty of room to work. I started with a file that was 300 x 300 pixels. (what you see here has been cropped down to speed loading.)

Before you begin working, take a look at your Style palette. There is a little check box below it, marked "Lock." To make your life easier while doing this tutorial, make sure this box is checked. This will keep your palette colors and styles from changing when you switch tools.

For this tutorial, we're going to create a six spoke gear. A similar procedure can be used to construct the other gears shown in the title header. First set  your Foreground color to Black and your Background style to Null. Choose your Preset Shapes tool and select the Hexagon shape. Set the Line Style to a standard straight line (#1 Solid), the line width to 1, and make sure that Antialias is checked and that Retain Style and Create as Vector are UNchecked.  To create a regular hexagon, you need to hold down the Shift key while drawing. Place your cursor in the exact center of your window (you can see where you are by looking at the cursor position shown at the lower left hand corner of your PSP screen), and click the right mouse button to draw outward from the center. It might take a a little manual dexterity to get the hexagon positioned as shown below. Holding down the ALT key can sometimes help to limit the rotation.
 
 

Now create a new layer above the background layer (Layers > New.) In the Layer Properties dialogue, set the Opacity to about 50%. Next change your Foreground color to White and use the Flood Fill tool to fill the layer with that color. You should still be able to see a muted version of your hexagon through the second layer.
 
 

Set your Foreground color back to Black and your Background to Null. Then select your Line tool and set the line Type to Single Line, the Width to about 15, the Line Style to #1 Solid, and make sure that the antialias box is checked and that the Create as Vector and Close Path boxes are Unchecked. Draw a line from each point of the hexagon to the one directly oppposite it. It may help to use the precise Cursor at this point (there's a checkbox on the third tab of the Tool Options palette.)

One quick comment: Remember, if your gears are appreciably larger or appreciably smaller than mine, you'll need to adjust your line widths to compensate. Otherwise you'll get really spindly or really chunky gears (which may not be a bad thing.)
 
 

Now go to your Preset Shapes tool again. Choose the "Ellipse" shape and change the Line Width to 15. Place your cursor in the center of your window again, hold down your Shift key and Right click to draw a circle that comes just to the the ends of the lines you drew.
 
 

Next go to Layers > Properties. Slide  your Opacity setting back up to 100.
 

Here's where we make the nice smooth edges for the cutouts. Begin by adding a Gaussian Blur to your image (Effects > Blur > gaussian Blur.) Set the Radius to 6.00.
 
 

Now we get those crisp edges. Go to Colors > Adjust > Highlight/Midtone/Shadow. Make sure that the Linear Adjustment is the selected Method. Set the Shadow to 71, the Midtone to 0, and the Highlight to 48. The last setting, Highlight, may be adjusted to control the width of your spokes. It's a balancing act though - too high and your edges become fuzzy, too low and you lose your antialias and get jaggies.
 
 

The shape we have looks great so far, but it would be much better if it were on a transparent rather than a white background. To remove the white we can take advantage of the Layer Blend Ranges. First off, go to the Layers palette and turn off the visibility of your background layer. You can do this by clicking the little eyeglass icon next to it so that a red X appears. Make sure that your second layer remains the active one, however. Now go to Layer > Properties. This will pull up the Layer Properties dialogue box. On the second tab you will find to Blend Range sliders. On the top slider (the one labelled "This Layer"), slide the upper right slider all the way over to the left. On your image you should see the white background disappear.
 
 




At this point, your image should look like the one shown below. The problem at this point is that the white pixels that were around our black shape only APPEAR to be gone. The Blend range slider makes them seem to be transparent. But they are still there. You can prove this to yourself by making a selection anywhere in the transparent area and floating it (Selections > Float) Poof! The white pixels reappear.

To remove the white pixels permanently takes a little work. First we merge the visible layers (Layers > Merge > Merge Visible.) This will remove most of what we want to get rid of, but still leaves a "ghost image" of semi-transparent pixels around the shape. To get rid of them entirely, repeat the following sequence three or four times:

1) Go to Layers > Properties. Click the second tab and move the blend range slider as shown above.
2) Go to Layers > Merge > Merge Visible.

Each time you do this it removes a little more of the background. The process isn't perfect. It usually leaves behind an almost unnoticeable semitransparent area that is nearly indistinguishable from antialiasing.
 
 

At this point you should be able to use your Selection tool to draw a selection around the shape and click the shape once to contract the selection around it. If the Marquee is flush (or almost flush) with your edges, then you know that you've done a good job. Don't worry if your selection appears to be a pixel or so out from your shape when you're done. Those extra pixels are virtually transparent. if you want, you can contract your selection by a pixel (Selections > Modify > Contract), but make sure that you don't lose your Antialias when you do the contraction. Release your selection by hitting Ctrl + D.
 
 

Okay, we have the spokes, now we need the teeth for the gear. PSP 7 comes with several gear shapes, called Gear, Gear 2, Gear 3, Gear 4, and Gear 5. There are also two shapes called Starburst 2 and Starburst 3 which work nicely for pointed tooth gears. Go to your Preset Shapes tool and choose one of these shapes. Here I have used Gear 5. Make sure that your Background color is set to Black, and your Foreground Style to Null.  In the Tool Options palette, set the Line Width to 1 (actually it shouldn't make any difference), the Line Style to #1 Solid, and make sure that your Antialias box is checked, but that the Create as Vector and Retain Style boxes are unchecked. Now create a new layer above the one containing your spokes shape (Layers > New.) Just accept the defaults in the properties box. Then position your cursor in the center of your window again. Hold down the Shift key and right click your mouse to draw the gear. Make the new shape just slightly larger than the shape you created. When you release your mouse button, the new gear shape will cover up all or part of the spokes. Don't worry, we'll fix that next.
 
 
 

Turn off the visibility of your top layer by clicking on the eyeglass icon in the Layer palette. Then select your second layer, the one with the spokes. Using your Selection tool, create a circular selection starting from the center of your window. In this case it doesn't matter whether you have Antialias checked or not, but Feather should be set to 0. Create the selection so that the edge is just inside the black circle of your shape. All of the triangular holes should be fully inside the selection.
 

Now go to the Layer palette again and click on your top layer to select it. The black gear teeth should reappear. Your circular selection should still be active.
 

Finally, hit your Delete key to reveal the spokes. Ctrl + D will release your selection. To integrate the two layers into one shape, go to Layers > Merge > Merge Visible.
 
 

To add the opening for the axle, again use your Selection tool to create a circle. This time, make sure that the Antialias box is checked. Position your cursor in the exact center of the window and draw a small selection. Remember, when you antialias a selection, the selection you end up with is slightly larger than the one you drew. Be sure to take this into account. Create the opening by hitting your Delete key again.
 
 
 

The primary shape for the gear is now complete. The next trick is to give it three dimensions and a metallic shine. To proceed, click Next.