Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AI: Element (circle mask) is lost after exporting to svg

Community Beginner ,
Oct 04, 2022 Oct 04, 2022

Hi all, I have no idea why I'm losing an element which is a circle mask after exporting to svg. Im using AI 26.5 (64 bit). Export to PNG works fine. I tried different configurations in dialogue window but non of them  worked. The picture I want to export is a simple icon with 2 elements (two circle masks). Grouping and ungrouping elements doesn't help. Any idea?

TOPICS
Draw and design , Import and export
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 04, 2022 Oct 04, 2022

Hi. SVG format has issues with semi-complex graphics, masks, etc. You can try expanding the graphic before exporting.

 

Marlon Ceballos
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 04, 2022 Oct 04, 2022

Hi Marlon, expanding doesn't work either, unfortunately. The key issue is that the final object must have some transparency within its shape.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2022 Oct 04, 2022

In my opinion, is better to use SVG format with simple shapes, any "extra" could produce unexpected results. If the graphic has opacity, complex gradients, etc, I prefer to use a bitmap format like png.

 

Marlon Ceballos
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2022 Oct 04, 2022

So you export the SVG and then you check it out in a browser and then the mask is not there?

 

Or does the mask disappear after re-opening the SVG in Illustrator? That is something you should avoid at all costs. Never, never ever use SVG as a work file format in Illustrator. Your work file format should always be AI. Use SVG only for export.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 04, 2022 Oct 04, 2022

Exactly, I export the SVG and then I check it out in a browser which shows that the mask is missing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2022 Oct 04, 2022

How did you make the mask? With the button in the layers panel or with Object > Clipping mask > Make (resp. Draw inside)?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 04, 2022 Oct 04, 2022

I did it with the transparency settings window: [marking objects] > Transparency > Make Mask

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 04, 2022 Oct 04, 2022

That's an opacity mask. Probably SVG cannot do it the way Illustrator does it, so the mask gets lost on export.

 

You might need to read about the SVG file format to find out how masking works in SVG and then do some tests in Illustrator. You could also flatten transparency, but that might leave you with some rather complex artwork.

 

For a start: https://webdesign.tutsplus.com/tutorials/a-comprehensive-guide-to-clipping-and-masking-in-svg--cms-3...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 05, 2022 Oct 05, 2022

I used Exclude Shape mode and it worked. The effect in AI is the same as using opacity mask, but this time SVG export went fine. Thank you. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 05, 2022 Oct 05, 2022
LATEST

Glad you could get it to work and thank you for the feedback, which will help others.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines