Type Knockouts in Illustrator

Continuing my trend of recording tips & tricks that I am commonly asked about, I thought I’d share my method for creating type knockouts in Adobe Illustrator (please note that I have no idea if that’s a proper use of the term, nor do I know what other people call them).

In the above image, the situation at left happens all the time. You’ve got some type on the map, but it’s hard to read because all of the other stuff on the map is getting in the way. The solution, on the right, is to selectively erase bits of the map in order to make the type more legible.

There are a few ways of going about this, each of which has some limitations (including the one I’m going to show you). Two common solutions are deleting linework and adding halos. The problem with the former is that it’s destructive. If you move the label and want to put that linework back, you’re out of luck — it’s gone (though you could keep it backed up in a separate layer, or pull it from an older file, but these are time-consuming). Instead, you could try adding a halo. It’s a great idea when the type sits on just one color, but it doesn’t work if a label has multiple background colors.

Haloes

So, when I can’t do a halo, I make use of a different method, which relies on…

Opacity Masking

In Illustrator, we can make objects more or less transparent. When they are completely transparent, they become invisible.

CirclesBut, it also lets us make parts of objects transparent as well. And that’s what we’re going to do. We’ll make just pieces of those map lines completely transparent, so that they are still there (in case we ever need them again), but cannot be seen.

To do that, we need to use opacity masking, which is a way of telling Illustrator how transparent to make things. The terminology gets a bit confusing here, as Illustrator has two ways of describing the same thing. Objects can have varying transparency (how see-through they are), which is sometimes instead called opacity (how not-see-through they are). Both words get at the same idea, just from opposite perspectives.

So, let’s set up an opacity mask, and I’ll explain as we go along what it is and how it works. To start, we need to first select the map labels that are hard to read, the ones that need the features underneath to disappear. Copy those to the clipboard with Cmd-C (or Ctrl-C, if you happen to be on a PC for some reason; mentally replace “Cmd” with “Ctrl” for the rest of this tutorial and you’ll be fine). We’ll make use of them in a while.

LabelsNow, find a layer of map features that needs to be knocked out, then select its appearance. That means clicking the little circle next to the layer name. This tells Illustrator you want to do something to affect how the whole layer looks. Like, for example, changing its transparency.

AppearanceNow open up the Transparency panel. Notice that there are a couple of little squares that appear in the panel (if you don’t see them, click on the icon in the upper-right of the panel and select “Show Options”). The one on the left shows a little preview of everything in the layer. The one on the right is greyed out and usually marked with something like a symbol for “nothing going on here,” depending on your version of Illustrator. If you have an older version, there won’t be a square on the right at all, just an empty space — this is fine. All the things I’m describing exist in the last several Illustrator versions, but they may look a little different.

TransparencyPanelDouble-click on the square on the right, or click “Make Mask.” Unless you’ve messed with some defaults, you’ll see the square on the right turn black, a box marked “Clip” will get checked, and all the artwork in the layer will disappear.

ClippedYou’ve just created an opacity mask. Here’s how it works: this is a special kind of layer, which exists parallel to your “real” Illustrator layer, and which tells Illustrator to make certain parts of the real layer transparent or not.  If part of your opacity mask is black, that tells Illustrator to make the corresponding part of the real layer invisible. If a part of your opacity mask is white, the corresponding part of the real layer is given no transparency. And you can go in-between: if you put some grey in your opacity mask, it makes the corresponding part of the real layer partially, but not fully, transparent.

Right now, the opacity mask is completely filled with black, and that tells Illustrator to make the corresponding layer completely invisible, which is why it disappeared. Uncheck the box that says “Clip,” if it’s checked. Your mask turns white, and your art reappears, because white means “0% transparency,” while black means “100% transparency.”

Alt-click on the opacity mask (the square on the right). Now, your map disappears and you’re taken into the mask, which is currently empty. Now to draw a black circle, and put it in a spot where there’s some artwork in the real layer. Notice, on the transparency panel, you can now see that black circle appear in the preview on the right.

CircleNext, let’s Alt-click on the square on the left of the Transparency panel. This takes you back to your real layer. You can Alt-click on these two squares on the Transparency panel to alternate between the layer and its mask. When you return to the layer, notice that part of your artwork has been made invisible, exactly where you drew the circle. The black circle in the opacity mask is telling Illustrator to make the corresponding area in the layer 100% transparent, meaning invisible.

