DOI: 10.14714/CP90.1485

© by the author(s). This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0.

The Power of Appearances

Daniel P. Huffman, somethingaboutmaps | daniel.p.huffman@gmail.com

I make most of my maps with Adobe Illustrator, a program that provides a wealth of powerful styling abilities. Despite years of familiarity, I’m still finding new ways to use the software to automate complex styling. The circle in Figure 1, for example, has feathering, dashes, and two different colors separated by a gap, and yet, from the software’s perspective, it is only a simple vector path with a single style applied to it. In this article, I intend to walk you through how I made this particular style, not because I expect you’ll want to reproduce it exactly, but because it serves as an excellent demonstration of some of the software’s capabilities, and because it may inspire your own future efforts.

Figure 1. A circle with complex styling. Switching to Illustrator’s Outline Mode reveals that it is a simple vector path.

Figure 1. A circle with complex styling. Switching to Illustrator’s Outline Mode reveals that it is a simple vector path.

Before we can get into how it’s made, we need to cover two background concepts in Illustrator: appearance attributes and the Knockout Group setting.

APPEARANCES ATTRIBUTES

As anyone who has ever watched me work in Illustrator will attest, I am a big fan of the Appearance panel. This thing is the heart and soul of the program. I really think it should be introduced on day one of Illustrator 101, but most people I know only encounter it, as did I, much later on in their career.

All artwork in Illustrator has appearance attributes. Fills and strokes are the most common, but there are many other possibilities: drop shadows, transparency, blurs, etc. Anything that affects how your vector paths look is an appearance, and you’ll see it listed when you select something in the Appearance panel (Figure 2).

Figure 2. A path with three appearance attributes: a fill, a stroke, and a drop shadow.

Figure 2. A path with three appearance attributes: a fill, a stroke, and a drop shadow.

This panel lets you do a variety of useful things: first, you can rearrange the order of appearance attributes. An object’s stroke, for example, could go behind its fill. This is done simply by clicking and dragging it down in the list, just as you would change the order of layers in the Layers panel. Secondly, you can use this panel to easily add new appearance attributes. For example, you can add a new fill or stroke to your object by using the buttons along the bottom of the panel, or by clicking on the panel menu (the icon with the parallel lines in the upper right). Figure 3 shows the attributes of a line with two strokes: one is thick, grey, and solid, while the other, on top of it, is thin, yellow, and dashed.

Figure 3. A simple road style built from two strokes applied to a single path.

Figure 3. A simple road style built from two strokes applied to a single path.

Thirdly, you can use this panel to alter any of the appearance attributes you’ve applied. In Figure 2, the shape I have drawn has a drop shadow, and you can see the Drop Shadow effect listed in the panel. I can click on those words to adjust the shadow’s color or other settings without having to recreate it. I could also drag it to a new position in the list hierarchy so that the effect only operates on particular attributes of the shape, such as on the fill or the stroke. I can also remove the shadow completely using this panel.

Perhaps you’ve seen those little circles in the Layers panel, the ones next to each object and layer? I’ve highlighted one of them in Figure 4. I was originally taught that you should click on the circle next to an artwork element to select it, but this is not strictly correct. It turns out that the little blank spaces directly to the right of the circles are what you should click to select artwork. In truth, clicking the circle or the blank space for an individual object is basically the same thing. When we are talking about layers, however, the place you click makes a big difference.

Figure 4. Circles for selecting appearances, and zones for selecting individual artwork elements.

Figure 4. Circles for selecting appearances, and zones for selecting individual artwork elements.

The reason there’s one circle for the layer and one for each object is so that you can apply appearance attributes to an entire layer, in addition to whatever attributes the individual elements might have. For example, I could, on a single layer, draw a series of squares, and give each a blue fill with no stroke. By then selecting the appearance circle for the layer, I can then add a new stroke to all the elements on that layer. This is done by choosing Add New Stroke from the Appearance panel menu in the upper right, or by using the equivalent button on the bottom of the panel. As a result, all my squares inherit the stroke that I applied to the layer (Figure 5). Yet, if I select an individual square, Illustrator will say it doesn’t have a stroke—because, in fact, the individual objects do not. It is the layer that has the stroke, and that stroke is applied on top of whatever style is already applied to objects in that layer. The squares get a blue fill from their individual appearance, and then they pick up a black stroke from the layer appearance.

