August 1, 2006

ASK MORDY: you gotta read between the lines with masks

Today's installment will cover two questions I received on the same subject: masks.

The first question is from Scott Southerland, who asked:

Our bread and butter is packaging in Illustrator. This is the second time I've run into this mysterious dotted underline type layer thing. What is it, how does it get created? Where do they come from? :)

What Scott is referring to here are layers that appear in the Layers palette with a dashed underline beneath the name of the layer (or object). See the Group that appears at the bottom of the Layers palette in this screenshot:



If you select that Group and take a look at the Appearance palette (you know me), you'll notice that Illustrator indicates the Group as the target, and the target also has a dashed underline beneath it.



So what's with the dashed line?

The answer is that the dashed line is an indication that the object (or Group in this case) is an opacity mask. With the mask selected, you can take a look at the fully-expanded Transparency palette to see both the artwork and the mask.



The palette also allows you to disable the mask (Shift-click on it), edit the art and mask separately, or to release the mask (from the Transparency palette fly-out menu). Of course, there's plenty else you can do with opacity masks. I've spoken about them here, and of course, you can get more detailed information in the book.

This leads us to our second question, which was posed by long-time friend and artist supreme Ron Chan:

I came up with this strange anomaly that I never really thought about all the years I've been doing it - until I went through it step by step.

1 - Start off with two simple shapes
2- Make a mask (clipping mask) using the top object
3- Direct select a path segment of the mask and copy and paste in front
4- Complete the shape and fill it with a color
5- The shape is INSIDE the mask or at least is giving the appearance of being masked -- but how can that be? The shape is sitting on top of the mask! If you look at the layers the stacking order confirms it. Additionally, if you take another object, direct select the masked object, then paste in front -- that object also becomes part of the mask but is sitting two levels above the Clipping Mask (although it is still in the Group).

I always thought that an Clipping Mask always had to be on the top of the stacking order?

More weirdness. When I close and reopen the file again, the stacking order changed! The Clipping Mask is back on top of
everything. So I did it again, and yes the object is on top of the clipping mask but is still affected by the mask. I closed the file down and opened it up again -- viola! The stacking order changed so that the object is below the clipping mask.

Am I going crazy or what???


And so, the masked crusader strikes again! This is precisely why I urge people to utilize Layer Clipping Masks rather than just use the Object > Clipping Mask > Make command. Not because the result is that much different, but because it exposes something in the user interface that you might normally overlook. I discuss Layer Clipping Masks in detail here, and of course, you can find more detailed information in my book as well. But your question does require a bit of an additional explanation of how these things work.

First, it's always important to take a look at the Layers palette when working with masks. As we revealed in the first question above, items that are opacity masks show up with dashed underlines in the Layers palette. Well, items with a SOLID underline are clipping masks. When you create a Layer Clipping Mask, the object that is the topmost object in the layer becomes the mask for that entire layer. But here's the kicker -- once you've turned an object into a mask, it stays a mask, even if you change the stacking order. That means if you turn an object into a clipping mask, then change the stacking order in your layer so that the item with the underline (the mask) is not the top-most object anymore (see screenshot below), that object will still mask objects that appear above it, within that layer.



It appears that when you close and reopen the file, Illustrator moves the mask back to the top of the stacking order for you (maybe Teri can explain why -- maybe it's just because Illustrator cares about your sanity).

When you specify masks using the Object > Clipping Mask > Create command, Illustrator groups the objects together and makes the topmost object the mask (if you look within the Group in the Layers palette, you'll see it underlined) -- but again, once the mask is created, even if it's moved to a different spot in the stacking order, it will still act as a mask for that entire group.

In all of these cases, the solution is to release the mask, change the stacking order as desired, and then to reapply the mask.

5 comments:

mleavitt said...
This comment has been removed by a blog administrator.
mleavitt said...

Personally, for ease of quick keying, I use the "object>clipping path>make" option over the opacity mask - it just seems faster to me to just stack, select and quick key them into a clipping path. I find it too time consuming to switch back and forth in the transparency palette, not to mention I don't like the path being "invisible" in outline mode.

Though it is great to use when making gradient masks in illustrator - especially noting your great column on gradient masks and spot colors.

It would be nice if the mask was more like photoshop somehow and showed it in the layer palette.

Unknown said...

Instead of using Object > Clipping Path > Make, have you tried using the Layer Clipping Mask button on the bottom of the Layers palette? That's just as fast to use and makes it easier to visualize.

I still do use Command-7 for quick tasks though -- I'm not writing off that feature.

Having the layer masked displayed in the layers palette is an interesting idea. I could see that such a feature would be useful if implemented in a way where it didn't make the layers palette too unwieldy.

Anonymous said...

While the transparency palette opacity mask and a clipping mask can be used for the same thing, its important to note that they aren't equal, in that there is no way (that I'm aware of) to do alpha blending with a regular clipping mask. In opacity masks, you can use gradients, multiple shapes (similar to making a compound shape into a clipping mask) and even gradient meshes as the opacity mask.

I'll often use them together, with a clipping mask to define the absolute border of an object, and then an opacity mask to define the subtle gradients of an object within.

Anonymous said...

Play free game kanser youtube video directory oyun adult porno sex shop image hosting
japan auto store ara utube ytube video share online games adult

Kanser -
Akciğer Kanseri -
Rahim Kanseri -
Lenf Kanseri -
Mide Kanseri -
Yumurtalık Kanseri -

Play game -
Play mario -
sim taxi -
Play game -
Adult games -
Play game -
Play game -
Youtube video

Play action games -
Play arcade games -
Play casino games -
Play misc games -
Play puzzle games -
Play game -
Play shooting games -
Play sport games -

About everything -
you tube video -
Hediye -
Play free game kanser youtube video directory oyun adult porno sex shop image hosting
japan auto store ara mario games erotik fantazi fantezi iç giyim utube ytube tube
video share online games adult
Porn tube

Japan autos -
Alışveriş -
Sex shop -
Image hosting -
Image hosting -
Porn Video -
Porn Video -
Porno Video -
Play free game kanser youtube video directory oyun adult porno sex shop image hosting
japan auto store ara mario games erotik fantazi fantezi iç giyim utube ytube
video share online games adult tube
Porn tube
Porn Video -
Youtube Video -
Sex Shop -
Sex Shop, Kozmetik -
erotik iç giyim -
Sex Shop -
Video Hosting -
Porn Video -
Hediye -
porno -
Directory -
Directory

Play free game kanser youtube video directory oyun adult porno sex shop image hosting
japan auto store ara mario games erotik fantazi fantezi iç giyim utube ytube
video share online games adult tube