In this tutorial, we'll make a semi-realistic road and rail track that actually consists of one single path each. Although it looks impossible, there are not any brushes and no need for any effects to be applied, but you could use some effect if you want. The secret is hidden in a tricky combination of multiple strokes. Intrigued? Read more!
Final Image Preview
Below is the final image we will be working towards. Want access to the full Vector Source files and downloadable copies of every tutorial, including this one? Join Vector Plus for just 9$ a month.
- Program: Adobe Illustrator CS3
- Difficulty: Beginner to Intermediate
- Estimated Completion Time: 30 minutes
Recently I was making a map in Adobe Illustrator that included a rail track and a road. I had to create the dynamic effect, so that both objects could easily change direction. Therefore, they should have constituted one path each. Of course, my first thought was to create brushes.
Still, I thought it would be quite a challenge to make a road and a rail track using no brushes or overly relying on effects. I wanted each one to consist of one editable path. After about 15 minutes the work was completed. I found a great way to create these objects with the help of the Appearance palette and multiple strokes applied. Can't wait to share this information, so let's get started!
Part 1: Road
The road is easy to create, so let's start with it first. Open Adobe Illustrator and create a new document (Command + N), make it 1000px by 600 px, in RGB mode.
We need an initial path to start with - so let's create a straight line (\). Once the effect is ready we'll save it and apply it to any other path later. Now the important thing is to imagine how your road looks from above.
We will create it with multiple strokes only, so the wider stroke will be at the bottom of the stack, all the others will be added above with the thinest one on top. Let's make the base first: make your line no fill with a 100 pt wide stroke. Also, give it medium gray color (#666666 or K=60%). This will be the main road width.
Now we need to make the road border. Select the line, go to the Appearance panel (Shift + F6), and here you'll see all effects applied to it. There are only fill (none) and one gray stroke that we just applied.
Select the stroke now and drag it to the New button (or choose Add New Stroke in the flyout menu). The new stroke will appear on top and it will be selected. Change its color to lighter gray (#999999 or K40%) and change its width to 112 pt. Finally, drag the new stroke below the first one - here is the border.
Let's create a markup now. With the road selected, add a new stroke in the Appearance panel. Change it's color to white, and give it 10 pt width. Now go to the stroke palette and check Dashed Line. Make the stroke 80 pt with a gap of 20 pt. The road basis is ready.
Although the road looks recognizable, I think it really lacks realism. So let's add some volume. Select the line, go to the Appearance panel and add a new stroke. Make it 114 pr wide, #666666 color (or K60%), uncheck the Dashed option and drag it to the bottom of the stack. Now this stroke is the outer side of the road border.
For now you will have four strokes in the road's Appearance panel. For the inner side of the border, choose the stroke which is 112 pt wide (second from the bottom) and drag it to a New button (do not forget to select the road here!). Give the new stroke a darker gray color (K=70% or #4d4d4d) and 104 pt width. This stroke is right on place, so we don't need to move it.
If your purpose is simple navigation or icon design, this road looks OK for it. Still I'd like to add some texture. Again, you know what to do, select the road, go to Appearance panel, choose our main gray 100 pt stroke (it is the second from the top) and add new stroke again. This is the last one - I promise. Now do not change it's width. It will be the texture covering our main road surface.
With this new stroke selected, go to menu Window > Swatches Library > Patterns > Basic Graphic > Texture. In the pattern library select any irregular texture like Mezzotint Dot. The effect might look too harsh, so just go to the Opacity panel and reduce the stroke Opacity to 15%. You may also want to try other textures from this library, like Mezzotint or Intricate Surface, just choose what looks best for you.
Finally, (with the road selected of course) change your top-most markup stroke's blending mode to Overlay so that the texture shows through (or you may want to just reduce it's Opacity to about 70%). For now you'll have 6 strokes as you can see in the picture below.
For those of you who want more realistic results I suggest you create your own pattern with irregular texture and replace the Mezzotint stroke with it. I made mine from a gray square run through Raster Effect of Texture > Grain, then expanded, ungrouped, live traced and saved it in swatches panel. Then select the road texture stroke and choose a new pattern swatch. You may also want to adjust the new pattern stroke opacity (I made it 30%).
The road is ready! Now you can save the resulted effect as a graphic style and apply it to any path. You can create anew curvy road with the Pen Tool (P), Ellipse Tool (L), or any other shape or path.
Part 2: Rail Track
As you may have guessed, the road was quite simple compared to what's next - the rail track. It is rather hard to create without brushes or effects for those who are not familiar with Illustrator's secrets. The tricky part lies in the double line of the rails. But I'll show you how to make it with multiple strokes only.
Again, draw a line (\). Let's first make a basic shape of the rail track. Give your line a medium brown stroke color (I used #a67c52 - anyway, we'll replace it with texture later) and assign it a width of 100 pt. Now go to the Stroke palette and make it dashed with 10 pt stroke and a 10 pt gap. Okay, so these are our future wooden sleepers (which is a rectangular object used as a base for railroad tracks, also called cross ties).
Now we need to make the rails. With the line selected, go to the Appearance palette and add a new stroke. Give it gray color (#4d4d4d or K=70%), make it 60 pt wide and uncheck Dashed in stroke palette. This will be our rails. I know, it looks bad now, but be patient and move to next step.
To actually make the rails, add another stroke to the line. Make it pink (or any other vivid color) and 40 pt wide. It should be on top. This stroke will serve as a kind of mask in the Appearance palette, and it won't be visible. I only made it pink to quickly choose it later in the Appearance panel.
Here comes the tricky part. Make sure the pink stroke is selected (it has to be after the previous step) and go right to the Opacity palette (or press Shift + Command + F10) and reduce its Opacity to 0%.
Now go back to Appearance panel and select the top-most line that says Path. And now return to the Opacity panel and click twice on the Knockout Group option so that it's checked. Ta-da! The rails are ready! The pink stroke is a mask now knocking out all strokes below. Now you can put this rail track on any background and it will show through!
Note: You may notice that the ends of lines don't look great. To fix it change the pink stroke's cap style to Rounded the in Stroke panel.
Unfortunately, the mask knocked out our sleepers as well, so we need to add them above. Duplicate the bottom brown stroke, drag it on top of the stack and change its width to 40 pt. For now you'll have 4 strokes in the Appearance panel: brown 100 pt (bottom sleepers), gray 60 pt (rails), pink 40 pt (mask), and brown 40 pt (top sleepers). Congratulations, the basic rail track shape is ready!
Now we'll add some realistic details. Let's improve our sleepers first. Select the bottom brown stroke of the rail track and duplicate it. Now select the bottom one of the same two strokes and change their color to dark brown (#42210b). Now change it's width to 102 pt.
Finally, go to the Stroke palette and change the values of the dashed line to 11 stroke and 9 gap. Now all you have to do is make a copy of this stroke and drag it 3 strokes above to position it under your top sleepers. Of course, change it's width to 40 pt.
The rails lack realism as well, so let's select the gray stroke in the middle of the Appearance stack and duplicate it (the copy appears above). Change it's color to a darker gray (#333333 or K=80%) and make it 44 pt wide. This is the inner side of the rails. Duplicate it to make the outer side and drag it below the main rail stroke. Change its width to 64 pt. Now you have 8 strokes.
This step is unnecessary, but you can do it to add one more detail - the joined rails. Duplicate the basic rail stroke (the gray one with 60 pt width). Give it a darker gray color (#1a1a1a or K90%) and make it dashed in the Stroke palette with a 1 pt stroke and 200 pt gap.
To add joint bars that fix rails, duplicate the new stroke and drag it below the main rail stroke (2 stokes down). Make it 68 pt wide and change the order of dashes to 11 stroke and 190 gap. The idea is to keep both newly created strokes together, so the sum in their stroke/gap numbers must be equal (1+200 = 11+190). This way rail joints and joint bars have the same position.
OK, for now you'll have 10 strokes, and that's enough for our rail track. The only thing we need now is wood grain for the sleepers. Unfortunately, there are no default wood patterns in Illustrator, but we'll find it anyway.
You can use any method of creating wood patterns, but I'll tell you the easiest way. Go to Window > Brush Libraries > Border > Borders_Frames and open the brushes library. There are a few wood brushes here that might suit our sleepers.
Grab the Oak brush and drag it into your document (make sure no shape is selected, otherwise the brush will be applied to it). The group of shapes will appear - select it and press Shift + Command + G to ungroup. Now delete the corner part of the brush - and you end up with a simple wooden texture. Rotate the wooden group by 90 degrees (I just like it better this way) and drag it into your swatches palette. Double-click the new swatch and name it "Wood."
All you have to do now is select the rail track and replace the light brown strokes in the Appearance panel with the new wooden pattern. Select the stroke of the sleepers (second from bottom 100 pt) and click "Wood" in the Swatches panel. Do the same with the top-most stroke of 40 pt width. Well, your rail track is ready, and you can save it as a graphic style and apply it to any curve now!
You will end up with 10 strokes for the rail track and 6 strokes for the road. We used 100 pt stroke width, but once you understand the idea, you can create the same effect for any stroke size. Still you'll be able to scale current effects if you check Transform Strokes and Effects in the flyout menu of the Transform palette (Shift + F8). Don't forget to save these stroke combinations as graphic styles to re-apply them later to any path.
In this tutorial we made a multi-layered effect of road and rail track using predominately the Appearance palette in Adobe Illustrator. To achieve it we used multiple strokes of different width, color, and type. We also exploited the knockout effect of the opacity panel for masking. Objects created with this technique can easily be edited, as the result consists of one path.
The method described above is great for creating any type of roads. On the example below I created 7 lines and applied various graphic styles that I made for rail track, road, wider street and boulevard. Every road is actually a single editable path. I hope you liked the effect and it inspires you with some great new ideas. Be creative!
Subscribe to the Vectortuts+ RSS Feed to stay up to date with the latest vector tutorials and articles.