preview

How to Create Roads and Rail Tracks on a Path

Download Source Files

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.

Tutorial Details

  • Program: Adobe Illustrator CS3
  • Difficulty: Beginner to Intermediate
  • Estimated Completion Time: 30 minutes

Introduction

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.

Step 1

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.

Step 2

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.

Step 3

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.

Step 4

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.

Step 5

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.

Step 6

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.

Step 7

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.

Step 8

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.

Step 1

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).

Step 2

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.

Step 3

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.

Step 4

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.

Step 5

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!

Step 6

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.

Step 7

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.

Step 8

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.

Step 9

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.”

Step 10

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!

Step 11

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.

Conclusion

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.

Add Comment

Discussion 43 Comments

  1. designfollow says:

    thanks for this creat tutorial

  2. Brilliant. Frikken brilliant. I love Illustrator!

  3. Nice tutorial, thanks!

  4. qw78 says:

    Thanks, great tutorial with a few very useful tips

  5. gunman says:

    Thanks for all,you are the best

  6. Tanja says:

    This is such a nice way to approach this. I really need to keep that in mind, thank you!

  7. spasquini says:

    Very nice technique! Thank you! … a little tip: please, use an english version of AI, to grab screenshot. Not everyone know russian …

  8. devDsine says:

    there are some useful tips
    thanks for sharing!

  9. Web 2.0 says:

    Thanks for the tutorial, it gave me an idea :)

  10. Marshall says:

    crazy!

  11. Michel says:

    Yay, this rocks. Hope I can make some maps soon at work ;)

  12. locomoco says:

    Fantastic one, many thanks for this, Diana! :D

  13. Seth says:

    Great Tutorial. These techniques can really prove useful in some of the things I do at work. Thanks!

  14. Shree says:

    This should be the editor’s job to ask the author to give screen shots in English, not the users. :-(

    • Sean Hodge says:
      Staff

      @Shree – 95% or more of our tutorials have English screenshots, but when a good tutorial comes in from a foreign author that doesn’t have an English version of Illustrator I will consider it for publication. In this case, I would rather have this on the site as is, rather than to not have published it.

      Of course, English version screenshots are our preference and I drastically limit how many tutorials I’ll accept that are not created with English version software. Thx.

  15. Diana Berg says:
    Author

    Hi, guys. I’m sorry that Russian interface disturbes you that much – and I’m surprised, actually. I think I’d recognize Illustrator panels visually in any language, besides, I always explain every step twice…

    Anyway, after so many comments on this issue I bought an English version, so no more Russian panels, I promise. =)

    • elliott... says:

      That’s a shame, you shouldn’t have to have gone out of your way for such a small issue, if people can’t recognize the panels from the icons in them, maybe they shouldn’t be using Illustrator.

      • Lazaros says:

        This is quite right, but… there are people who learning Illustrator (hands on) or others who remember Illustrator from previous versions.
        Amazing tutorial. Amazing Program on good heads :-)
        Spaceba!

  16. david says:

    Hey Diana,

    I’m a newbie to illustrator and can’t read a lick of Russian, but your tutorial is so step by step, that it doesn’t matter that the panels are not in English.

    BTW, though, I can’t get the strokes after step 3 to show up. I create them but they don’t seem to appear. I even changed the color to pink, purple, etc., just to see and nothing showed, same thing with the stroke when I applied the mezzo tint, it shows up in the appearance panel, but nothing on screen.

    Thanks

    • Diana Berg says:
      Author

      David, when the stroke is showed in Apparance panel but changes do not apply to your object, it means that you did not select the object. That is why I always noted to select the object prior to applying strokes – when nothing is selected, the Appearance panel has the same effects the last selected shape had, that is the feature that confuses sometimes.

      And thank you for support =)

  17. Luis says:

    HA, this took me back to my class days a few years back, good job!

  18. benok says:

    it doesn´t matter Diana, thank you for you tut and your beauty….

  19. jmy says:

    this is what i need to start learn path
    thanks Diana

  20. Tony says:

    I love it , I love it, I LOVE it.
    Thank you very much.
    Oh and I don’t speak Russian ,but the written explanation was absolutely sufficient to understand, and yes the panels are recognisable.

  21. Carmen says:

    Hi Diana,

    I am having trouble saving the road as a Graphic Style. What do you have to do exactly? Thanks!

    • Craez says:

      I had the same prob until figured out that from the appearance panel make sure you Select the Path: at the top of the list, then drag the track to Graphic styles

  22. craez says:

    Great tut. hope you do more

  23. Dona says:

    Thank you so much for a very well-explained tut. It was just what I needed!

  24. usman says:

    thans very good i make a railway line hellp me

  25. Perry says:

    Wow! that is so awesome! many thanks, didn’t know you can do so much from the appearance and stroke panels!

  26. Pavan K says:

    Brilliant. I hope to do something great with this and the Train Yard iPhone App as inspiration for a product and it’s planning. Once it is done and the project in the public domain I will drop you the link, as a thank you for saving me some time and structuring the design work I am about to do.

    Time is precious and so, therefore, is this tut! Thanks Diana. ;-)

  27. J. says:

    Could you show me how to do this in inkscape?

  28. DJNippa says:

    This is perhaps the best explained tutorial I have ever seen.
    Usually there is always some sticking point, but you have laid it out perfectly.
    You are a great teacher. Thank you.

  29. JoBeeOne says:

    Great tutorial – I love the power of the appearance pallet – great detail too.

  30. Daellton says:

    First of all, thank you very much for the tutorial! Now my question…
    I’ve created the rail track which looks fine. But when I try to make a Graphic Style from it, all I get is the brown ties. The gray horizontal rails do not show. I do have the path selected in the appearance panel when I drag it to the graphic style panel. It’s just the darn rails that do not show. Any suggestions out there? Thank you so much!

    • LoungeKat says:
      Staff

      Hm, I’m not sure whats happening. Rather than dragging the image into the style panel, try clicking the New Graphic Style button with the image selected.

      • Daellton says:

        LoungeKat: Thank you for your response, but yes, I did try that many times. The version I created is much simpler (only a 4 stroke file, no special fill/texture effects).

        It previews perfectly fine (I am using AI CS5), but when I create the graphic style, it only picks up/saves the brown 100 pt dashed stroke (and again, I do have “path” selected in appearance panel).

        Any other advice would be so appreciated!

      • Daellton says:

        This is driving me nuts…
        I’ve recreated the file – to the letter – 3 times. And each time, when saving as a graphic style, it only saves ONE of the strokes, not all 4. I’ve created graphic styles before, without issue, though never using a path/single line as your rail/road effect does. A big thanks in advance to anyone who can tell me what I’m doing wrong?

  31. Stuart says:

    Having done tutorials myself (but in an entirely different area – nothing to do with computers or Adobe) I can appreciate the amount of effort and care that has gone into this.

    Very well done, logical progression and with the humility of someone who understands that those following the tutorials are, by definition, lacking the knowledge to do it. Brilliant, brilliant work, and made my weekend.

    I can now make endless transport-related quizzes and teaching resources for my autistic son using these! Genius, mate!

    -Stuart

Add a Comment