Create a Detailed Vector Traffic Light with Simple Shapes, Gradients, and Glows
In this tutorial, we'll see how creating this detailed traffic light is just a matter of building up layers of simple shapes, custom gradients, and the Outer Glow effect.
Final Image Preview
Take a look at the image we'll be creating. Below is the completed illustration to see what you'll be working toward.
First, let's talk about how to create custom gradients, as we'll be using them a lot for this illustration. Let's start by making some new color swatches. Double-click on the fill color box in the Tool Palette and in the Color Picker choose a nice yellow color.
In the Swatches Pallett click the New Swatch at the bottom to create a new swatch of our chosen yellow color. Do this a few more times to make two or three lighter swatches, and two or three darker swatches, ranging from very light yellow to a dark yellowish-brown. These are the colors we'll be using in the custom gradients.
Note: To open the Swatches Pallet go to Window > Swatches.
Now that we have the swatches we need, let's make a custom gradient. Choose a linear gradient. Then drag one of the lighter yellow swatches from the swatches palette and drop it onto the white color of the gradient in the gradient palette Dropping a swatch onto a color of the gradient will replace that color with the new swatch color. Dropping a swatch onto a empty part of the gradient will create a new color on the gradient slider.
Now drag and drop a slightly darker yellow swatch onto the middle of the gradient slider. Then drop an even darker yellow/brown onto the black color of the gradient. Now we have a custom gradient. As you make these custom gradients, you'll want to save them to use later for different parts of the light. Just click New Swatch in the Swatches Palette to save them.
Ok, let's start creating the traffic light. Using the Rectangle Tool drag out a rectangle, as in the image below. This will be the main body of the traffic light.
Fill the rectangle with a custom gradient similar to the one below.
While holding Shift to constrain proportions, drag out a square. Then give it a custom gradient like the one below. To give the gradient the desired angle use the Gradient Tool. After selecting the tool, click and drag from the upper left to the bottom right of the square.
In order to add a little depth, we'll give this square an effect. With the square selected go to Effect > Stylize > Outer Glow. Enter the parameters below using the darkest swatch you made, and choose (yellow/brown) for the color. Now we have a slight shadow all around the square.
Note: The Blur amount may vary a little depending on the exact size of your square. It is important to note that we want to use Effects and note Filters because Effects are scalable. Just be sure the Scale Strokes and Effects box is checked in the general preferences (Edit > Preferences > General).
Now we'll create the four bolts that hold this plate on. Using the Ellipse Tool, hold Shift and drag out a small circle. Give it the same custom gradient and adjust it to suite you. Now give it the same Outer Glow effect as the square. The amount of Blur will be smaller. Simply adjust the Blur until it looks appropriate.
Using the Line Segment Tool, drag out a small line across the circle to make the slot for a screwdriver. Give it a black stroke of an appropriate amount. Also, give it the same Outer Glow effect.
In order to make the other three bolts, select the first one Alt drag over a copy. If you also hold Shift down, it will make the copy, though be sure to drag in a straight line. This will help in getting them all into position easier. Using this technique, make three copies and position them at the four corners of the square. Rotate each one a little to randomize the position of the screw slots.
Now we'll make what I call the "light mount." It is the round part that is behind the "light cones." To make this shape use the same techniques that we used to make the other shapes so far. Since we already went over these techniques, I will not explain them in detail here. Just create a circle, give it a custom gradient similar to the others. Then add the Outer Glow effect so that it resembles the image below.
Let's create the "light cones." This is the part that casts shadows on the lights. Make a circle a little smaller than the "light mount." Then give it a white to black gradient at a 45 degree angle. Add the same Outer Glow effect. Then place the circle in front of the "light mount."
Now make another circle, smaller than the last and give it a white to black gradient. Using the Gradient Tool, make the gradient opposite to the other white to black one, as in the picture below. Then position the circle a bit towards the bottom.
Select everything except the first rectangle. Then while holding down Alt+Shift, drag a copy down. Repeat this to get the upper one as well. Now we have three.
Ok, let's make the lights. Create a circle and give it a radial gradient of bright red to a slightly darker red. Notice that the position of the little slider is off centered towards the right in the image below. Apply the Outer Glow effect to it using the parameters shown below. Remember that the amount of Blur may vary slightly. Now, duplicate the light (Command+C) and paste it in front (Command+F). This gives the light a little more punch.
Repeat step 15 to make the yellow and green lights. Note: I found that when adding the Outer Glow effect to the yellow and green lights that Normal mode seemed to look better than Hard Light mode. Other than that the process is the same, only they use different colors.
Now let's give the lights a little texture. For the texture we'll use a pattern. To get the pattern we'll click the little arrow in the upper right hand side of the swatches pallett to open up the fly out menu. Then go to Open Swatch Library > Other Library > Patterns > Basic Graphics > Basic Graphic Dots.
Make three circles the exact size and position as the lights. Then fill them with the pattern 10 dpi 70% in the Basic Graphic Dots pallett we opened up. Lower the transparency of each one individually. I found these amounts of Transparency to look good: red at 4%, yellow at 3%, and green at 10%.
Now to make the lights look glossy. Create a circle the exact size and position as the red light. Fill it with white. Then using the Pen Tool, draw a curved line, as in the image below
Select both the line and the white circle. Then open up the Pathfinder Window (Window > Pathfinder). In the pathfinder window click Divide.
Clicking Divide breaks apart the lower shape according to the shape that's on top of it. In this case, it divides the white circle according to the curved line. Using the Direct Selection Tool (white arrow), select the bottom half of the circle and Delete it.
Select the remaining half of the circle and copy (Command+C). Then paste in front (Command+F). Fill the copy with a white to black linear gradient. Select both halfs of the circles, and in the Transparency Pallett click the little arrow in the upper left hand side. This opens the fly out menu. Then click Make Opacity Mask.
In the Transparency Pallett, click the Transparency Mask (indicated by the red arrow in the picture below) to edit it. Using the Gradient Tool drag from about the top of the light mount down to the bottom of the red light. Now we have a nice glossy looking light.
Just Alt+Shift click and drag to get the gloss for the other two lights.
On to the side cones. Using the Pen Tool, create a side cone shape. Then fill it with a custom gradient, as in the image below. Then place it behind the main body of the traffic light.
Now, as I'm sure you guessed, we'll copy the side cone twice using the same method as before.
Using the pen tool create the shapes for the top and bottom parts of the traffic light. Give them a custom gradient so they look similar to the picture below.
Just one last thing. Let's make the side bolts. Using the Pen Tool, make the shape for the side bolt and give it a custom gradient, as in the image below. Then place it behind the main body, but in front of the side cones. Copy the bolt until you have six on each side
That's it! Now we have a detailed illustration of a traffic light made up of simple shapes and the Outer Glow effect. I hope you enjoyed this tutorial.