0

I have a group of shapes that each have their own unique gradient fill. I would like to use the union of those shapes to create an alpha mask for an image behind it.

In other words, I want the union of the alpha mask effects on a bitmap/image.

Things I've tried:

  • union of the shapes, but I loose the fill information.

  • flattening shapes to bitmap, but it seems there is no way to mask a bitmap with a bitmap (use as mask is not selectable)?

Here is a screenshot of example shapes I'm talking about:

screenshot

  • an aplha mask is a greyscale bitmap. Can you merge the shapes so you only have the mask on a white background, then copy'n'paste that into a blank alpha mask layer? This may entail a secondary temporary image/export to a raster format. – Yorik Nov 6 '15 at 15:31
  • hi @Yorik. when I merge the shapes loose the unique fills for each shape. how do i prevent that from happening? – mattr Nov 6 '15 at 15:40
  • rasterize each shape first, then merge the layers. – Yorik Nov 6 '15 at 17:01
1

Let me see if I understand the scenario:
You have several shapes, each with a different gradient fill, which you want to merge into one, keeping the unique fills, and apply that as a mask over an image. In Sketch.

Two things to keep in mind:

  1. Sketch is not a photo editing environment. I don't know if it does alpha channel masks, but I really wouldn't want it to take on that bloat.
  2. Merged shapes are stylistically merged as well. You can't have separate style settings between the constituent parts.
  • hey @plainclothes. Thanks for answering! On #1, Alpha masks are supported in Sketch for single shapes: sketchapp.com/support/documentation/04-shapes/4-masking.html. I simply want the union of that masking effect. On #2, thanks for some clarification. – mattr Nov 6 '15 at 19:08
  • In my experience, the alpha thing is very spotty. Does it ever work for you on raster layers? – plainclothes Nov 6 '15 at 19:22
  • Yeah works fine as single shape on bitmap. Thinking about I guess I could just copy the bitmap - one for each shape - apply the masks individually to each bitmap and just group the results. I'll try that. Thanks again you def got me thinking! – mattr Nov 6 '15 at 19:45
  • Glad to be a sounding board ... if I were you, I'd be spinning up Affinity Photo right now (^‿- ) – plainclothes Nov 6 '15 at 20:11
0

Following this pattern seems to work:

Gradient on top with a group of objects as the mask on bottom

Place a gradient above a group of objects joined together with the Union Operation (boolean), then hit the mask button to create the desired effect.

Note that the mask objects are not in a literal group (e.g. via Ctrl/Cmd + G), but simply "grouped" together using the Union option.

  • Hi Skyler, welcome to GDSE and thanks for your answer. If you have any questions, please see the help center or ping one of us in the Graphic Design Chat once your reputation is sufficient (20). Keep contributing and enjoy the site! – Vincent Dec 28 '15 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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