Figure 5. Applying a new stroke to a layer of squares.

Figure 5. Applying a new stroke to a layer of squares.

This distinction of applying appearance attributes to objects vs. layers is super useful once you get the hang of it. It all relies on clicking in the right place: clicking on the circle by the layer name will let you alter the layer's appearance. Clicking on the space nearby will instead select the individual appearances of each piece of artwork in the layer. I’ve given one more example of the distinction in Figure 6. On the left, a drop shadow was applied to each object. On the right, a drop shadow was applied to the whole layer.

Figure 6. Drop shadows on individual objects, vs. on an entire layer.

Figure 6. Drop shadows on individual objects, vs. on an entire layer.

This is why it’s important to be careful when making selections by clicking on the circles. You may end up in a situation where you want to apply a shadow, or perhaps some transparency, to every object in a layer. But by selecting the circle next to the layer name, you’ll actually be applying it to the layer as a whole, rather than to each object. We won’t be making any use of this distinction between object and layer appearances for our example dashed line style, but it’s a common source of confusion when using the Appearance panel, and a bit of clarity here can unlock a great deal of versatility.

KNOCKOUT GROUP

Perhaps you’ve seen the little Knockout Group checkbox on the Transparency panel in Illustrator (Figure 7) and wondered what it did. If you’ve never seen it before, try clicking a couple of times on the icon directly to the left of the word “Transparency” to get it to appear. This button changes how many options are shown in the panel.

Figure 7. The Transparency panel in Illustrator.

Figure 7. The Transparency panel in Illustrator.

Whenever a graphic has two overlapping objects, Illustrator has to figure out which parts can be seen, and which are hidden. So, in Figure 8, we don’t see the entire red square because the blue circle is covering part of it. Illustrator has knocked out (made invisible) part of the red square. Remember, we’re not dealing with real physical objects, so for one thing to hide another, Illustrator has to make a decision for each pixel on the screen (or page): “do I show red, blue, or some combination?”

Figure 8. The blue circle hides the red square.

Figure 8. The blue circle hides the red square.

If, as in the top half of Figure 9, I turn the blue circle partly transparent, Illustrator figures that some portion of the red square should show through, and does some math to determine what color the resulting overlap should be. If I turn the blue circle completely transparent, Illustrator realizes that the red square should entirely show through.

Figure 9. The Knockout Group setting affects how the blue circle interacts with the red square. When combined with transparency, the difference can be significant.

Figure 9. The Knockout Group setting affects how the blue circle interacts with the red square. When combined with transparency, the difference can be significant.

The order of operations Illustrator follows here is: (1) look at the blue circle’s transparency setting, and (2) use that information to decide what parts, if any, of the red square need to be hidden (if the blue circle happens to be totally opaque) or to change color (if the blue circle is partly transparent). Turning on Illustrator’s Knockout Group setting reverses this order of operations. First, Illustrator decides that the blue circle should hide part of the red square because they overlap. And then it looks at blue circle’s transparency settings. So, if we made the circle completely transparent, Illustrator first hides the overlapped part of the red square, and then it makes the blue circle vanish. The end result, as seen in the bottom half of Figure 9, is that the red square can end up being hidden by something that’s invisible.

I must credit Illustrator guru Mordy Golding (twitter.com/mordy) for my understanding of how this stuff works. I don’t remember if it was a blog post or one of his Lynda.com tutorials that taught me this, but thanks to him I’ve been getting a lot of mileage out of the Knockout Group setting for years.

If you’re tempted to try this out, there are two things to note: first, you’ll need to click the checkbox next to Knockout Group more than once. The first time you click, the box turns to a dash, and then on the second click it turns to a checkmark. The dash indicates the “neutral” setting and the check mark activates the behavior I have been discussing. I’m not going to lie: I have only a very fuzzy understanding of what the neutral setting does and why you’d use it. To the best of my understanding, it basically stops the Knockout Group setting on your artwork from interfering with the Knockout Group setting on any group or layer that encloses your artwork. As I mentioned before, Illustrator has so many capabilities that it can take an entire career to master them, and the neutral setting is one I haven’t quite had occasion to figure out just yet.

