Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for professional graphic designers and non-designers trying to do their own graphic design. It's 100% free, no registration required.

I'm working with Google Maps in making a campus map comprised of a number of tile overlays. Two of these overlays- accessibility (paths) and parking- are layered under other elements (with strokes) which help define it's shape within sidewalks and parking lots:

http://i.stack.imgur.com/Pvvvb.png

However, to create their individual tile overlays, I need to export only what is shown of these two layers as seen in the right side of the below image.

My approach up to now:

  1. Make every element layered below the target layer hidden.
  2. Take every element which exists above the target layer and make their fill and/or stroke black as needed. (Essentially making a mask which compensates for the strokes of the other layers. See below image, left.)
  3. Export the file to Photoshop.
  4. Using Magic Wand or Color Selector, remove the black, resulting in the target layer in the desire shape.

This does exactly what I want and fits perfectly in the space, but it is somewhat complex for other users and leaves some evidence behind of the approach- namely, darker pixels at the edges- in the final product (below, right)

*(Note: In the right image, "white" is equivalent to "transparent".) All elements over are black (left) and final (right)

Thus, my question is "is there a way to include the stroke in 'masking' elements"? For instance, is there a way to make a mask which also includes the stroke on an element rather than just along the drawn path?

Or, perhaps even more fun, is there a way to color/swatch a shape to be "transparent" rather than simply "none" so that it still hides what is below it, but prints/exports as being transparent?

Alternatively, is there any other more simple approach which does not include the following:

  • Combining the render and overlay layers. (Results in 6 overlays rather than 3.)
  • Drawing the overlay layers to perfectly match the sidewalk/lot. (Most higher elements use strokes which are not easily traced, and would be much more work.)

EDIT: Here is an .ai file with a simple arrangement of what I'm working with if anyone would like to play around or get some additional context.

share|improve this question
    
Just so I understand what you are seeking. You want to export the only the areas that the right riles do not cover? Correct? So the green needs to essentially knock out of everything? –  Scott Jul 18 '12 at 20:12
    
Yes, that sounds right. Simply put, I'm looking for a way to fill in the shapes and strokes with "transparency" without actually being transparent themselves; almost as if it were the base of the document. –  Terra Fimeira Jul 18 '12 at 20:35
    
I'm going to try and get an example of the desired end result posted here as soon as a batch of tiles are done, just so it's more or less perfectly clear. –  Terra Fimeira Jul 18 '12 at 20:37
    
hmm.... thinking... I believe the only way to do what you want is via opacity masks, but those can't be on separate layers. Will wait to see your example. –  Scott Jul 18 '12 at 21:16
    
Here's the million dollar question... at any point do you need those green areas to export as well? –  Scott Jul 18 '12 at 21:22
show 1 more comment

1 Answer

up vote 1 down vote accepted

After the comments above, try this.

This is a temporary step to get the export which could then be discarded or undone if needed.

Assumptions....

  • Green objects are on their own layer/layers
  • stripe pattern is on its own layer
  • pink/purple/blue paths are on a layer.
  • the black areas in your image above are simply flat shapes, no effects.

If all of this is true.......

Opacity masks

  1. Select all the black objects in your second attached image
  2. Edit > Cut
  3. Select everything on a layer you wish to mask (like the blue stripes)
  4. Edit > Paste in Front
  5. Pathfinder > Unite (this creates one compound shape from all the black areas)
  6. Select everything on the layer - stripes and black areas.
  7. In the Transparency Panel, click the Make Mask button
  8. Tick the "inverted" option on the Transparency Panel.

This should leave you with only the visible areas on the fill layers which could then be exported. If the green shapes change later, you would need to go through the steps again, deleting the existing mask and replacing it with a new one.

Once you do these steps a couple times I'm certain you could streamline or even create an action to do most of it. For example - copy green shapes, turn off green layer visibility, select blue layer, paste in front, set fills to black, pathfinder > unite, select all, make mask, export.

Another option.....

Clipping Masks

For this to work, all the green areas much touch each other at some point... any point

  1. Duplicate the green layer
  2. Select all on the duplicate.
  3. Pathfinder > Unite
  4. From the Layer Panel menu, choose Make Clipping Mask
  5. Expand the duplicate layer in the Layers Panel so you can see it's contents
  6. Drag all other layers in the Layers Panel below the Clipping Path item in the duplicate layer

The primary difference between these two methods is whether or not the green areas are touching each other. The opacity mask allows you to create masks form any number of shapes regardless of where they are or how they interact with each other. The Second, clipping mask, method requires that all shapes be touching and the mask is a single path or compound path.

Opacity masks can even use gradient fills to create graduated masks. Clipping masks are always hard edged, flat, shapes.



Opacity masks work.....

Using your file I had no issue setting up an opacity mask.

New File Download

screenshot

  1. copy "Buildings", "Detail Layer", and "Green" layer contents.
  2. Create a new layer below the three layers listed in #1.
  3. Drag all other layers into this new layer
  4. Click the circle to the right of this new layer's name on the Layer Panel to select the Layer itself
  5. Choose Make Opacity mask from the Transparency Panel menu
  6. Click the black mask box on the Transparency Panel.
  7. Edit > Paste In Front
  8. Object > Expand
  9. Set fill color to black and stroke to "none" (if it's not "none" already)
  10. Untick the "Clip" option on the Transparency Panel.

As you can see it's pretty straight-forward and I don't really understand where you may have issues with this technique. Not sure where "random spattering" would enter the scenario. You can continually add new sub-layers to the masked layer and the objects will continue to be masked by the shape of the opacity mask. If you need to alter the opacity mask, just click the circle next to it's name, then click the mask thumbnail on the transparency panel. You can then paste in new objects or remove objects as needed. Just be certain they are filled with black and expanded so any strokes are seen as shapes.

share|improve this answer
    
Thanks for the answer, but it would appear I need to give more information. Each green piece is an "island" which defines the sidewalks in negative space and, as such, do not overlap at all, negating clipping masks. As for the opacity mask, there are various features (buildings, stairs, other lines) whose strokes cover these lower elements. My issue when trying the opacity mask is that all of these individual elements would make a random spattering of connections, resulting in filled shapes which cover the main body of the layers I'm trying to isolate. –  Terra Fimeira Jul 19 '12 at 15:53
    
I'll redefine the question somewhat and see if I can't attach an example file which might make the structure somewhat more clear. –  Terra Fimeira Jul 19 '12 at 15:54
    
@TerraFimeira Updated answer. Seems Opacity Masks work just fine, unless I'm missing some big part of the equation. –  Scott Jul 19 '12 at 17:14
    
I need to learn to be more clear it would seem. "Pathfinder > Unite" was the step in your original which skewed all the elements- particularly the stairs layer which would also be part of the mask. I see this updated set of steps works perfectly when testing it myself, and "Object > Expand" is a little option I'll have to remember. Many thanks. –  Terra Fimeira Jul 19 '12 at 18:30
    
First set of steps was my "best guess" without seeing the actual file. Second set of steps were just a tad more specific because I could see construction of layers and objects. The big thing is, as you commented, the expanding. Since without it strokes aren't fully seen on the opacity mask. –  Scott Jul 19 '12 at 18:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.