Jump to content

Vector masking help: SVG export inverts mask


Recommended Posts

I created a vector mask according to the instructions in the help file ("Mask to Below"). The file consists of vector shapes, which I grouped, plus a circle mask. The goal is to see only what's inside the circle. In Affinity Designer, everything displays perfectly, yet upon export the mask is inverted and only what I want to remove from the original image is displayed.

 

If I check "Rasterize unsupported effects," however, then the file exports and only what's inside the circle is shown, but I get a rasterized object in an SVG wrapper, which is exactly what I don't want. (Is a vector mask somehow an unsupported effect?)

 

How can I export the file in SVG format only as vectors? Many thanks in advance for any assistance. (I'm an Affinity Designer beginner.)

Link to comment
Share on other sites

  • Staff

Hi Alkan,

 

Is it possible that it's actually working and there's a bug in our SVG import that is removing the crop? I know we have a bug in that area that I need to fix and in trying to replicate the issue to give you advice I just found that my crop shape disappears on import - but is there in the exported SVG (just choose to open in Safari to see it)

 

Thanks,

Matt

Link to comment
Share on other sites

Hi Matt, thanks for your quick reply. It does look to be a problem with export, at least in my case. (Or it could be that as a beginner I don't know what I'm doing.)

 

When I export as vectors (with no rasterization selected), the inverse of the masked image seen in Affinity Designer gets exported. I see this both in Finder and when I show the exported SVG in Safari.

 

Any other ideas?

Link to comment
Share on other sites

  • Staff

Ah, okay... I've had a look at the file... The reason it's failing is that your group is masked by an ellipse that is within a layer and you're masking the whole group by that layer. Instead, drag the whole thing out so it's not a mask any more, then open up the layer and just select the ellipse. Now drag the ellipse to the right of the group's thumbnail in the layers panel to use just the ellipse as the mask. Now it should export correctly.

 

There is no logic in the code to check for whether the masking structure is a layer of just one item or many and it assumes the worst so doesn't mask to it properly. If you just use the ellipse itself as the mask then it will work :)

 

Thanks,

Matt

Link to comment
Share on other sites

Thanks so much, Matt! I would have never figured that out on my own.

 

The SVG export works now, and the exported file correctly displays as a circle in both Finder and Safari. Strangely, though, when I open the exported SVG in Affinity Designer, it has the original shape and there's no circle to be found among the layers.

Link to comment
Share on other sites

  • 4 years later...

Same problem, but new unsolved issue... 
When i import my pure vector circle .svg files (who looks perfect in browser preview) into icomoon svg to font library converter, the mask is gone?

icomoon-mask-gone.thumb.png.92e63e9d7c8b9af4e9b02dcf2ebb9a63.png

 

 

Edited by Thomazb
needed image
Link to comment
Share on other sites

14 hours ago, Thomazb said:

Same problem, but new unsolved issue... 
When i import my pure vector circle .svg files (who looks perfect in browser preview) into icomoon svg to font library converter, the mask is gone?

I expect IcoMoon ignores masks and you will need to actually trim away the geometry that lies outside the circle, rather than use a mask. To do that, make multiple duplicates of a circle and Boolean intersect each of the red, white and blue shapes with a circle.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.