KnockoutCircle

Alt-click on the opacity mask to go back to it, and delete the circle. Now, you could painstakingly draw little black circles or boxes everywhere you want to hide the linework, but that’s kind of annoying. Instead, let’s do this smarter. Remember those labels you put on the clipboard? Let’s use those. Paste them in place using Cmd-Shift-V. This is different from pasting with Cmd-V. Pasting in place makes sure the labels appear in exactly the same position as they were when you copied them, so that these labels you’re pasting in will line up exactly with the real labels.

Now, make those labels black, and give them a black stroke. I usually make the stroke around 2pt thick, and give it rounded corners. Your labels, inside the opacity mask, will look something like this:

LabelMasks

Now, Alt-click out of the mask. You’re done! Your linework on this layer is now knocked out. The opacity mask has black areas, in the shape of your labels, plus a little extra (from the stroke you gave them), and that means your linework has turned invisible in the area of those labels, plus a little beyond.

KnockedOut

It’s important to understand that you now have two copies of these labels — the real ones in your map, and a separate copy in the opacity mask. If you move a label in the map, the copy in the opacity mask doesn’t change. You’ll have to re-do it.

MoveLabel

This is a similar problem to having to fix things if you were deleting linework, but it’s a little less hassle to fix and it’s non-destructive. Also note that you’ll have to repeat this process for each layer of artwork you want to knock out.

Advanced Techniques

If you want to work a little more efficiently, you can actually draw/copy/paste/etc. inside the opacity mask while still viewing the art layer. Instead of Alt-clicking to go into the opacity mask, just plain click on it. You’re now editing the contents of the mask, but you’re seeing the layer. So, if you can keep them mentally separate, it’s a nice way to see how you’re affecting your art while working in the mask.

Instead of completely knocking out a layer, you might also instead try making it partially transparent, as I did in this example:

PartialTransparent

Here, I set an opacity mask with a copy of my type, but I didn’t make it black. Instead, I made it grey, which tells Illustrator to make the art only partially transparent. The darker the grey, the more transparent, until you get to black, which is 100% transparent.

Finally, in case you were curious about the “Clip” checkbox, that just tells Illustrator to set any areas of the opacity mask where you didn’t draw artwork to black. So, at the beginning, when we made the mask, there was no artwork in the mask, and so everything was turned to black. If we’d drawn a white circle in the mask with the “Clip” box checked, the circle would stay white, and everything around the circle would remain black.

So, that’s opacity masking for type knockouts. It’s not a perfect solution, but I find it pretty workable, and it’s pretty quick once you get used to it. Hope this writeup helps!

Natural Modernism

Since at least the time I started my river maps project, I’ve been interested in presenting the natural world in a more stylized visual language. It started with just rivers, but I’ve also been working on-and-off for the last couple of years on a map that also tackled terrain and vegetation. So, here it is. My beloved homeland of Michigan, in a highly generalized and stylized form.

Natural Modernism Main View

Click to view a PDF


Natural Modernism Detail View

I’ve straightened everything out into 45º angles, and used Tanaka lines to show the elevation. The green dots are actually based on land cover data. I’ve made them kind of sparse so that the rivers can be seen.

File this one under, “stuff I spent a lot of time making, and now don’t know what to do with.” The best I could think of doing was blatantly commercializing it by sticking that “buy” button up there. But, you can also just download the PDF above for free, which I hereby release under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. Note that in-browser PDF viewers may make the colors look pretty washed out.

I think of this project, along with my river maps, as fitting under an idea I call “natural modernism,” in which the natural world is presented in the same sort of highly-abstracted, geometrically-precise visual language that we often apply to the constructed world on maps. Think of metro systems, rectangular street grids, perfectly circular dots representing locations of cities, etc. When it comes to nature, though, we usually embrace the organic and chaotic shapes that it holds. This is probably a good idea, and I don’t propose that natural modernism become some sort of standard practice. It’s a fun way to look at things, though, and I find, increasingly, that a lot of my work boils down to presenting things in new and unusual ways.

Penrose Binning

Some months ago, I came up with a little joking idea: what if, instead of hexagonal or square bins, cartographers used Penrose tiles?

