Jump to content

Recommended Posts

This post relates to this discussion in regards to anti-aliasing:

Here is why the "workaround" for anti-aliasing removal in exports as shown here does not work for me (or at least I do not know how to make it work...).

image.thumb.png.bd4c61395513f4afdc010adae2f1c797.png

I use AD for designing t-shirts which I upload in a PNG24 format to several websites. Most print on demand providers don't want any transparency in the uploaded files.

Although the workaround via the "Coverage Map" in the "Blend Options" works on simple shapes, it does not seem to work as soon as masking or clipping come into play.

I have created 4 donuts (PNG24 export):

Donut 1) No anti-aliasing workaround used

Donut 2) Anti-aliasing workaround used (no masking or clipping used - just the normal "fill"-option was used)

Donut 3) Anti-aliasing workaround used on masked donut

Donut 4) Anti-aliasing workaround used on clipped donut (textured clipped mask for "see through effect (layer used to mask with has the same blend options of course)

image.thumb.png.de0f91528b3fd502266e7046f93b6aaa.png

As expected anti-aliasing was implemented on donut 1 after the export. The workaround works great on donut 2 as you can see.

image.thumb.png.5f4612fd2f97503e7f625953cfc2306a.png

image.thumb.png.822ab64358c1d51f6eb21bd320154eec.png

But when donut 3 is masked, transparent pixels appear on the export although the workaround was implemented on every object layer.

image.thumb.png.dbfde4cd9677b9e5273b798b05fbab2b.png

Donut 4 was clipped. As you can see the border of the donut is fine (no anti-aliasing) but the textured mask (which has the same coverage map settings for "no anti-aliasing" of course) appears with transparent borders on the "see through"-parts.

image.thumb.png.8e92f943477a4e8e0603c0869872daaf.png

Am I doing something wrong? A simple "turn anti-aliasing on and off button" would be such a helpful option in my opinion. Since I create designs with allot of shapes and strokes it is a big pain to have to manually select all object layers and then set the right blend options every time. This would be a great new feature, since this topic seems to be discussed/ requested for years now.

Here is the AD file if you want to have a look :) 

Anti-Aliasing Demo.afdesign

Lookin g forward to your replies y'all ;)

 

Cheers!

Share this post


Link to post
Share on other sites
5 hours ago, Bones_the_Bones said:

I use AD for designing t-shirts which I upload in a PNG24 format to several websites. Most print on demand providers don't want any transparency in the uploaded files.

Is it that they want no transparency at all, just no partially transparent pixels, or no anti-aliasing at all?

If it is just no partially transparent pixels, then I think all you need to do is export to PNG using the Nearest Neighbor resampling method. I only tested this with your Anti-Aliasing Demo file, so I can't say if it would work for every document, but for that file using the NN resampler there are no partially transparent pixels, even without the workaround applied.

Share this post


Link to post
Share on other sites
12 hours ago, R C-R said:

Is it that they want no transparency at all, just no partially transparent pixels, or no anti-aliasing at all?

If it is just no partially transparent pixels, then I think all you need to do is export to PNG using the Nearest Neighbor resampling method. I only tested this with your Anti-Aliasing Demo file, so I can't say if it would work for every document, but for that file using the NN resampler there are no partially transparent pixels, even without the workaround applied.

Ideally there should be no transparency at all ("see through to the background is fine of course - so I want either 100% opacity or 0% opacity). Since anti-aliasing results in transparency or partially transparent pixels, we have a problem there.

So your workflow was: File --> Export --> Reasample: Nearest Neighbor --> Export? I did that and you are right, the clipped donut (donut 4) did not have any partially transparent pixels anymore which is great! But the masked donut (donut 3) still has transparency/ partially transparent in it. Nevertheless a step in the right direction ;) 

