Creating Dashed and Dotted Lines in Photoshop
The more I play around with Photoshop CS6, the more I like all the great new capabilities that have been added to this amazing program. Did you know, that in Photoshop CS6, shape layers are a thing of the past, replaced in their entirety by vector layers? This is a tremendously powerful feature, which we will explore in detail over many tutorials in the future. For today, we’ll focus on a small new feature, but one which solves a big problem that has existed forever in Photoshop – how to create a dashed or dotted line.
Since the brush engine was revamp0ed back in Photoshop 7.0, it has been possible to create some versions of dotted lines using some trickery, brush tip shapes, and brush engine presets. That’s way too complicated, and it is now officially kicked to the curb in favor of using the new vector layers in Photoshop CS6. Vectors in Photoshop, much as in its sister program Illustrator, now have a fill and a stroke, and that gives us an amazing amount of flexibility compared to the previous shape layers.
Let’s take a look. We’ll start with this document, and add an oval shape using the ellipse tool. All the settings are at their default at this point:
Notice right away the two areas I’ve highlighted: The toolbar, which is completely revamped compared to CS5, and the Layers Panel, which now shows the ellipse as a Vector Layer rather than the shape layer with a fill and vector mask as in the previous version.
We’ll take a close look at the toolbar to begin. The preset picker works the same way as before, and the previous three icons for “shape layer,” “path”,” and “fill pixels” are now changed to a dropdown list. Notice that in this example, we’re using “Shape,” which is necessary for the next steps to work:
From here on, things start to get really good. The next two sections of the toolbar are completely new, and for anyone who has used vector illustration programs, these will be a welcome sight: a Fill and Stroke dropdown list, with a size setting for the stroke. We can drop down the Fill swatch to choose a different solid fill color, a gradient fill, a pattern fill, or we can choose None. Since we’re going to focus on the stroke in this exercise, we’ll choose None:
Now, the shape has no fill or stroke – the path is still visible because the layer is selected:
Let’s add a stroke. We’ll use a high contrast color so we can see it well. We’ll drop down the stroke swatch, and choose a yellow color. We’ll leave the default size of 3 pt selected:
Now that we have a stroke, we can start to add special effects to the stroke itself. Moving just to the right, we have the Line Type drop down box. We can see immediately that we have the ability to change to a dashed or dotted line simply by choosing the presets. Here’s a dashed line, straight out of the canned preset:
Likewise, a dotted line is just a click away:
But wait, there’s more! (There usually is, in Photoshop). We can change the appearance of the dashed lines, customize and save our own presets. We’ll skip right over the three drop-down lists for Align, Caps, and Corners, because we’ll find them and more in the More Options… dialog – click the button at the bottom of the panel and see:
Within the Stroke options, we have the same three drop down lists for Align, Caps and Corners… except, in this dialog, they have descriptions. This can be a good thing, because the tiny icons in the previous box may be a little hard to discern until you’ve used them a few times. Here, you get the hint. For example, the Align parameter can be set to align the stroke inside the path (default), centered on the path, or outside the path. The changes are viewable in real time, so as soon as you make the change you can see the results without leaving the dialog:
We’ll change it to Center and move on to the section at the bottom – we’ll come back to Caps and Corners in a moment. The bottom section includes a checkbox for Dashed Line – when you create presets, this needs to be checked to enable the parameters just underneath. Here’s where the magic happens – you can create three different dashes and gaps between the dashes for any dashed line. How does this work? Let’s change the parameters, like so:
This creates a dash of length 4, with a gap of length 2, and another dash of length 1, followed by a gap of two. The pattern then repeats. The result is a pattern of alternating long and short dashes, with rounded ends:
Now, you might wonder, the short dashes of length 1 seem to be smaller than the gap of two – and the ratio of the longer to shorter dashes isn’t quite 4 to 1. To fully understand that, we need to understand how end caps are applied to the dash segments. There are three possible types:
- Butt: The line ends squarely at the endpoint of the dashed segment.
- Round: The line ends with a circular shape, the diameter of the stroke, centered on the endpoint (so it extends past the endpoint of the segment).
- Square – The line ends with a square shape, the height of the stroke, but centered on the endpoint (so it extends past the segment).
The only way to see the true size of the Dash and Gap is to change the Caps to a Butt type, like so:
Now, you can see the squared off ends, and the dash and gap ratio make more sense. The final parameter is Corners, which can also be one of three settings:
- Miter: The default – tries to square off any corners when the dashed line changes direction
- Round – Rounds the corners off when the dashed line changes direction
- Bevel – chamfers the corner by lopping off a piece at about a 45 degree angle when the dashed line changes direction.
To see this in action, we need to create a vector shape with a corner, such as a Rectangle Here’s the default Miter corner:
Here’s the same shape changed to a Round corner. Note that depending on your document resolution (number of pixels) and the size of the stroke, you may get a somewhat jagged “round” corner:
Finally, here’s the same shape with a Bevel corner setting. Again, you may see some jagged edges depending on document resolution:
Given these capabilities, we can create any number of unique custom settings for our stroked lines. For example, here’s a “phantom” line type with two long dashes and a short dash:
Don’t forget to save your presets! Once you click save, the new preset appears in the list of available stroke types. There’s no naming, it is a visual-only list:
Customized dashed and dotted strokes now available in Photoshop. Amazing! And don’t forget, while we’ve been looking at applying these strokes to shapes using the shape tools, it works equally well to freeform vector paths you create with the Pen tool.
And – Bonus Tip! Don’t be afraid to add a Layer Style stroke to a vector stroke, for double stroke goodness, as you can see with the Ampersand-shaped path in the center of this image:
That’s all for this tip! I hope you find this information helpful. See you next week!
- Adobe Express Gets a Long-Awaited Update
- Create a Captivating Animation for Social Media Using Adobe Character Animator for FREE
- An Introduction to Adobe Dimension
- Photoshop Content Aware Scale
- Resetting Text Attributes to Their Default in Photoshop
- Photoshop’s Share Button
- Adding Snow with After Effects and Photoshop
- Animated Handwriting Techniques
- Adobe Essential Graphics
- Accessing Technology Previews in Lightroom CC Mobile
Very clear instructions. I’m so glad they added this feature.
This is an amazing addition that will get cheers and claps from graphic designers worldwide.
How do write a free dashed line as you “wrote” the word Dashes and the end of the tutorials?
I created the words “Dashes & Dots” as paths using the pen tool, then stroked them with the same techniques applied to shapes previously in the tutorial.
I would like to get started with CS6 but I’m confused as to what to buy and who to buy it from. The only experience I have is with basic things in Gimp. I have a Mac. Thanks for any ideas you might give me.
is there a way to make custom caps? also what if i want to cap the 2 ends of the line with an arrow-head? thanks.
I have CS6 and I must be missing something because I can find none of these options for preset line types. I’m not a novice nor am I an expert user but I really need to create a dashed line so hope to figure this out. I’m using Photoshop CS6 13.0 x 64 if that helps.
Janet, I suspect you are not starting with a “Shape” as shown in the 2nd image at the beginning. If you choose to draw “Pixels” or “Path” you will not see the line type options.
I have the dots in place how I want them, but I can’t get rid of the original circle upon which the dots are located. Is there a way to make the line disappear?
wow, didnt know about this feature since i have been using cs5 until now. now m gonna download cs6 coz i dont want to get deprived of the flexibility in working which photoshop has to offer over vector illustration softwares!
Me also facing the same problem. Trying to get rid of the original circle but not be able to do that. Anyone can help?
Little rusty with Photoshop I’ve moved onto CC now but this is a lovely tip. Thank you.
sombody help me to get the software for printing vehicles side stickers
I am creating a new web site and this is just what I was looking for. Thanks so much for the great post on creating dashed and dotted lines. I am working on a full screen slider that does not offer layers so I will create my ads on the main background image. Text will have a dashed line around it.
Very effective post. Now, I can create dotted line by myself in Photoshop with the help of this tutorial. Thanks for sharing it 🙂
Very effective article to increase the design knowledge. Thanks for sharing the helpful article.
Tutorials are very helpful. waiting for more tutorials.
Lovely photoshop tutorial about creating Dashed and dotted. Thank you so much.
Amazing Photoshop tutorial about dashed and dotted lines in photoshop. Thanks for sharing this with us. keep up the good work.
wow awesome post about Photoshop loved it❤
truly helpful tutorial, learning a lot everyday form your blog so thank you so much and keep posting great stuff.
Really informative and helpful tips!These tips have been of great benefit to my work.I would like to get something more modern from this site.Thanks For Sharing and Keep Up the Good Work.
This is a great article! I just started my own blog and I am totally taking a lot of your advice to heart! Thank you so much!!
Really informative and helpful tips!Thanks For Sharing and Keep Up the Good Work.
This is basic thing for a designer. I hope in future we can gate more Advance from you.
M Steve Smith
Haha! Took 11 years for you to find it, some may argue he was ahead of his time!
Oh, and there’s a better way to do this now, see how long it takes you to find it, there’s a tutorial on this very website.
Awesome article shared by you about this topic. Next time in my project I will follow your instructions. Thanks for sharing this.
I appreciate you sharing this blog post. Thanks Again. Cool.
I am Mark from the United States. For a few days, I have been suffering from the exact tutorial to learn how to create a dashed line so hope to figure this out. Thanks for your sharing. Keep it up.