Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I am using a clipping mask to cut out some shapes. These shapes are composed of a rectangular "base color" and then some extra shapes overlaid for shading. However, with the clipping mask I get bright outlines where the base shapes show through the shading. See the attached pics:

enter image description here enter image description here

Is this the wrong way of doing this? Is there a way to fix this? I thought it'd be convenient to define the shape in a single clipping mask, so I can modify the shape and coloring/shading separately.

share|improve this question
2  
What happens when you turn of anti-aliasing in the preferences? Generally hairlines such as this in Illustrator are due the anti-aliasing for screen preview and aren't actually part of the artwork. They traditionally vanish upon output. Another option may be to use multiple fills in the Appearance panel rather than multiple stacked objects. –  Scott Sep 16 '12 at 22:07
    
The lines disappear when I turn of AA — to be replaced by jagged edges — but they are still in the exported PNG. What do you mean by 'multiple fills'? –  Noio Sep 17 '12 at 13:00
    
Use the Appearance panel to add fills. You've basically just got 3 fills, you don't need 3 separate objects. Just add 2 additional fills to the bottom shape. –  Scott Sep 17 '12 at 13:05
add comment

2 Answers

up vote 2 down vote accepted

A clipping mask might be the long way around. Try using the compound path for all fills.

Start with your base layer (fill color).

Then copy and paste in front (CMD-F on Mac) fill with your gradient and adjust the transparency. This might give you the desired result without the headache of the thin lines.

If that fixes the problem, make sure you group them afterwards to ensure that they are being moved together.

As a rule (for me) I don't use clipping masks unless I am using rastered images. There are way more ways to create a vector without mucking up the process by putting it in a Clipping Mask. Use the Pathfinder tool as much as you can but be sure you are "Expanding" the vector.

If this option doesn't help with your issue. Try "Flatten Transparency" under object, although the above should give the desired result.

share|improve this answer
    
Heya! This is what I ended up doing, but hoped to avoid. I wanted to be able to edit the shape (clipping mask) without having to re-copy-paste the shading gradient. Separating fill colors and shape seems like one of the intuitive advantages of vector editing. Also, keeping the separate components in the shape (not expanding) allows me to adjust the details of that (e.g: moving a hole that is cut out from the shape). Sad but true, I found that expanding & copying is the easiest & cleanest solution, at the expense of flexibility. –  Noio Oct 10 '12 at 11:28
add comment

This colored-edge effect can't be removed. Actually, there are two layers with the same mask, and illustrator rendering engine use approximation methods, that can't detect identical curves.

That is why white object placed behind identical black object gives a tiny line.

Render artwork in higher resolution, then downscale it.

p.s. Rendering in PNG gives very good results. Maybe, there are optimized algorithms triggered.

share|improve this answer
    
Or use Photoshop, which has far better masking (plus dithered gradients and better antialiasing). Clipping masks in Photoshop don't have this issue. –  Marc Edwards Sep 21 '12 at 3:33
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.