Do you think a global anti-aliasing turn-off is a realistic feature for the next update? 
I already produced hundreds of designs with AD but the lack of this feature will probably push me towards another design-tool. I was just recently made aware that partial transparency can lead to some problems in textile print. This is such a basic feature and the lack of it results in unnecessary workarounds that are time consuming and hard to keep track of. I really don't want to have to apply a specific map coverage setting to every object layer during designing or export in PDF just to import into PhotoLine in order to export without anti-aliasing again....

AD basically alienates t-shirt designers with this situation in my opinion. That is a big market share of potential customers - I simply don't get it and I am getting I bit frustrated as you can probably tell :D 

Anyways - thanks for your answer ;)

 

Cheers!

Share this post


Link to post
Share on other sites
58 minutes ago, Bones_the_Bones said:

Since anti-aliasing results in transparency or partially transparent pixels, we have a problem there.

But that is not necessarily true. Anti-aliasing can just fill edge pixels with 100% opaque pixels of a lighter/less saturated color. From what I can tell by opening the PNG export of your Anti-Aliasing Demo file (using the File --> Export --> Reasample: Nearest Neighbor --> Export method) in Affinity Photo, there are no partially transparent pixels -- using that app's Select > Alpha Range > Select Partially Transparent menu option, nothing is selected.

Donut 3 in the PNG export looks like it has partially transparent pixels but they are just a lighter color.

Share this post


Link to post
Share on other sites
16 minutes ago, R C-R said:

Donut 3 in the PNG export looks like it has partially transparent pixels but they are just a lighter color.

I think that’s how @MikeW achieved the result shown in the following post:

 

Share this post


Link to post
Share on other sites

I did some testing after what you said @R C-R. But I don't have Affinity Photo, I am just using Affinity Designer.

Remember:
Donut 2) Filled Donut
Donut 3) Masked donut Donut
Donut 4) Clipped donut 

Using the coverage map workaround and the "nearest neighbor" export, it is possible to achieve no transparency in the export in the clipped donut (donut 4) and filled donut (donut 2):
image.thumb.png.2d7a64a4410a23c059fdd09166681bcf.png

image.thumb.png.90b1406f4f04fe648bc82757c4bb1646.png

 

3 hours ago, R C-R said:

From what I can tell by opening the PNG export of your Anti-Aliasing Demo file (using the File --> Export --> Reasample: Nearest Neighbor --> Export method) in Affinity Photo, there are no partially transparent pixels -- using that app's Select > Alpha Range > Select Partially Transparent menu option, nothing is selected.

Donut 3 in the PNG export looks like it has partially transparent pixels but they are just a lighter color.

But anti-aliasing is still applied on the masked donut export (donut 3) and the pixels are partially transparent as you can see on the different background colors (I mean the pixels have to be partially transparent, if you can see the background color behind them, right?):

image.thumb.png.846957f8daa0530f20e663434dd97f85.png


If one refrains from using masked shapes and uses the "coverage map" workaround on EVERY object layer while exporting via the nearest neighbor option, the following objects do not get anti-aliased in the PNG export:
- Strokes
- Filled Shapes
- Clipped shapes

I still have not found a way to export multiple pictures in the export persona with the "nearest neighbor" option. So far I did that without the export persona via "File --> Export --> Reasample: Nearest Neighbor --> Export". Since I want to export allot of images at the same time, do you know a quick way to do this in the export persona?

Cheers!  

Share this post


Link to post
Share on other sites
18 minutes ago, Bones_the_Bones said:

I still have not found a way to export multiple pictures in the export persona with the "nearest neighbor" option. So far I did that without the export persona via "File --> Export --> Reasample: Nearest Neighbor --> Export". Since I want to export allot of images at the same time, do you know a quick way to do this in the export persona?

See here ...

export1.jpg.f3c4df422bde7a2deb7a3683a57da569.jpgexport2.jpg.317ed1db22dd26f76a032dbb421e0f27.jpg

Share this post


Link to post
Share on other sites
10 hours ago, R C-R said:

