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.
Final Image
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.
Step 1
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.
Step 2
With the Rectangle still selected, go to Filter > Stylize > Round Corners to bring up the Round Corners dialog. Change the Radius to .375 inches.Step 3
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.
Step 4
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.
Step 5
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.
Step 6
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.
Step 7
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).
Step 8
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.
Step 9
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.
Step 10
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.
Step 11
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.
Step 12
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.Step 13
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.
Step 14
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.
Step 15
Select the two inner offsets and stretch them down slightly. This helps the highlight not look so perfect.
Step 16
Select all three objects of the lock top. Then send them behind the lock body.
Step 17
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.



























User Comments
( ADD YOURS )D.A.T. July 17th
cool techniques!
Asmaa July 17th
Great Tutorial Rype , this must be the next feature on my site!
Randy July 17th
now THAT’S impressive. Very cool. I thought it was raster at first.
macias July 17th
nice one , heh..looks almost like made in Photoshop…. but scalable…
MoNsTeR July 17th
You have nice tips.
Qvectors July 17th
loving the outcome, nice work!
Danny July 17th
that’s a great lock
RUGRLN July 17th
Now this is some good looking s**.
Really cool! Keep up the good work! Any tuts on 3D Revolve effect btw? [Like the cans of baked beans but revolve effect not extrude and bevel]
K3v July 17th
Excellent work, learned some tricks on the way!
Tim July 17th
good tips!
Jraider5 July 17th
Good tutorial but i think the main lock part looks too real for the loop/handle part. The lock looks more 3d and the loop looks flat. Nice tut tho
Braden Keith July 17th
Yum Yum. This looks fantastic!
Osynovskyy July 18th
Hmmm, and where the label “vectortuts” in reflection?
Blue Buffalo July 18th
Great techniques. The brushed metal look is very good.
Shane July 19th
great tutorial - I like the end result too.
Edawg August 28th
Nice job, but the reflection is missing the text.
tarak_br September 13th
I love it! good tutorial!
SOS Media October 5th
Thanks — this is great!
Elango November 11th
Fantastic tut
Lucas November 20th
thanks dude, this is a really cool stuff!
greatings from Argentina
DC3 December 17th
anyone else having trouble with step 20 ?
When i make the opacity mask, the whole lock just sort of fades a little. i dont get the top part fading to nothing. anyone know what i might be doing wrong. i think i have followed it precisely.
@edawg - well spotted. i missed that.
Add Your Comment
( GET A GRAVATAR )Your Name January 5th