Illustrator 101 - Opacity Masks

Opacity Masks are all over the web. Here's a short tutorial on how they work in Illustrator and how you can use them in your designs.

Creating highlights

We are going to create a shape with a highlight using an opacity mask. If you would like to work through the example there is an illustrator file for this example.

Opacity Mask in Illustrator

What is an opacity mask?

An opacity mask allows you to mask off an area of an object and then selectively let whatever is underneath show through. The word opacity is a measure of how see-through an object is. The more opaque it is the less see-through it is. So adding a mask means that you are allowing some light through but not all. This is very useful for creating a realistic light effect. In the real world light defines a shape by the way it reflects off it. In Illustrator we can get very close to this by using opacity masks.

The anatomy of an opacity mask

Think of an opacity mask like a sandwich. You first you have the base shape. In this case it is a circle with a simple gradient and stroke applied to it:

Base Circle

Then there is the highlight that you want to show through. In this case I've used the pathfinder panel to create this highlight shape but you use the pen tool or anything.

Highlight for Opacity Mask

Then comes a layer to control the opacity. I've copied the highlight shape and filled it with a black to white gradient. When we apply the opacity mask white will show through and black will be masked so I've mimicked the light source coming from the top left.

Gradient for Opacity Mask

Seen in 3D the layers stack up like this:

3D diagram of Opacity Mask

Making the opacity mask

To make the opacity mask select both the highlight and gradient layers. call up the the Transparency Panel (Window > Transparency). In the top right hand corner is a flyout menu where you can click Create Opacity Mask.

Making the Opacity Mask

That's all there is to it. This is just one way you can create realistic light effects in Illustrator.

Opacity Mask in Illustrator

If you haven't yet got a copy of the illustrator file you can get it here.

Comments

Kennar
Aug 19 2007

Thank you for this nice tutorial. go on and show us your creative side in Illustrator.

norven Neodhel
Sep 12 2007

nice…

ryan
Oct 18 2007

thanks for the tutorial, howevor i couldnt get it to work with any other shape or color :(

Subash Ch. Sahu
Nov 13 2007

Thanks

A good study on mask

ciddo
Feb 17 2008

nice and very clear, many thanks!

Have your say

Post details

16th August 2007

5 Comments

What's this?

This is a journal entry written by George Ornbo, a web designer who lives and works in London, England.

Subscribe

Journal articles by RSS

Journal articles by Email

Recommended Links by RSS

Participating / Attending

Inclusive New Media Design

dConstruct 2008 - Designing the Social Web

Member of the 9 Rules Network Media Temple