January 22 2008 • 3:33 PM

Turn Any Object Into a Transparency Mask

A mask covers your face so you can’t see it, right? And masking tape covers something so that when you paint over it, the thing under the tape (usually a wall or a window) doesn’t get painted. Digital masking tape is the same: It covers or masks something so you don’t see it.

Last year I pointed out Pariah Burke’s trick for masking things with text. But I had completely forgotten about it until this morning when I needed something like it… but in this case, masking with a non-text object. So, just in case you didn’t see his post, or, like me, you didn’t put it in your brain in the “this works with anything, not just text” category:

You can make any object or text or path into a transparency mask in InDesign. For example, here are two pictures, along with some text and a starburst polygon:

mask1
mask1

The trick to making the text and starburst into masks is first to set their opacity to zero percent in the Effects panel (Transparency palette in CS2) so that they disappear:

mask2
mask2

Then group those objects with what you want to apply the mask to (in this case the brown mosaic photo), and turn on the Knockout Group checkbox in the Effects panel.

mask3
mask3

That’s it! Knockout Group means “make the objects in the group opaque to each other,” but it also appears to mean “apply transparency effects to the group as a whole” so InDesign applies the zero percent opacity to the mask objects and the objects they’re grouped with.

Okay, I sound like I think this is logical and proper, but the truth is, I’m quite astonished this works at all.

17 Responses discussing this post. Add yours below.

  1. Eugene Tyson
    January 22nd, 2008 • 3:51 pm

    Wow, that’s inspirational, I could never reason why I would use the Knockout Group though, I didn’t ever need a use for it. My first thought on this would be to make a compound path.

    I would do this by Selecting the Shape and then Selecting the Background (the mosaic in Davids Example) and then using the Pathfinder to Substract (or Paths>Create Compound Path).

    You can always release the compound path if you don’t want the knock out any more. Although, you do have to make the text outlines, otherwise you get a blank shape of your text box.

    *awaiting onslaught for using this technique*

    Many thanks for posting the idea and technique, I’d never have dreamed of doing it like that. It’s great.

  2. Branislav Milic
    January 22nd, 2008 • 3:51 pm

    Hi Dave

    Maybe I’m missing something but what is the difference with the trick I have explained here on InDesign Secrets Podcast #21 http://indesignsecrets.com/indesignsecrets-podcast-021.php ?

    “A transparent Object with an opaque shadow” ?

    -> http://www.milic.com/indesign/formations/didacticiels-pdf/idtt/milic-id-transparencycooleffects.pdf

  3. DrWatson
    January 22nd, 2008 • 4:02 pm

    “Okay, I sound like I think this is logical and proper”

    Don’t worry, you don’t ;) I don’t have a clue why this works as it does, but it’s good to know! Now this is an “obscure feature of the wee-ee-ee-k, isn’t it?

  4. Eugene Tyson
    January 22nd, 2008 • 4:24 pm

    Wow Branislav, that PDF is great.

  5. Klaus Nordby
    January 22nd, 2008 • 5:53 pm

    David, thanks — kinda weird, maybe, but it’s Real Knowledge still. And it helps me to better understand the Knockout Group option, which, together with Isolate Blending, still isn’t crystal clear to me. How about expounding lucidly on these matters in a podcast? (OK, maybe you already did so, in #8 or #13, but hey, I can’t be expected to carry a mental inventory of your entire oevre in my poor head!)

  6. Klaus Nordby
    January 22nd, 2008 • 6:02 pm

    I could always earlier have found ways to make “holes” in a graphic, with masks or Pathfinder operations. But what is so great about this approach is that all text in the group which is used to cookie-cut the graphic still remains normally editable and movable! Such flexibility is a great gift to all us deadline-ruled creatures.

  7. Klaus Nordby
    January 22nd, 2008 • 6:54 pm

    David’s Illogical Mask Trick can also work some soft, alpha-channel wonders if you use, for instance, a Directional Feather or Gradient Feather on your InDesign mask object. To create such soft-edge cooking-cutting, I would previously have made an alpha mask in Photoshop on a bitmap image — but that turns out to be quite unnecessary now! Furthermore, David’s Illogical Mask Trick also works fine on all kinds of text and vector graphics, so we’re not limited to pixel graphics. And we retain infinite editing flexibility.

  8. David Blatner
    January 22nd, 2008 • 7:24 pm

    Eugene, compound objects sort of work, but they’re a major hassle. More importantly, however, you can’t make a soft-alpha-edge mask with a compound object, as I showed above.

    Branislav, I knew you had done those cool transparency effects, but I couldn’t find the link to the PDF! Thanks for reminding me where that is on our own site. Yes, Branislav’s PDF is a “must read” for ID users.

  9. Eugene
    January 22nd, 2008 • 8:15 pm

    Hi David, I was actually just explaining how I used to do it (up until today), the soft edges is a sweet touch and certainly a nice concept.

    Every time you guys make a new post I learn something new.

  10. Mike Coyle
    January 23rd, 2008 • 9:45 am

    Great and such a simple technique. Only yesterday I had used the pathfinder to create a similar effect. This is much better. Thank you David.

  11. Tiffany Hamilton
    January 30th, 2008 • 4:42 pm

    Does anyone know if you can create 3D effects in InDesign? I know about the drop shadow feature but was looking for something similar to the 3D effects you can do with shapes in Powerpoint. Thanks

  12. John Stanfield
    February 4th, 2008 • 7:20 pm

    Is there any way to exclude the text frame from the mask? Even with the stroke set to “None” it still is knocking out?

  13. David Blatner
    February 5th, 2008 • 5:00 am

    Tiffany, sorry, I don’t know of anything like that other than my favorite InDesign vector plug-in: Illustrator! It works great, and you can copy and paste vectors back and forth.

    John, the text frame is knocking out? Are you sure it’s really knocking out in the final PDF or print? Not just on screen? I see the frame knock out, too, until I go into Preview mode (press W) or print or export. Just a screen artifact, I think.

  14. John Stanfield
    February 5th, 2008 • 1:31 pm

    Thanks David! That’s all it was. Man! What a cool trick!

  15. Martin
    February 5th, 2008 • 3:02 pm

    Thanks David and Branislav! fun tricks :)

  16. S.M.Nawaz kukkikatte
    February 8th, 2008 • 11:31 am

    thanks David! very nice technics

  17. Cian de Locke
    March 11th, 2008 • 12:37 pm

    John Stanfield said:
    February 4th, 2008 at 7:20 pm
    Is there any way to exclude the text frame from the mask? Even with the stroke set to “None” it still is knocking out?

    Hi John: Try Command Ctrl H to Show/Hide Frame Edges

Subscribe to the Discussion

Get the ongoing discussion surrounding "Turn Any Object Into a Transparency Mask" delivered to you. Click here to subscribe via RSS.

Leave a Reply

You can use limited HTML tags, such as <em></em> for emphasis/italics and <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

InDesignSecrets reserves the right to edit and/or remove posts and comments.