Opacity Mask Basics: Illustrator
Hi all, I just got back from 4 days away from home, so here is something to chew on while I get back into the swing of things. If you have ever downloaded (or not) one of my free sets of buttons or webpage elements, you might notice that I use a lot of opacity masks in my Illustrator files. I do this for a number of reasons, some of which may be obvious, but I would like to clarify a little better on how to use these (opacity masks), and why.

An opacity mask is essentially like a mixture of a clipping mask and a layer mask at the same time. in other words, you can use an opacity mask to control the appearance (transparency of a shape) using, in most cases, a black to white gradient. Because you can’t fill an object in Illustrator with a gradient that has transparency, we can use a mask to take away all of the areas covered by the black part of the gradient (or gray in some cases). There are many uses, which I’m sure you will discover rapidly on your own, and soft opacity gives illustrator a whole other dimension to work with.
An “Opacity Mask” refers to a mask in Illustrator that you place over an existing shape that controls its transparency based on the values of black and white in the mask. White being visible, black being transparent, and all shades of gray are in between on the opacity scale.
Try it:
First make a background shape so you can see the mask work (I used dark brown).

Select your background shape and lock it. You can do this by hitting Command + 2 Mac, or Control + 2 PC. Or the object menu:

Now make a shape on top of your background and fill it with a different color.

Now we need to make a mask for our shape. The easiest way I’ve found is to use “Offset Path,” because it is more precise than simply making a new shape on top. Keep your top shape selected and go to the Object menu and select Path > Offset Path.

Offset Path Settings: I usually set this to a 2 pixel offset, with the Miter setting. (positive pixels makes the new shape bigger, negative smaller). I’m not sure what miter limit is yet, haven’t played with it. I usually leave it at the default value.

Once you click ok, Illustrator will make you a new shape, perfectly aligned with the original, and 2 pixels larger on each side! Like this: (Showing in wireframe view)

The only problem is (from my experience) Illustrator might place the new shape behind the original. Now simply select your new (bigger shape) and bring it to the front.

Now fill your top (mask) shape with a black to white gradient.

Once you have your gradient fill, select both of your shapes Like this: (You can simply do this by clicking and dragging, since we locked our background)

With BOTH shapes selected, go to your transparency palette, and in the upper right, click on the little arrow. (Palette Options) Select “Make Transparency Mask.”

Result: All areas of the gradient containing white will be opaque. All black will be transparent, and grays are a mixture (the fade). If you don’t want to take your shape all the way to transparent, replace your black side of the gradient with a shade of gray.

Tips for exploring this on your own:
1. This can be applied to ANY shape, so think outside the box, but be aware that it increases file size quite a bit, so keep an eye on file size if you find illustrator running slower.
2. The gradient is the master. Change the gradient, change the mask, but you must use black and white.

3. Explore your options in the Transparency palette (mask is clipping) For example, you can use a simple shape and have a complex Opacity mask if “Mask is Clipping” is enabled. In other words, take advantage of this feature as not only an opacity mask, but a clipping mask at the same time. This gives you greater control over the starting and ending values (opacity) of your gradient.

4. There is no (as far as I can tell) shortcut to apply an Opacity Mask. If you want to backup, you will have to release the mask in the same way you applied it; from the Transparency Palette Options, or undo.

Related Posts:
- Glossy Vector Web 2.0 Logo Text in 5 Easy Steps
- Improve Your Illustrator Workflow with Layer Masking
- Tutorial: Web 2.0 Logo Reflection in Vector format with Illustrator
- Illustrator Tutorial: How to make a Vector Glass Button
- Illustrator Tutorial: How To Make 3D Vector Vintage Stars
- Free Vector Fading Corner






