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!
- Resetting Text Attributes to Their Default in Photoshop
- Photoshop’s Share Button
- Adding Snow with After Effects and Photoshop
- The Green Room – 1: Stick That in Your Pineapple
- Animated Handwriting Techniques
- Adobe Essential Graphics
- Accessing Technology Previews in Lightroom CC Mobile
- The Details Panel in Photoshop Shake Reduction
- Dynamic Repeat Grids in Adobe Xd
- Create Easy Repeat Grids in Adobe Xd – And Make a Photo Grid for Instagram