Skip to main content
Inspiring
February 11, 2010
Answered

[Locked] How do I shade or paint "inside the lines" with Illustrator?

  • February 11, 2010
  • 7 replies
  • 82093 views

I'm a longtime Illustrator user, and have yet to figure out an elegant solution for perhaps my most common illustrator task. So, at long last, I'm resorting to the forums.

When one paints in Photoshop, it's common to use the magic wand (or some selection tool) to select a region so that you cannot paint outside of it. Let's say I want to add a shadow or highlight to a sphere -- I select the fill color of the sphere, and then can drag my brush along the perimiter of the selection, which keeps my shadow entirely inside the sphere. This is especially important for cartoon-style drawings where you want sharp shadows or highlights.

It doesn't seem there's any way to do this in Illustrator (using a freehand style of drawing, with a Wacom tablet or the like). The best solution I've found is to use live paint, which allows you to easily select any color areas that spill outside of a line (because live paint identifies those areas as separate entities). You can then simply delete the unwanted color. It's also possible to use the pathfinder tools to unify only overlapping areas, but this can get even more cumbersome if your illustration is complex.

My hope is that someone has a better way -- a plug-in perhaps, or something really obvious that I'm overlooking. Thanks you in advance. Also, I'm not interested in ways of doing this using the pen tool -- I know how to add shadows in that fashion. The goal is to find a way to quickly paint freehand, using a tablet and the brush tools.

P.S. I realize it's possible to simply bring the file into Photoshop, but then you're not creating a vector image, obviously.

    Correct answer Parklife444

    All I wanted was precisely what Adobe implimented -- a paint inside the lines features, similar to creating a mask/selection in Photoshop so that you can't accidentally paint outside of a shape or color area. Even though the feature is essentially automated clipping masks, it frees up my workflow. Also, it's not a bad thing that it still maintains the excess data -- namely the bits of paint cut off by the clipping mask.

    7 replies

    Participant
    January 27, 2018

    In case it helps : the function is available in Adobe Animate : Brush > Brush Mode > Paint selection.

    Participant
    August 16, 2016
    Participant
    July 14, 2016

    Hi!

    I couldn't bother reading the rest of the threads so I'll tell you something that I do.

    Make a closed path over the area within which you wish to constrain the brush lines. Remove the fill and stroke.

    Duplicate that closed path.

    Select both paths and make a clipping mask.

    Select that clipping mask, go into isolation mode and then use your brush.

    Happy brushing!

    _scott__
    Legend
    April 17, 2010

    Illustrator CS5... the Bristle Brush.. and maybe Paint Inside.

    Inspiring
    April 16, 2010

    A HUGE thanks to the fine developers and Adobe who implimented this exact feature in CS5!

    JETalmage
    Inspiring
    April 17, 2010
    ...who implimented this exact feature in CS5!

    That exact feature? How, then, do you reconcile that with your earlier statement:

    ...the isolation mode exploit is in fact using clipping paths, which isn't helpful...

    When I view the teaser demo of the new feature, I see the extraneous portions still existing-- i.e.; merely being masked. Sure looks like a clipping path at work to me. I'm not saying having an interface dedicated specifically to working that way isn't more convenient than my pre-CS5 workaround; but it still looks structurally like much the same thing--same old untidy masking, not actual triming.

    JET

    Parklife444AuthorCorrect answer
    Inspiring
    April 17, 2010

    All I wanted was precisely what Adobe implimented -- a paint inside the lines features, similar to creating a mask/selection in Photoshop so that you can't accidentally paint outside of a shape or color area. Even though the feature is essentially automated clipping masks, it frees up my workflow. Also, it's not a bad thing that it still maintains the excess data -- namely the bits of paint cut off by the clipping mask.

    Inspiring
    February 11, 2010

    Clipping Mask?

    Inspiring
    February 11, 2010

    Clipping path, sorry.


    JETalmage
    Inspiring
    February 11, 2010

    Odd question from a longtime AI user. When drawing in programs like Illustrator, you are creating objects, not merely recoloring existing pixels. So the objects you draw either have to be shaped exactly like you want them to show, or you have to use other paths to mask them or trim them.

    This PDF shows one method of "painting into" a masked area. It was done as an example of exploiting the so-called Isolation Mode which appeared somewhere around version CS2, as I recall. It sort of emulates painting with an airbrush inside regions masked by frisket material, by drawing paths with a Brush appearance and a blurr Effect applied inside nested clipping paths.

    JET

    Inspiring
    February 11, 2010

    Hi JET,

    The doc you sent is helpful, but it essnetially relies on clipping masks -- another cumbersome feature that is ultimately less useful than manually shaping the shadows or highlights manually.

    For the record, the question I'm asking isn't actually that strange. Illustrator already has the ability, heightened greatly with Live Paint, to allow you to select certain color regions. I'm simplyi asking if it's possible to constrain all drawing to within a given color reason, which would be helpful for a number of reasons. The simple fact is that one often wants that "human touch" to the shading, which is easiest to achieve using a pressure-sensitive tablet. However, without the ability to constrain the drawing, you're often left with quite a bit of clean-up work, which seems entirely unnecessary given that Live Paint is ALREADY recognizing which color areas are inside a shape and which are outside of it. I'm just wondering if there's a way to automate the process.

    JETalmage
    Inspiring
    February 11, 2010
    For the record, the question I'm asking isn't actually that strange.

    It's strange in that one would expect a long-experienced Illustrator user to understand what I already mentioned: That "painting" in Illustrator amounts to creating additional objects. To "contain" those newly created objects (be they generated by swiping with a stylus or not) to other pre-existing shapes entails masking, because each swipe with that stylus is creating a new object; not just "recoloring" something that already exists.

    The same principle applies to flood-fill features. Illustrator's flood fill feature, so-called "Live Paint," is effectively "autotracing" regions bounded by existing paths to create new paths and then giving the new path a fill. But Live Paint doesn't include any functionality that would let you swipe with your stylus (creating a new object) and then auto-combining it with the pre-existing region in which you painted leaving just the intersection of the two paths.

    As demonstrated, you can emulate that kind of behavior by exploiting Isolation Mode. Another way is to apply Pathfinder Effects or Shape Modes to Layers or Groups and create your new objects within those Layers or Groups. But it all still comes down to one form of masking or another until you Expand, Flatten Transparency, etc.

    JET