Jump to content

Recommended Posts

Posted

Hi there. In short I switched from Adobe Illustrator to see if I can do what I do with this software. My usage is based on vector environment only. I'm now in my sixth month with it and it's been a bit of a struggle but I managed to find answers and workarounds. However this one is beyond me. 

Every time I try to export artwork that contains shape with transparency mask it rasterizes it. When I choose "Rasterise Nothing" in PDF Export settings, it ignores that mask altogether. 

Is it possible to get vector/post script PDF file with vector transparency mask?

Thanks

Test.afdesign

Posted

Hi @sharpblur, welcome to the Affinity forums!

I can't open V2 documents but created one from the preview of your file: A torus with gradient + transparency, exported as vector only. See attached Affinity and PDF.

gradient transparency.afpub  gradient transparency.pdf

Bildschirmfoto2024-11-15um19_47_47.jpg.eb95150e5abc63e10cfbcdb668999860.jpg

Nevertheless you are right, a pure vector output an be tricky in Affinity and often impossible with certain settings like Layer Effects, Adjustments or certain Blend modes.

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted

I have not managed to do this..., neither in version 1 or 2. Affinity apps do not support even PDF encoded Smooth shading shapes as opened vectors [so it is not a matter of ability of not being able to open native .AI data], so it seems that rasterization is unavoidable [unless just trying to passing through, and in many cases, even then, failing], no matter what.

Posted
37 minutes ago, lacerto said:

I have not managed to do this...

I wasn't able to do it either. Designer v2.5.5 on Mac (Ventura).

I tried a few different approaches, but haven't been able to do what @thomaso was able to do in Publisher v1. I only tried Designer v2.

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted
31 minutes ago, Ldina said:

I tried a few different approaches, but haven't been able to do what @thomaso was able to do in Publisher v1. I only tried Designer v2.

That is a very interesting notion [and very useful to know it is natively possible, so thanks to you and @thomaso]. While I was able to reproduce a vector-only PDF export from the Affinity v1 file by @thomaso using Affinity 2 apps, I have not so far been able to open equivalent construction from within a PDF file, and even when opening of vector-only Affinity based PDF file in an Affinity app and subsequently exporting, rasterization will happen.

Posted (edited)
1 hour ago, Return said:

I exported @thomaso afpub file from afpub2.5  to pdf/x4 
Opening the pdf again in afpub and xara designerpro and a pdf viewer it is vector with a mask applied for the transparency.

Didn't work for me when exporting to PDF/X-4 from Designer 2.5.5. I tried 'Rasterize Nothing', and the standard PDF/X-4 preset. Rasterize Nothing discards the mask entirely.. Standard X-4 rasterizes it. Maybe it only works with Publisher?

Edited by Ldina
EDIT: I just tried Thomaso's file and the OP file from Publisher v2.5.5. I exported to PDF/X-4, with Rasterize Nothing checked. Both files discard the Mask and lose transparency. If I use standard PDF/X-4, it retains transparency but rasterizes the vector

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted

@Return Thanks.

The original file (Test.afdesign) provided by the OP uses a Gradient to apply color to the main "donut". I used the Transparency Tool to add transparency directly to that same Curve Shape and deleted the other masking layer in the original file. 

This DID export fine to PDF/X-4 from Designer v2.5.5 and retained both the transparency and vector, without rasterizing anything. I reopened the exported file in Designer and interestingly, Affinity added a Mask to the shape during the export to PDF/X-4 to create the transparency (I didn't add it when editing the file). I did have Allow Advanced Features checked during export to PDF/X-4. So, maintaining vectors and transparency was possible to do from Designer (at least in this simple example). 

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted

Here's an interesting twist....

I opened the PDF/X-4 file that exported fine from AD. This file maintained transparency and vectors in the file and added a mask during export. It opened fine in AD v2.

I RE-exported this file (that included the Affinity generated transparency mask) to PDF/X-4. This export was rasterized on export (using the same X4 settings)!! So, if someone wants to make edits to a PDF like this, they will have to rework the file, delete the mask, and apparently, avoid using masks for transparency. 

2024 MacBook Pro M4 Max, 48GB, 1TB SSD, Sequoia OS, Affinity Photo/Designer/Publisher v1 & v2, Adobe CS6 Extended, LightRoom v6, Blender, InkScape, Dell 30" Monitor, Canon PRO-100 Printer, i1 Spectrophotometer, i1Publish, Wacom Intuos 4 PTK-640 graphics tablet, 2TB OWC SSD USB external hard drive.

Posted

Thanks everyone.

This transparency approach can work for simple stuff and that's great (didn't know that and transition after 26 years with illustrator is not easy).

However that torus was one of hundreds in the artwork supplied to me (made in illustrator). 

Thanks again

Posted

One additional note regarding exporting to PDF formats not allowing transparencies (like PDF/X-3 or PDF/X-1a) from such native constructions involving transparency (especially in context of gradients).