The second thing to note is that Knockout Group only affects things that are hierarchically below it. So, if you apply Knockout Group to a layer, it causes the top objects in that layer to knock out those underneath. If you apply Knockout Group to an object, it causes individual pieces of the object to knock each other out (such as the stroke of an object knocking out part of its fill), but the individual objects themselves don’t affect each other—the effect is confined to that object. So, if you draw a bunch of circles in a layer, then turn on Knockout Group for all of them, nothing will happen. Instead, you’d want to first select the appearance of the whole layer that those circles sit in, and then turn on the Knockout Group setting. This is one of those cases where the distinction between layer appearances and object appearances is critical.

BACK TO THE LINE STYLE

With this background, we can begin making our complex dashed/feathered/two-color line style. I originally created this style while working on an ecological atlas for a client. Many of the maps showed the ranges of various species: either their annual range or their ranges in different seasons (Figure 10). The client also wanted a way to show areas where the boundary of the annual range was coincident with the boundary of a seasonal range. My solution was the style seen in Figure 11, the anatomy of which I’ll break down here.

Figure 10. Range styles.

Figure 10. Range styles.



Figure 11. Combined range style.

Figure 11. Combined range style.

Let’s start with a blue dashed stroke. In my case, it has a 16pt line weight, with 10pt dashes and 5pt gaps. If you’ve got Illustrator set to use inches or centimeters by default, you can easily change it in the Unit preferences, which you can reach by hitting the Command (or Control, if on a PC) and comma keys. Or, you can keep Illustrator in your preferred unit and simply type, for example, 16pt in a dialogue box and it will automatically convert that to the appropriate number of inches/centimeters.

In Illustrator, I’ve set the dashes to align to corners and ends so that they look a little tidier (Figure 12). I really only need an inside stroke here, rather than one that goes on both sides of my path. But, for some reason you can’t do an inside stroke in Illustrator if you’re also using the align dashes setting. And I do want to keep the dashes aligned, because they tend to look a little more deliberate and even.

Figure 12. Creating a simple blue dash, aligned to corners.

Figure 12. Creating a simple blue dash, aligned to corners.

So, to work around that, I will add another 9pt stroke on top of the blue one, but this one will be solid and set to only go on the outside of the path (Figure 13). Again, you can use the handy button on the bottom of the Appearance panel to add this extra stroke. Notice also that each individual stroke (or fill) has its own Opacity settings. I can make any particular one transparent, or I can apply the effect to the object as a whole. In this case, I’m going to select the new stroke I just made and set its opacity to 0%. Then I go to the bottom of the appearance listings and select the opacity for the whole object and click Knockout Group (Figure 14). Remember to click twice, so you go past the neutral state. Now the outside portion of our dashed line is gone. The top stroke is being made invisible, but it still knocks out part of the blue stroke.

Figure 13. Adding a second stroke on top of the first.

Figure 13. Adding a second stroke on top of the first.



Figure 14. The top stroke has 0% opacity, and the entire object has Knockout Group turned on.

Figure 14. The top stroke has 0% opacity, and the entire object has Knockout Group turned on.

If you’re playing along at home, it’s quite possible that nothing happened when you followed these steps. Check to make sure that you’ve got your line selected. If you don’t have anything selected, none of these appearance adjustments will have any effect. This happens to me constantly, no matter how many years I’ve been doing this; I will accidentally deselect the object I was planning to work with and then I wonder why none of my appearance changes are doing anything.

Thanks to those first two steps, I’ve got the blue portion of the stroke finished. Now let’s add the grey portion on the outside. I’ll add another stroke, this one grey, 4pt wide, and with the same dash pattern (10pt dash, 5pt gap). Notice that only the portion that’s inside the path shows up in Figure 15. The outer portion gets knocked out by that outside stroke we have already set up, above. This is assuming you’ve ordered the strokes the same way I have: with the 9pt outside stroke on top, then the grey and blue ones. You can try changing the order, and exploring the effect that the invisible outside stroke has: it only hides what’s underneath it.