From what I can tell by opening the PNG export of your Anti-Aliasing Demo file (using the File --> Export --> Reasample: Nearest Neighbor --> Export method) in Affinity Photo, there are no partially transparent pixels -- using that app's Select > Alpha Range > Select Partially Transparent menu option, nothing is selected.

Donut 3 in the PNG export looks like it has partially transparent pixels but they are just a lighter color.

@R C-R Could you please explain a bit more on this topic ( I don't have Affinity Photo). So you can check if pixels are transparent or not?

Share this post


Link to post
Share on other sites
15 hours ago, Bones_the_Bones said:

Remember:
Donut 2) Filled Donut
Donut 3) Masked donut Donut
Donut 4) Clipped donut 

Actually, I think in your demo file, donut 3 clips the red rectangle & donut 4 is masked by the rectangle with the bitmap fill. I only mention that to avoid any confusion in the following:

15 hours ago, Bones_the_Bones said:

But anti-aliasing is still applied on the masked donut export (donut 3) and the pixels are partially transparent as you can see on the different background colors ...

I could not figure out why I was getting no partially transparent pixels in donut 3 until I remembered that while I was experimenting with your file I had added an extra step I had forgotten about: I pixel aligned the red clipped rectangle by setting its fractional pixel x, y, w, & h values to integer ones:
208925083_pixelaligned.jpg.c1332296b3f68f12760e4067c361cc59.jpg

I am not exactly sure why that makes a difference but it does, at least on my system. If you want, experiment with this Anti-Aliasing Demo adjusted.afdesign file, which differs from your original both in that the red rectangle is pixel aligned & in that all the coverage maps were reset to the default.

Assuming you get the same PNG export with no partially transparent pixels as I do, that means you don't need to futz with coverage maps -- just making sure clipping layers & such are pixel aligned & using the NN rendering option should work, & save you the effort of applying the maps.

Share this post


Link to post
Share on other sites
Just now, Bones_the_Bones said:

@R C-R Could you please explain a bit more on this topic ( I don't have Affinity Photo). So you can check if pixels are transparent or not?

In Affinity Photo there are several items on the Select menu that allow users to make 'marching ants' selections by range, including the 3 shown below for alpha ranges. So for example, if a pixel layer is selected & Select Partially Transparent is applied, if there are no partially transparent pixels in that layer, then there will be no 'marching ants' selection.
779785946_selectbyalpha.jpg.7baed450d41d342db5cd73615f6f2b48.jpg

Share this post


Link to post
Share on other sites

In no particular order:

1) Why oh why would changing the resample method do anything if the size isn't changing?? Why is any resampling happening at all???? >:(

2) @R C-R I'm getting semi transparent pixels in your file. I believe @Bones_the_Bones is showing the backgrounds (especially the green and blue) to point out the transparency along the graphic edges in the PNG. Picture the gray et al as the color of the T-shirt. Are you saving the gray with the graphics in the PNG and testing that?

3) In Photo, Select Partially Transparent seems a bit messed up, no? (it also selects fully transparent pixels?). 

That being said, #3 can be exploited as a "solution" (if you have Photo)
@Bones_the_Bones, instead of spending time with coverage maps and worrying about clip vs mask, just save the regular anti-aliased PNGs. Set up a simple batch process of open, select semi transparent, delete, save. In the long run a whole lot easier than fiddling with all the other stuff??
(it goes without saying that, obviously, a clean export in the first place would be nice)

On a separate note:
I thought I had a clever solution involving just one adjustment above everything instead of multiple coverage maps. But now I'm not so sure...
The PNG24 did save and looks pretty good in Preview and in web browsers.... but it failed to upload here so I think something is not quite right with the output.
I'm attaching the .afdesign file anyway. (make sure you look at it in Pixel view mode :))

 

 

Anti-Aliasing Demo JJ.afdesign

Share this post


Link to post
Share on other sites
3 hours ago, JimmyJack said:

1) Why oh why would changing the resample method do anything if the size isn't changing?? Why is any resampling happening at all???? >:(