As is well known, Affinity apps always flatten transparencies by using  rasterization, but when using opacity in context of gradient stop color definitions, rasterized images are placed within filled paths so that this does not result in jagged edges. But if the transparency is created by using the Transparency Tool (available in Publisher and Designer), jagged edges result:

As demonstrated on the video clip, the construction appears to be identical in both compositions, a rasterized image placed within an enclosing path, but only in case the composition is created with the Gradient Tool the path actually clips the underlying larger gradient image. 

When opening the resulting PDF in Publisher, it shows that the construction created with the Transparency Tool is interpreted simply as an Image (= a layer object containing a raster image), while the one created with the Gradient Tool is an Image masked by a Curves object simple, NOT a gradient object like when exporting to PDF formats that can retain transparency (and are constructed e.g. as Axial Shaping paths).

It is interesting that when this kind of a PDF is opened in Illustrator (CC2025), the following warning is shown, regarding the construction created with the Transparency Tool: 

image.png.aeb163830536ceb932a08b3c44189950.png

...but Illustrator can nevertheless interpret the file correctly.

What is good to know is that the construction where transparency is flattened can subsequently be exported without quality loss, avoiding jagged edges, while the construction where gradual transparency is achieved with a gradient mask will cause jagged edges.

a) Construction with simple mask clipping an underlying square gradient raster image (keeps sharpness):

image.png.7172f45e8e137a0c59906431140bf904.png

b) Construction with gradient mask (results in jagged edges):

image.png.07ceec234a70e93ae0c386c5211d79e1.png

Long story short: Exporting Illustrator gradients containing opacities below 100% by flattening transparencies (e.g. using PDF/X-1 or PDF/X-3) produces PDFs that you can open in Affinity apps without losing quality of the originals. The interpreted constructions however are not easily editable, so if that is important, save from Illustrator as PDFs that retain the transparency and then modify construction in the Affinity app (typically disabling the mask and reducing opacity in gradient stops). Limit the use of  Transparency Tool to raster images.

Posted
5 hours ago, lacerto said:

But if the transparency is created by using the Transparency Tool (available in Publisher and Designer), jagged edges result:

I assume this is a temporary, local issue caused by a distorted (stretched, sheared, skewed) colour gradient. Remember @Return's earlier hint about Transparency Tool and @Ldina's confirmation. – Can you check in your setup if the colour gradient is stretched before export? – Below I used a document with 35 DPI only to make rasterization more obvious. Note in the Export dialog the various prophecies about possible rasterization depending on a sheared colour gradient. Oddly, a sheared transparency gradient has no influence on rasterization.

What confuses me is the available vs. missing types of masks in Affinity. If I open my exported PDF in APub, the colour gradient object has no transparency but opens with a nested layer of type "Mask". To me it appears this Affinity layer type "Mask"  Bildschirmfoto2024-11-16um14_54_55.jpg.a912081edcb4ce82ea19cb5229636226.jpg  always gets rasterized although it may be displayed in the layout as smooth as a vector gradient (even in a low resolution layout document).

Unlike the pixel "Mask" type (which alternatively may get pixel brushed/painted), the mask created from any vector curve (or via Vector Crop tool)  Bildschirmfoto2024-11-16um14_54_46.jpg.757525dbb9ebcf26794cb90118c542cb.jpg  can also display a masking gradient and can therefore appear as the vector equivalent of the "mask" (pixel) layer type. It works without rasterization when used to simply crop an object by a vector shape (with a plain, solid fill). However, with a gradient fill, this "vector" mask type also appears to be rasterized when exported – although technically Affinity is able to export a vector gradient, as the "Transparency Tool" demonstrated. – So I wonder and would like to understand for what approach this specific difference and limitation of vector gradient masking was coded by Serif in Affinity?

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

Posted
5 hours ago, thomaso said:

I assume this is a temporary, local issue caused by a distorted (stretched, sheared, skewed) colour gradient.

No. There are no these kinds of anomalies involved. My notes are related to flattened transparencies (exporting e.g. to PDF/X-3), and how this happens when you use the Transparency Tool (resulting in jagged edges), vs. Gradient tool with <100% opacity in stop positions (resulting in clipping mask and sharp edges). In both cases the enclosed object is a raster image (which is intentional).

My additional notes were related to persistent quality in subsequent exports when opening PDFs containing transparency flattened gradients vs. jagged and unwanted (and possibly inadvertent) rasterization that happens when exporting gradients that involve a gradient mask [= the way the PDFs allowing transparencies are interpreted when opened or interpreted in Affinity apps].

Posted
2 hours ago, lacerto said:

No. There are no these kinds of anomalies involved. My notes are related to flattened transparencies (exporting e.g. to PDF/X-3),

That's right. Sorry, I missed that your post was specifically about PDF-X/3 and -X/1.

• MacBookPro Retina 15" |  macOS 10.14.6  | Eizo 27" | Affinity V1  
• iPad 10.Gen.  |  iOS 18.5.  |  Affinity V2.6

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.