BittBox, your tutorials are, as always, fantastic. I consider myself a fairly advanced Illustrator user, but I always seem to find something to take away from your articles. In this case, I haven’t even begun to explore the possibilities of the Opacity Mask….thanks for a great read and keep up the awesome work!
Pls inform us next time, if you’re taking off anything longer than 1/2 day so that I can do something useful besides F5-ing on this site. Welcome back! We love this site!
^^ Try using RSS feeds. ;-)
I already found out about opacity masks while dissecting your earlier designs and I’ve been using it ever since.
I agree with Alex… I too am fairly up-to-speed with Illy, but I find your tutorials help me apply that knowledge in a better way…
Thanks. Keep them coming!
Ben
Thanx. Exactly what I needed.
Miter limit is the distance that the stroke will extend past the point on a corner. If you have a very acute angle and a hard corner setting on the stroke you have to raise the miter limit so the point will extend all the way instead of coming to a flat stop.
I know I said this before, but along with the gradient, one of my favorite things to use with an opacity mask is a grungy texture. I generally get a free one from Mayang or TextureKing (like tree bark) because I can convert it to grayscale and then do a Live Trace. That way, it’s a vectorized texture with the gray tones needed for a soft gradient-like mask. It’s a great way to add cracks and dust, etc.
Thanks, BB, for all the freebies! I now keep a Bittbox folder on my hard drive. =)
One thing you may find handy in duplicating your shapes or objects - copy the object (Command/Control C) then use Command/Control B to paste in back or Command/Control F to paste in front. You can see these in the Edit menu, too. These are a huge time saver for me and help me be sure that my new object is where I want it to be.
Liz, thanks for that tip about using TextureKing for cracks and dust and things. Iv’e got a cool ist of Grunge Tutorials over at my blog if you want to take a look. It’s from Tutorial Blog.
http://tutorialblog.org/grunge-photoshop-tutorials/
Hope that helps.
This is without a doubt, THE BEST ILLUSTRATOR TUTORIAL site on the net!
Keep ‘em coming, Bittbox!
*Thumbs Up*
Yet Again! Another great tutorial!
One thing to watch out for is when sending anything with transparencies (Opacity masks, Drop Shadows, Outer Glows etc..) to the printer.
The printers we use often have “issues” with these kinds of effects.
On a lighter note… Great Job Bittbox!
Shameless Plug
gautch,
I agree, illustrator effects can produce nightmares with printers/pre-press. I like to use Illustrator effects in pieces and import/rasterize them in Photoshop as a background image/s.
This way printers have no problems, Yet you still have the power to open the vector files and change color combos no problem, and re import. You can also include the illustrator/vector files while sending them to press if you like, allowing the printers to color correct and resave as a flattened raster file and relink in say, inDesign.
The best part, archiving them for a future project! (the design elements that is)
~BittBox
you are GREAT! I need it!
[...] Opacity Mask Basics: Illustrator | BittBox An opacity mask is essentially like a mixture of a clipping mask and a layer mask at the same time. in other words, you can use an opacity mask to control the appearance (transparency of a shape) using, in most cases, a black to white gradient. (tags: Illustrator howto design images) [...]
Amazing! Thank You!
i just creamed my pants!
Excellent tutorial! There aren’t enough good tuts out there on masks…especially in Illustrator. Keep up the awesome work!
Great tutorial, but I need some help. It seems no matter what I do, I can’t seem to get the black side of the gradient to be completely black. As a result, I can’t get the object to fade out completely on one side. I’ve got the K value pushed up to 100% but no cigar. I’m in RGB mode. It works in CMYK. Is it possible to get full black in RGB?
thanks
~Will
wmarple,
I’m not sure why you would have this problem unless your mask is way to big and the black part of the gradient isnt directly on top of the object you are fading. Try playing with the sliders on your gradient to add more area covered in black. RGB black is 0, 0, 0.
~BittBox
I don’t know what happened but I couldn’t do it for the life of me yesterday, but today it’s perfect. Wierd. Anyway, thanks so much for your generous contributions to the design community. I greatly appreciate you!
Thanks,
~Will
I don’t know what happened but I couldn’t do it for the life of me yesterday, but today it’s perfect. Wierd. I’m pretty new to design, primarily a front end web designer (XHTML and CSS), and I use illustrator and photoshop pretty much exclusively for my image related tasks. I’ll let you know when I’ve got something decent published for you to see my stuff (my latest non-decent attempt is here: http://www.brendakellyministries.org). Anyway, thanks so much for your generous contributions to the design community. I greatly appreciate you!
Thanks,
~Will
Hello! Good Site! Thanks you! iiltevqmgcma
Hello, I need to make a object open in pro animator from an illustrator file
when i use pro animator it says no vector found?
What are the steps to make a vector of my object for pro animator to recocnize as a vector?
Thanks
@markus rock
I’ve never used pro animator, but you can try to save the illustrator file as an eps, it’s more universal. Then try and open it in pro animator.
~Bitt
I had the same issue with the opacity mask not going completely transparent at the black end. The problem seems to be that the default black to white linear gradient in Illustrator is not as black as it’s supposed to be. Replace the “black” from this gradient with the black from the RGB swatch palette (or make your own gradient from scratch) and you’re good to go.
Another nice tutorial from your box …BitBox….!!!
Just what I was looking for. I had downloaded a bunch of your glass buttons but wanted to figure out how to do the same with a different shape. I couldn’t get it to work until I followed this. Great stuff. Thanks.
Just what I was looking for. I had downloaded a bunch of your glass buttons but wanted to figure out how to do the same with a different shape. I couldn’t get it to work until I followed this. Great stuff. Thanks.
OMG thank you so much!! you saved my work!!
As always, your tutorial has answered another one of my age old Illustrator questions.
Thank you so much for providing such top quality, useful tutorials!!
Hey that’s a great tutorial. Let me try, if I can do that.
Hey, I used the opacity mask last. But i’m not quite satisfied with it. de black area isn’t realy transparant, i still see a bit of the original and there ain’t no nice lapse.
I also showed and asked my teacher at school (who is a designer and works a couple of years with illustrator) and even he didn’t understand why i didn’t worked the way it should work. He says it’s a CS3 bug.
I love this site. I am very new w/ illustrator so this is probably a newbie question. After I am done creating my transparent gradient opacity mask I cannot view any of my previously created layers. There is just the opacity mask layer. What I am I doing wrong?
Wow! I have tried and it worked out very well. Thanks for sharing such a great tutorial.
thanks for the tip about the black not being black. it was really messing with me why i couldn’t get complete transparency!.
Great tutorial. It helped solve a problem I was having with making a precise mask. Thanks!
Thank you so much!!!
:)
greetings from Cracow, Poland
Thank you for such a lovely tutorial!!
I’m just having trouble with my transparency palette… it doesn’t look the same as your’s. All I have is the blend mode drop-down and the opacity slider. I click “Make opacity mask”, but my object just goes blank. Am I doing something wrong? I’m using Illustrator CS3.
If anyone could help, that’d be great! :) Thanks again, Bittbox!
Nevermind, I *just* figured it out… I need to click “Show options” above “Make opacity mask” in the Transparency palette flyout menu to see the same options as everyone else. :D
I had the same problem as wmarple. No matter what I seeminlgy did, I could never get 100% transparency on a gradient in the opacity mask.
The solution was this: If you convert your document from CMYK to RGB, make sure that you convert all your blacks from CMYK/Greyscale to RGB.
Just switching the mode in the color palette does the trick, apparently.
good job!…i like it!
Just what I was looking for.
…just to confirm (again) that the “switch” between grayscale and RGB works… that solves the “not completely transparent” problem… must be a bug in CS3.
Oh, and btw, excellent tutorial! :D
Wonderful! Thank you.