What to do with the Eraser tool?

Most posts on Illustrator tools focus on the things they can do. I’m going to focus on what a tool can’t do.

The eraser attracts new users because it seems like it should be familiar from pixel-based software like PhotoShop and Paint. You draw things, you erase things — simple, right? But then of course the eraser becomes a large source of frustration, because it doesn’t work as you might expect. The reasons for this are found in some fundamental ways in which Illustrator works, which I’ll also go into. But first, a few scenarios where you might think an eraser tool would be useful.

Erase rounded path ends or mitered corners

Sometimes you’ll end up with path end caps protruding from the edge of your illustration, or an excessive miter jutting out that you’d like to lop off, and need a way to shave them.

Erase part of an art brush

Illustrator comes with a bunch of nice painterly brushes, but sometimes you’re going to want to cut back into them and selectively erase long tails or otherwise neaten them up. Maybe you’re used to doing similar things in PhotoShop.

Erase the stroke on one side of a square

Probably a common thought: how can I get rid of only one side of a square, or part of another shape? Seems logical to just erase it, right?

Some bad news

The bad news is that the eraser tool can’t do any of these things! Not exactly as described, anyway.

You might justifiably ask: what is the point of it then? What can it do? The answers will be, I’m afraid, disappointing for most. But first I’ll discuss why it can’t do these things. As I said earlier, it involves a core concept in Illustrator: the difference between Objects and Appearances.

Objects and Appearances

If you use Outline mode (found under the View menu, or Command/Control + Y), Illustrator presents you with the skeleton of whatever you’re drawing.

It’s a series of paths that have no visual information except a pixel-width line. The things you can no longer see are called appearances — everything you might find listed in the Appearance panel when you select an object. Consider this brush as another example:

The actual object here is the path going through the centre of the brushstroke; the brush itself is an appearance. What else is an appearance? Well, pretty much everything except the path: a fill, a stroke, a pattern brush, and a 3D extrude effect are all appearances. Almost everything you can see in Illustrator’s regular view mode (Preview) is an appearance.

As far as Illustrator is concerned, appearances aren’t ‘real’ objects — they only exist in relation to the path they’re applied to, and change dynamically as the object is moved or edited. You can nail them down by ‘expanding’ them, after which they become ‘real’ objects and can in turn have their own appearances applied. If I expand the brush above, I can then apply a brush to the outline of the brush, for instance.

How does this relate to the capabilities of the eraser? You might have already guessed, but just in case:

The eraser tool affects paths, not appearances.

It can’t affect a brush, a miter on a stroke, a rounded end, or anyting else that isn’t a path. You could erase parts of the underlying path in each of those situations, but the appearance would just be redrawn to match the new path. Let’s consider a few situations that commonly result in confusion for new users.

Problem 1: The eraser tool doesn’t erase my path cleanly

When you drag the eraser over a path, it creates a nice clean break — exactly what you’d expect from pixel software. But then you let go, and the nice clean break vanishes! It should be fairly clear what’s happened here from the second image. Your original path is quite thick and has rounded ends. The eraser has cut the path in two — and now you have two paths that have the same appearance as he first, including the rounded ends that encroach on the break you made.

This will also be true if you try and erase part of a path that has a brush applied:

Run the eraser through the centre of this path with an art brush applied, and you now have two shorter paths each with the same complete brushstroke.

Problem 2: The eraser draws on my objects!

You scrub over a filled object with the eraser, but it ends up like the image on the left. What’s up with that? Just as before, the eraser is gouging out sections of an object that has a thick black stroke and a magenta fill applied. Where it bisects the object, it’ll create other objects with the same stroke and fill, so it’ll almost appear to be creating things rather than erasing them.

There’s a quirk of this in that it affects closed objects without a fill in the exact same way — so it seems like you can draw in completely blank space with the eraser, if it’s inside a shape with a stroke applied! This was created just by scribbling in the centre of the square with the eraser:

You can see what’s happening if I apply color to the result (right): it’s created a compound path from the ‘erased’ part, and the central part inherits the stroke from the original object.

Problem 3: The eraser closes my paths!

