Start a hosting plan from $3.92/mo and get a free year on Tuts+ (normally $180)
In the following tutorial, you'll learn how to create a lock icon with some effects, opacity masks, gradients, and simple shapes in Illustrator. Many of these techniques can be applied easily to other icon designs.
Below is the final vector image we'll be making in this tutorial. For further research in lock icon designs, check out PSDTUTS's Create a Shiny Lock Icon Design, as there are many ways to create this kind of design.
Create a new documents 8.5 inches wide by 11 inches tall. Then use the Rectangle Tool (M) to create a rectangle 3.5 inches wide by 2.75 inches tall.
With the Rectangle still selected, go to Filter > Stylize > Round Corners to bring up the Round Corners dialog. Change the Radius to .375 inches.
Create a Liner Gradient in the Gradient Panel. Next, add three more swatches on the Gradient by clicking below the Gradient Slider. Now you should have five swatches, including the original two swatches.
Change the color of the far left swatch to a light gold color (I used these CMYK values: C=0 M=6 Y=28 K=0). Change the second swatch from the left to a darker gold color (C=8 M=12 Y=27 K=0). Change the third swatch from the left an even darker gold color (C=18 M=27 Y=55 K=0). Change the fourth swatch to the darkest gold (C=25 M=35 Y=63 K=0). Finally, change the last swatch to match your first light gold color.
Create a rectangle that is .25 inches wide by 2.75 inches tall. Then fill it with a 40% black. With the new rectangle selected, go to Effect > Sketch > Graphic Pen, to open up the Graphic Pen Dialog. Change the Stroke Length to 15, the Light/Dark Balance to 10, and the Stroke Direction to Horizontal.
Expand the graphic pen effect by going to Object > Expand. Once the shape is expanded, go to Object > Live Trace > Tracing Options, to bring up the Live Trace dialog. All the default Adjustments settings in the right of the dialog stay the same.
In the Trace Setting side of the dialog, change the Path Fitting to 1 px, the Minimum Area to 1 px, the Corner angle to 1 px, check the Ignore White checkbox, and then press the Trace button. Next, go to Object > Live Trace > Expand.
After you have expanded the Graphic Pen Effect, change the dimensions of texture to 3.5 inches wide and keep the height the same size. Copy (Command + C) the original rectangle gradient and Paste it in Front (Command + F). Select the newly copied gradient shape and the texture. Then press the Intersect Shape Areas button from the Pathfinder Panel.
With the texture selected, grab the Eyedropper Tool (I). Then click on your first gradient to load the gradient attributes. Add another swatch to the texture gradient in between the first two swatches. Your texture gradient should have 6 swatches now.
Change the first two swatches to you first light gold color (C=0 M=6 Y=28 K=0). Change the third swatch to a darker gold (C=8 M=12 Y=27 K=0). Change the third and fourth swatch to your darkest gold color (C=25 M=35 Y=63 K=0). Finally, change the last swatch to your original third swatch color (C=8 M=12 Y=27 K=0).
With the Ellipse Tool (L), draw an ellipse 4.5 inches wide by one inch tall. Place the ellipse over the lock body so the center of the ellipse is slightly higher than the top of the lock body.
Select the lock body and ellipse and align them by pressing the Horizontal Align Center Button. Next Copy (Command + C) the original lock shape (not the texture) and Paste in Front (Command + P). With the copied shape and the ellipse selected, Intersect the shapes in the Pathfinder Panel.
With the new shape selected, create a Linear Gradient from the Gradient Panel. Change the first swatch to one of your lighter gold colors (C=8 M=12 Y=27 K=0). Then change the second swatch to your dark gold color (C=25 M=35 Y=63 K=0). With the Gradient Tool (G), adjust the gradient by clicking at the top of the shape and drag to the bottom of the shape.
Next comes the top of the lock icon. Start by drawing a 2 inch by two inch ellipse with the Ellipse Tool (L). Also, draw a 2 inch by 1 inch rectangle with the Rectangle Tool (M). Select both shapes, Horizontally Align them and Vertically Align the Bottom. Next, press the Add To Shape Area button in the Pathfinder Panel and Expand.
With the Direct Selection Tool, select the bottom line of the shape and delete it. Next, change the Stroke Weight to 26 pt and Expand the Appearance.
With the top lock shape selected create a Linear Gradient. Then change the first swatch to a 22% black and the second swatch a 72% black. With the Gradient Tool (G), adjust the gradient by clicking from the top of the shape and drag to the bottom.
With the shape still selected, go to Object > Path > Offset Path to bring up the Offset dialog. Change to Offset to -.075 in and press OK. Select the new offset path and create a Linear Gradient. Fill the first swatch with white and the second swatch with a 50% black. Adjust the gradient with the Gradient Tool (G), as in the previous step.
With the newest offset still selected, create a second offset the same as before, giving you three total shapes. The inside shape should still be a gradient, but you are going to add two swatches to the Gradient Slider. Change the first swatch to 60% black, the second to 30% black, the third to 20% black, and the fourth to an 85% black. Also, adjust the gradient as in the previous steps.
Select the two inner offsets and stretch them down slightly. This helps the highlight not look so perfect.
Select all three objects of the lock top. Then send them behind the lock body.
Draw an ellipse that is 4.5 inches by 4.5 inches. Then create a Radial Gradient in the Gradient Panel. Make the first swatch (inner radial swatch) a 65% black and the last swatch (outside radial swatch) a white color. Next, scale the ellipse down to .5 inches tall, while keeping the same length. Set the shape to multiply and place it behind all the lock artwork.
Select everything but the drop shadow. Then Copy (Command/Ctrl + C), Paste in Front (Command/Ctrl + F), and select Flip Vertical from the pop-up menu in the Transform Panel. Drag the copied artwork to the bottom of the original artwork. Then send it behind all other artwork including the drop shadow.
Draw a rectangle that is slightly bigger than the flipped lock artwork. Create a Linear Gradient. Keep the default white and black for the swatches. Adjust the gradient so the white is at the top of the gradient and black is at the bottom.
Select all the flipped artwork, the gradient, and select Make Opacity Mask from the pop-up menu in the Transparency Panel.
For the background, create a rectangle to the size of your document. Fill it with a 8% black. Then send it behind all the other artwork. You can change the color of the background to any color you prefer, if you are not to excited about the grey color.
For the typography you can choose any font, lettering, and branding. Once you've type in your brand, outline the type by going to Type > Create Outlines (Command + Shift+O).
Place the lettering over the desired area of the artwork.
Copy (Command + C) both the lock texture and outlined type. Then Paste in Front (Command + F). Select both copies and Intersect the shapes. Use the Eyedropper Tool and sample the textures gradient. Next, select the original outlined text. Then use the Eyedropper to copy the color of the lock body gradient.
Select the original outlined text, and offset the path as before, but this time set the Offset in the Offset dialog to .075 inches. Create a Linear Gradient with the first swatch being your dark gold color (C=25 M=35 Y=63 K=0) and your second swatch an even darker gold color (C=33 M=47 Y=85 K=25). Adjust the gradient so the darkest color is on the top.
Select the original text outline with the Selection Tool (V), while holding down the Alt button (to copy the object), and drag slightly down and to the right. Change the color to your darkest gold. This will give the text some depth.
Select the text offset and Copy (Command + C) and Paste in Back (Command + B). Then change the color to you light gold color. Move it down slightly.
All done! The final vector lock icon design is below.