I don't know why that makes a difference, but since the donut shapes are resolution independent vector objects & PNG is a raster format, sampling of one kind or another has to occur to export to that file format ... right?

3 hours ago, JimmyJack said:

2) @R C-R I'm getting semi transparent pixels in your file. I believe @Bones_the_Bones is showing the backgrounds (especially the green and blue) to point out the transparency along the graphic edges in the PNG. Picture the gray et al as the color of the T-shirt. Are you saving the gray with the graphics in the PNG and testing that?

Originally, I exported with the grey rectangle & then used various methods in Affinity Photo to remove it ... which I later realized was stupid, since none of them would produce semi-transparent pixels anyway. Duh! :$

After I realized that, I tried again with the AD file set to transparent background & exported without including the grey rectangle, I was still getting no semi-transparent pixels ... until after I had quit Affinity Designer & relaunched it to try again today. Now I get semi-transparent pixels like you do. I have no idea why that would or could have made a difference, even if AD was in some weird state befor the relaunch. :S

4 hours ago, JimmyJack said:

3) In Photo, Select Partially Transparent seems a bit messed up, no? (it also selects fully transparent pixels?). 

No argument from me that it is messed up in some way, but at least for me it usually (but not always) does not also select fully transparent ones.

Share this post


Link to post
Share on other sites

Sadly I don't have Affinity Photo, but thank you guys for the great answers!

But I have Photoshop - so I was thinking maybe the following process on the exported PNG might even be better because it allows for semi transparency on areas that are not problematic during printing and deletes partially transparent pixels in areas that might cause problems. In Photoshop:

1. Layer > Layer Mask > From transparency.

2. Image > Adjustments > Threshold (128)

I have created a !masked! (thanks @R C-R - it seems that I confused the terms "clipped" and "masked") circle, that I exported as PNG24 without any "coverage map" adjustments whatsoever. As you can see there are partially transparent pixels as expected:
image.thumb.png.096cf5a99711049ddd64697e19a420ec.png

Putting the PNG24 on different backgrounds shows the partial transparency clearly:

image.thumb.png.bb21daf2e1ac2c6e16e6b0cc7c901173.png

Now I did the Photoshop workflow as described above with the original PNG file. The result on the same background is the following:
image.thumb.png.3aa2a0ec61021649e239ca464c202578.png
 

As you can see only the partially transparent pixels that "touched" the background got changed/ removed. The other partially transparent pixels that do not touch the background stay how they are. I think (I am not entirely sure about this but it seems logical) that the partially transparent pixels that do not touch the background are not a problem in textile printing, because they "don't change" when the textile color changes. Please correct me if I am wrong here :p 

I think this is a reasonable workaround that can be automated for many designs. I am very interested in your opinions on this! ;) 

Cheers!

Share this post


Link to post
Share on other sites
On 12/15/2018 at 5:07 PM, R C-R said:

I don't know why that makes a difference, but since the donut shapes are resolution independent vector objects & PNG is a raster format, sampling of one kind or another has to occur to export to that file format ... right?

The vector objects aren't at issue here. The only thing that changes with a Nearest Neighbor export is the grid of small holes used as the mask in #4. 
And that's a bitmap fill. It's "resolution" type is set in the Fill Tool context tool bar (NN, Bilinear or Lanc3). It's being overridden by the export setting without a size change.
I don't think that's right.

At first I thought it might have something to do with an FX also being applied as they're always rasterized on export. But removing the FX didn't change the different exports.
Then I rasterized the mask, and finally both exports were the same. I think it's a bug.

EDIT (12-19): Looks like this is an isolated glitch with this particular bitmap fill. I can't reproduce whats happening with another one. When I use another image the quality settings in the tool bar work and the different export resample settings (with no resize) have no effect :).

Share this post


Link to post
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.


×
×
  • Create New...

Important Information

Please note the Annual Company Closure section in the Terms of Use. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.