This only occurs if the original path has a fill (in this case a white fill). This is a common situation for new users because most Illustrator document profiles have a default graphic style that is a black stroke and white fill, and you might not notice the white fill unless you’re drawing on top of something. This is what the path looks like if we change the fill to red:

For some reason, instead of creating two open paths with the same fill and stroke, using the eraser unexpectedly closes the paths. I can’t think of a reason this would be desirable, but there it is.

So what is the eraser good for?

Very few situations, in my opinion. The common reasons a user might reach for the eraser tool in other software are best dealt with in Illustrator by masking, or as a last resort expanding appearances and directly editing them (but you’d better be certain that’s what you want before you do it).

If you’re dealing with objects that have a simple fill and no stroke or other appearance attributes to worry about, you might find it intuitive and simple to use the eraser. For instance, if you commonly paint with the blob brush, you might find the eraser a suitable counterpart. The blob brush is sort of like an eraser in reverse: it paints filled shapes with a calligraphic brush, which you could then cut back into with the eraser in predictable ways.

If you have an object selected, the eraser will only work on that, so it might be nice to neaten up your colouring under linework (if you have nothing selected, it’ll work on everything, so take care). But really, that’s about it.

Varying Transparencies in Live Paint

Something I hadn’t considered before it came up at work was that it might be useful to sometimes have areas of varying transparency in a single live paint group. Live paint is a useful shortcut in Illustrator that people probably take for granted now, but it was probably originally a way of making things in Illustrator a bit more Photoshop-like for newcomers. Before live paint, you’d probably construct everything you needed to fill as a closed path, which makes a bit of planning and close attention to the stacking order of objects essential for complex drawing. With live paint, you can just draw and let those things take care of themselves for the most part. Read up here if you’re unfamiliar.

Anyway, one thing you can’t do without breaking your live paint group into separate closed paths is adjust the transparency of individual filled areas. Not in the usual way, at least. You can still select individual paths (and the fills themselves with the live paint selection tool), but if you look at the appearance panel you’ll find you still just have the live paint group selected — there’s no way to add a stroke to an individual path either. Take this giant butterfly:

An image of a butterfly against a background of the sun setting behind pylons. This image will be used to demonstrate varying transparencies in live paint groups.

He’s a live paint group, of course. Say I wanted his colourful wing segments to appear transparent, but the dark areas to remain opaque. The first clue as to how you can go about this is here:

The butterfly image as a live paint group filled with various patterns

You can fill a live paint group with anything in the swatches panel, including patterns and gradients. Patterns can be transparent!  In fact, if you make a transparent filled object and drag it to swatches, a pattern swatch is what you get:

Creating a pattern swatch with transparency

It’s just colour; it’s only attribute as a pattern is that it has 50% opacity. So naturally, you create a set and colour away with the live paint bucket.

The butterfly live paint group, filled with some transparent pattern swatches

Looks delightful! However, there’s one pitfall I’ve found of this method. It’s quite a niche situation, but could be critical if you fall into that tiny niche and can’t figure out what’s wrong. Say you wanted to add a stroke around your butterfly. You’d add it in the appearance panel, drag it below the live paint contents so it doesn’t visually cover the whole group, and then set knockout group so it doesn’t show through the transparent areas (read more about the very useful option knockout group here).

butterfly-pylon5

Pretty silly, but that’s what you want for some reason. Looks fine in Illustrator, but you’ll get a hint as to what’s wrong with this if you check a preview of it in Bridge or your OS:

butterfly-pylon6

You can see the stroke through the transparent areas! Knockout group should prevent this, but for some reason it doesn’t. You’ll see the same thing if you place the AI file in InDesign, or if you export a raster file such as PNG. This is because other applications can only view the PDF side of the AI file, and while this method works fine in Illustrator, something evidently gets lost in the translation to PDF. This isn’t great news if you actually need to produce something using this method!

Fortunately, there’s another way. Remember that you can add gradients to the swatch panel too, and these can also contain transparency. Obviously you could have any combination of transparent gradient stops, but if you just want to replicate what we’ve made above, you’d need a gradient with two identical stops, with the same opacity setting.

butterfly-pylon7

A bit of a pain, and rather odd, But for whatever reason, this setup translates fine into the PDF, and makes an image created in this way usable elsewhere.