Figure 15. Grey stroke added.

Figure 15. Grey stroke added.

Next, we need to create a small gap between the two strokes. This will also require a knockout. We’ll start by creating a new, 0.5pt stroke. Color doesn’t matter, but I’ll make mine red to stand out. This is going to knock out parts of the grey and blue strokes, so put it on top of both of those. Then, I will apply an Offset Path effect to it. You can find this by first clicking either the fx button on the bottom of the Appearance panel or the Effects menu on the top of the screen, and then looking for it under the Path submenu. Use Offset Path to shift this new stroke inward by 1.75pt, as in Figure 16. Notice that I applied the Offset Path to just the new stroke, not anything else. Appearance effects (like glows and shadows, for example) can be applied to individual appearance attributes of objects (such as this new stroke). In the Appearance panel, if you first click on the red stroke to highlight it, anything you choose from the Effects menu (such as Offset Path) will be be applied only to that stroke. If you applied Offset Path to the wrong thing, you can always click and drag to move it around.

Figure 16. A new, thin path is put on top of everything else and then offset inwards.

Figure 16. A new, thin path is put on top of everything else and then offset inwards.

Finally, I take that thin stroke and I set it to 0% opacity. Since we’ve got Knockout Group on, it knocks out the stuff underneath, leaving a 0.5pt gap between our grey and blue strokes, as seen in Figure 17. We’re nearly done.

Figure 17. The thin stroke is now invisible and knocks out everything below.

Figure 17. The thin stroke is now invisible and knocks out everything below.

Finally, I want to make these dashes fade away as they get toward the center of the shape. I like the softness of the look, and to me it also imparts the idea of “this species stays on this side of the line,” which is important when the shape is large enough that the reader might not always be looking at the whole thing at once. To create this effect, I start by adding a new fill on top of everything else, and offset it inward (2pt in this case). This means the fill doesn’t start until just after the gap, and it will cover the blue stroke. Next I apply a 4pt feather effect to the fill to cause it to fade at the edges. Make sure to add this feather after the Offset Path effect—that is, below the Offset Path in the order of appearance layers (Figure 18).

Figure 18. A new fill, offset inward 2pt and feathered 4pt.

Figure 18. A new fill, offset inward 2pt and feathered 4pt.

At this point, you might be able to predict the next step: I set the fill to 0% opacity. Because of the Knockout Group setting, the blue stroke fades out as the invisible fill fades in. We’re left with the finished product, which can be seen in Figure 19. Figure 20, meanwhile, shows it in use on an actual map.

Figure 19. The final line style.

Figure 19. The final line style.



Figure 20. The line style in use on an ecological map.

Figure 20. The line style in use on an ecological map.

This particular effect does not always look great when going around hard bends or corners (Figure 21), but I don’t generally have those in the situations where I’m using it, so I don’t mind. Dashes often get pretty tricky in those situations, no matter how simple or complex your style is.

Figure 21. Corners and bends can cause issues.

Figure 21. Corners and bends can cause issues.

The nice thing about this style is that it is all one object. You could achieve a similar look by creating multiple paths all stacked on top of each other, but it is far more flexible to do it all on one object. If the shape needs to change, you don’t need to update multiple copies, each with its different stroke style. You simply redraw your shape, and everything updates.

After doing all this work, it’s also important to know that styles can be saved. Opening up the Graphic Styles panel will give you options to save styles and to apply them to other paths, so you don’t need to keep recreating this over and over again (though some practice can’t hurt).

Again, I imagine that you probably won’t need to reproduce this exact style (though you’re welcome to if you find it useful). But, I hope this step-by-step breakdown gives you some ideas as to what is possible when using appearance attributes, knockouts, and effects. You can accomplish quite a lot by styling a single path, and, once you get the hang of it, Illustrator makes it fairly straightforward to take your work to another level.