Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Hey gang! This is Deke McClelland. Welcome to Deke's Techniques! This week we're in Illustrator, and we're going to take ordinary path outlines and through sheer force of will, we're going to turn them into railroad tracks. Now, perhaps you know the drill. We go and throw on some dashed lines for the ties and then you add a couple of more strokes there for the rails and so forth. I suppose this is just fine if what you're trying to do is emulate Thomas the Tank Engine. But we're going to go full bore.
We're going to go HO scale totally tricked-out tracks and these are created with no drawing whatsoever. It's all a bunch of stroke attributes. Here, let me show you exactly how it works. All right! Here we have a couple of different railroad track treatments open up inside Illustrator. We're going to start things off with a more sophisticated of the two, which is this guy at top here. You can see if you look closely at the two different treatments that this top one features consistent lighting angles and a uniform dark line around each one of the plates and so forth, and it's a combination of nineteen different strokes applied to a single path outline.
But here's the caveat. It only works with perpendicular paths, so they have to be exactly horizontal or vertical. So let me show you how it works. I'll switch over to this file called Base paths.ai, click on this horizontal line to make it active. If you're working along with me, you want two different panels opened. So go up to the Window menu, make sure you can see your Swatches panel, as I can, and also make sure to bring up the Appearance panel so we can keep track of all the various strokes. First thing we want to do is get rid of that fill. So click on the word Fill and then click on the Slash icon up here in the Swatches panel.
Now click in the stroke to make it active. We're going to start by creating the wooden ties, and so we need a very thick line weight. I'm going to increase that Line Weight value to 130 points, and then I'm going to change the color to dark wood, which is the swatch I've created in advance. If you don't have access to this document, just go ahead and dial in your own deep shade of brown. Now we need a dashed path outline, so I'm going to go ahead and click on the word Stroke, turn on Dashed Line. The pattern that we're looking for is a dash of 24 combined with a gap of 40. However, if we go with those values, we end up with these half-a-dashes at the beginning and the end of the path, and I don't want that.
So I'm going to change the second Dash Value to 24, I'm going to change both the first and the second Gap Values to 20, so I'm spreading that 40-point gap between them, and then I'll change that first Dash Value to 0. So if you take a look at these values, we've got 0, 20, 24, and 20. They all add up to 64. We're going to have to match that periodicity over and over again. That is to say, our values will continue to add up to 64 as we build up the strokes. Now notice that we have these very thin lines that are showing up here.
Those are our 0-point dashes. They won't necessarily print, although they might, but in any case we're going to get rid of them. But we'll do that after we build up the ties and the plates. All right! With this dash stroke selected, drop down to the little Page icon at the bottom of the Appearance panel and click on it. That'll go ahead and duplicate that stroke. Now switch its color to medium wood this time around. Let's go ahead and take the Line Weight value down to 120 points. And then we're going to adjust the dash values by changing each one of the gap values here to 25.
And then because we add a 10 to the gap all together, we need to subtract 10 from the dash, so I'll take that value down to 14. So we've got 0, 25, 14, and 25. I'll press the Enter key or the Return key on the Mac in order to accept that change. All right! Now we're going to create a highlight and a shadow at the top and bottom respectively. So we'll go ahead and create a copy of this first stroke by Alt+Dragging or Option+Dragging it to the top of the stack like so. Then let's change the Line Weight value to just 5 points, and I'll go ahead and select Shadow wood in order to make this the shadow.
And now we need to go ahead and scoot this stroke downward, which we can do by applying a dynamic effect. So with this stroke active, go up to the Effect menu, choose Distort & Transform, and then choose Transform. And you can go ahead and turn on the Preview check box and then increase this value if you want to, like so. Notice that positive Vertical values move the strokes down; negative values move them up. Anyway, I ended up figuring out that the value we want is 62.5 points. All right! Now I'll go ahead and click OK in order to accept that change, click on that new stroke that you just created, go ahead and click on the little Page icon at the bottom of the panel. Let's change this guy to the Highlight wood color. 5 points is just fine.
The dash values are fine too. However, I need to twirl open the stroke and click on the word Transform and change the vertical value to negative. That's all we need to do. Turn on the Preview check box to see the highlight jump to the top, click OK. All right! Now we need to build up the metal plates upon which the rails rest. So I'll go ahead and select this most recent stroke once again, clicking the little Page icon at the bottom of panel to create a copy of it. Then go up to the Swatches panel and click on Light rail, which is 30% black by the way, so very light gray. And I'm going to change the Line Weight to 20 points this time around, then click on Stroke in order to bring up the Dashed Line options and you want the gap values to both be 28.
And the dash value, the second dash value should be 8. So 0, 28, 8, and 28, like so, they add up to 64 once again. So we have the right spacing going on. However, there is one problem. I'll go ahead and twirl open the stroke here. We need to adjust the positioning of these items, so I'll click on the word Transform and I'll go ahead and change the Vertical value to let's say positive 40, and then click OK. And that'll move these guys down here. Now let's create little lines around each one of these plates, and we'll do that by selecting this new stroke, creating a copy of it, twirl the top one closed, and then let's change the Line Weight of the bottom one of the two here to 22 points, and change the Color to Shadow rail, which is the darkest of the grays.
And then finally, click on the word Stroke and we're going to just slightly adjust these gap and dash values. So I'll change each one of the gap values to 27 and then I'll increase the second dash value to 10. So what we've got here is 0, 27, 10, and 27 like so, and we end up with outlines around each and every one of the plates. All right! Now let's make the upper plates. And these are easy really at this point. You just go ahead and click on one of the strokes and Shift+Click on the other one. So we've got both the gray strokes selected, drop down to the Page icon, and click on it. That makes duplicates of each of them.
The only thing we need to do is change the Transform values. So go ahead and twirl each one of them open, click on the word Transform, change it from positive to -40 points, click OK, and do the same thing with the other stroke. Change it to -40 as well, and we now have the top row of plates. All right! Now let's get rid of those vertical lines that are interrupting the flow of things here. I'll go ahead and twirl both of these strokes closed, grab the bottommost stroke and Alt+Drag it or Option+Drag it to the top of the list and then release.
And we'll change this Stroke Color to White and we'll also change the Line Weight to slightly thicker. We'll change it to 140 points so that we're clearly covering up everything we need to. Now we need to adjust the dash values, so go ahead and click on the word Stroke there. And this time around we're going to get rid of the second pair of dash and gap values, so if you just get rid of that second dash value, they will both go away. And I want you to change first dash value to 4 and then because our periodicity or magic number, as I was saying, is 64, we want to change the gap value to 60 and we end up covering up all of those lines, with the exception of the very first and very end ones.
As I say, these may or may not print. They will appear and disappear at different zoom levels as you're working inside Illustrator, so they're essentially phantoms. But if they bother you, you can just manually cover them up somehow. All right! Now let's add the most complicated of the stroke groups, which represent the rails. And we'll do that by clicking on really any of the strokes at this point and then clicking on the little Page icon at the bottom of the list. Click on the word Stroke and turn off Dashed Line to get rid of it. And then what we want to do is change the Line Weight, because we're covering up everything at this point.
So I'll change the Line Weight to 8 points this time around, and let's change the color to Light rail. And so this will represent our central rail. Now let's create some shading around it by clicking on the little page icon once again. I'm going to click on the second-to- top stroke and I'm going to change its color to dark rail. We want the Line Weight to be a little thicker. I'm going to change it to 10 point. And we want a little bit of transform going on. So go up to the Effect menu, choose Distort & Transform, and choose the Transform command, and I'm going to go ahead and change this Vertical value this time around to 2 and click OK. That'll go ahead and scoot that guy down just a little bit.
Click on that second-to-top stroke, make a copy of it. This time we'll go with a color of Medium rail, 10 points is just fine, twirl open the Stroke, click on Transform, and change this guy's value, the vertical value to -2 points and click OK. That goes ahead and scoots that one up. Now we need a little bit of edge shading and highlight, so we'll create those as very thin lines. I'm going to Alt+Drag or Option+Drag this 10-point stroke to the top of the stack. Then I'm going to click on that new stroke that I just created, and I'll change its color to Shadow rail this time around.
Go ahead and reduce the Line Weight to 2 points, twirl open Stroke, click on Transform. This one should be set to a Vertical value of 4 points, click OK. And now let's create a copy of it by clicking on the little Page icon, change its color to white. This time around click on Transform and change the Vertical value to -4 and click OK. All right! We have now created a single rail, which would be great if this were a monorail, but it's not; it's a train track. So we need to make a duplicate of this rail and then scoot one of the rails down and the other one up. And we're going to do that right now.
So go ahead and twirl this guy close for a second, click on the white stroke at the top, Shift+Click five strokes down. So your two 2-point strokes, your 8- point stroke, and your 10-point strokes should all be selected. Then drop down to the little Page icon and click on it to make duplicates of all of them. Now let's go ahead and twirl open the top five strokes, so we have access to the Transform values, and we're going to add 40 to each one of them. You may recall, one of the plates is located 40 points down and the other one is 40 points up. So that's why we have to move each one of these 40 in one direction or the other.
So click on that first Transform value there. Pretty easy to add 40 to 2, which is 42. Click OK. Click on the next Transform value. What is 40-2? Well, you can just actually enter 40 before the Minus sign and press the Tab key and Illustrator will do the math for you, 38 points. Go ahead and click on the Stroke that doesn't have a transform associated with it. Go up to the Effect menu, choose Distort & Transform, and choose the Transform command, and we want this guy to be exactly 40 points. Then go ahead and click on the second-to- top Transform. We'll add 40 to 4, which is 44, click OK, and then click on Transform.
We'll do 40-4 and that turns into 36 points. Now click OK and we have one copy of the rail down below. Now let's move the other one. Twirl all these guys closed, and then we need to twirl this next group open like so. So we should have five open strokes, and then click on the bottom Transform. This time we need to subtract 40 from 2, so it's 2-40, press the Tab key, that's -38, click OK. Then click on the next Transform. This time we can just enter -42, so that's pretty easy. Click OK. This guy doesn't have a transform. He needs one, however, so let's go up to the Effect menu, choose Distort & Transform, choose the Transform command, change this Vertical value to -40, click OK. Then click on this Transform, second to top of the ones that are twirled open right now. What is 4-40? Just do the math for me, Illustrator. It's -36.
Click OK and then click on the Transform for that final white stroke. This would just be -44 this time around, click OK. And we have successfully created our railroad track effect. Now what you would presumably do is go up to the Window menu and choose Graphic Styles and then go ahead and save out a graphic style. If you want to name it as you save it, go ahead and press the Alt key or the Option key on the Mac as you click on the New Graphic Style icon. However, I've already created one in advance, it's called Perpendicular tracks, so that you can apply it over and over again to any perpendicular path outline here inside Illustrator.
Get unlimited access to all courses for just $25/month.Become a member
117 Video lessons · 43101 Viewers
119 Video lessons · 54392 Viewers
65 Video lessons · 14620 Viewers
113 Video lessons · 82940 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.