A Penrose tiling is a form of tessellation. It’s fun and unique in that it fills the entire plane, but has no repeats. Wikipedia has more detail about how these things are cool. Mostly, I thought of them because they look interesting and are sort of regular, without being too regular.

So for fun, I made a couple of maps using Penrose bins.

Density [Converted]-01

Population Density

US/Canada Atlas of Design sales

US/Canada Atlas of Design sales

Land Cover

Land Cover

I can think of no proper cartographic use for Penrose binning, but it’s fun to look at, and so that’s good enough for me.

To create the tiles, I found an SVG of a Penrose tiling here: http://faa.hu/new/english/parquet1/index.php. Then I pulled it into QGIS and resized it to fit appropriately on the US and part of Canada when in an Albers Equal Area conic (CM: -96º, SP1: 20º, SP 2: 60º). Then I did zonal statistics in ArcMap (for population density and land cover) or a spatial join in QGIS (for the point data of Atlas of Design sales).

If you want to give it a try yourself, I’ve put the shapefile here: https://www.dropbox.com/s/soakfi8z5cp7by6/Penrose%20Tiles.zip?dl=0.

While I can’t think of a use for this presently, who knows what the future will hold? Silly little experiments like this sometimes become valuable later on.

The Immanent Textbook

I use Twitter mostly, so this is my only medium in which to share thoughts that exceed 140 characters. I usually only put self-contained, finished pieces here, but today I’m going to just toss out a few random musings (also I’m sick and have not slept much for 4 days, so forgive any incoherence).

What if we made a cartography “textbook” based almost entirely on existing online content?

Most days, I find some cool mapping-related thing on my Twitter feed. Practical mapmaking advice, bigger-picture criticism/analysis of cartography, etc. Something which aims to educate and enlighten (I like to think that a few of the posts on this blog could likewise be described this way, too).

There’s all kinds of good sharable stuff out there, and it got me to thinking: what if we compiled it all into an intro cartography guide? I get emails from people who ask me how they can get started learning mapping, and I never have a useful answer other than, “go to a university like I did.” But that should not be the only answer, especially when we look at, for example, how many people learn coding by reading free online resources.

The advantage to using existing content is it means that no one really has to write anything new. I suspect that, scattered around the Web (blogs, free online journals like Cartographic Perspectives, Wikipedia, etc.), there’s pretty much everything someone needs to know to get a decent start to quality mapmaking. It just needs to be curated and compiled.

Specifically, it needs experts from the community to:

  1. decide what subjects should go in the textbook, in what order;
  2. track down existing writings that address these subjects;
  3. occasionally flesh out the skeleton by writing a small amount of material to connect pieces together, or introduce broad themes; and
  4. maybe come up with some practical exercises so that people can put this stuff into practice.

I don’t know, maybe this has all already been thought through and is underway somewhere else. There are certainly various useful lists of map resources out there that I’ve seen, but I don’t think any of them cover everything needed to go from zero to “capable of making a variety of decent maps.”

Certainly, the end result won’t be the same as a coherent text written by a focused author (or group of authors), and the student must be willing to put up with the patchwork nature of the guide, but I think it would fulfill a need nonetheless. Plenty of people want to learn mapping but don’t have access to formal channels.

Also, this idea seems like a lot of work, and I am overburdened already and likely can’t do most of the lifting myself. Maybe just provide counsel and big-picture input. But someone awesome should take this on and perhaps brand it as a revival of my forgotten NACIS Initiative for Cartographic Education. I feel like if we all get together on this, it wouldn’t be a lot of work.

Anyway, scattered thoughts from the mind of a convalescent.

Adding Shaded Relief in Photoshop

I’ve had occasion, from time to time, to show my colleagues in the UW Cartography Lab the technique I use to combine shaded relief with other map layers in Photoshop. After a recent request to share the technique again, I decided to make a video, so that people can watch at their own convenience. So, if you’re interested in this:

Equation

then watch this:

(make sure to view in HD, so you can see the details I’m talking about). If you’d like, you can also follow along with the same file I’m using: https://www.dropbox.com/s/6teczksvgajrxdb/ReliefTutorial.psd?dl=0

Tricks from the Historical Atlas of Canada

I’m constantly assembling, in my mind, a toolkit built out of little tricks that I see other cartographers pull off. I take pleasure in the small things. The big picture is important, and certainly we need to focus on telling a clear story that looks great, but it is the details that always interest me most: a well-done coastal effect, great typography, or a smart tweak to an old, standard symbology.

In that spirit, I’d like to take a minute to promote a couple of nice ideas which come from the Historical Atlas of Canada. Geoffrey Matthews served as the Cartographic Editor for its three volumes, the last of which was published in 1993. During my introductory cartography course, the instructor pointed to it as an example of one of the final great works of the manual cartography era, and I have found things to appreciate in it ever since.

There are three nice things I’d like to share…

In-Situ Insets

In-Situ 1
In-Situ 2

In-Situ 3

In-situ insets” is a term I just made up to explain what’s going on above. Maybe it has a real, accepted term already. Perhaps you could call it “lensing” instead? It is as a magnifying glass, dropped over the terrain. Instead of separate inset maps that zoom in on areas like Vancouver or Toronto, the authors expand these areas and then plop them right down in the middle of the map, covering part of the basemap. For comparison, here’s a map of Canada all at the same scale that I swiped from Wikipedia.

Political_map_of_Canada

Admittedly, the geography of Canada helps the authors here. There’s not much going on nearby that needs to be shown for the stories they’re trying to tell, so it can be safely covered up. Creating in-situ insets requires some fortunate circumstances, but when they come together, I think it’s a fabulous idea. I think forcing people’s eyes to shift to a separate inset map is disruptive and reduces their appreciation for the spatial context you’re trying to show. Keeping everything in one place, on one map, is more coherent.

Non-boxed Insets

Sometimes, instead of an in-situ inset, the authors do something like this:

Inset 1

Inset 2

The greyed out section of the main map and the arrow to the inset create a strong, nice-looking connection. So often, when we want to make an inset map, we end up putting it in a box, separated from the main map by a line. But I’m wary of introducing extra dividing lines into a map layout; I think it’s done way too often, and it prevents the various page elements from being seen as a coherent whole. The setup above is a nice way to have an inset without having to separate it from the main map. It is seen more clearly in its spatial context.

I’m not sure how I feel about the extruded, pseudo-3D perspective, but I expect this idea would work just as well in 2D.

Gridded Proportional Symbols

Finally, something nice that has nothing to do with insets. I like the Historical Atlas of Canada‘s use of proportional symbols that are gridded, so that they can be be easily broken down into countable units. Here’s an example:

Gridded

In many maps, these would simply be treated as proportional squares or lines, but in the Atlas, they’re broken up into units (I’ve seen the New York Times do similar). So, a reader can look at the whole and make a quick comparison, or they can take a moment to actually start counting if they’d like to dig out the actual number. Normally it’s very difficult for a reader to get an estimated value from a proportional symbol, but the grid makes it much easier. I like to call these “aggregate symbols,” as they’re proportional symbols built out of many individual pieces.

Here’s a second example, which we saw in the last section:

Gridded2

This map takes things a step farther and color-codes the units, adding another layer of data that, importantly, doesn’t interfere with the big picture. If you want to see the overall pattern, you can just look for the tallest stacks. If you want to dig deeper, more data are there, but they’re not in the way. It can be read at multiple levels, which is quite an excellent goal to aim for.

So there you go! A few nice tricks from a great product. They’re little things, but I think that small details is what a lot of good mapmaking comes down to.

 

Atlas of Design 2014

Friends, as many of you know, I am one of the Editors of the Atlas of Design, which is a book which NACIS publishes every two years. It’s a showcase of some of the best and most beautiful cartography around the world. We’ve recently opened submissions for the 2014 edition, and I very much hope you’ll think about submitting your work to us. Visit atlasofdesign.org/call for more details.

Also, I hope you’ll help us in spreading the word. The more people we reach, the better sample of maps we’ll have, and the better final volume we’ll produce. I would also especially like to ask for your help in reaching people outside the English-speaking world. We’d like this to be a book about great cartography throughout the globe. Our call for submissions and our submissions form are, thanks to some awesome volunteers, available in a dozen other languages.  While our volunteers make it possible to communicate outside of English,  we need help in reaching out to mapmakers who speak those languages. I and my fellow editors are based in the US, and our colleagues and professional contacts are primarily in the English-speaking world. If you can help us expand beyond that sphere by alerting your colleagues, posting in non-English forums, etc., we’d be much appreciative. We know it’s going to take time, but we’d like the Atlas of Design to represent the maps all of us make, no matter where we are.