Jump to content
Our response time is longer than usual currently. We're working to answer users as quickly as possible and thank you for your continued patience.

Remove thin lines caused at edges of patterns and vector shapes


Recommended Posts

Hi,

 

There are many posts complaining about "thin lines" becoming visible under certain circumstances, in Photo, Designer, and Publisher.

  • vector shapes touching each other at their edges
  • patterns of pixel layers (tiles)

 

The principle cause is anti-aliasing, which is active by default. All pixels at edges of layers will get anti-aliased. The function changes both the color and the transparency (alpha) of edge pixels. This will lead to partially transparent edge pixels. Depending on background layers, this often creates a line of of pixel width in light colors shining through. This can be very distracting in case of seamless patterns.

To remove the thin line, there are multiple options. Unfortunately, most recommended options do additional collateral damage:

  • Deactivating anti-aliasing, or modifying the coverage map, is global per layer and could lead to rough edges.
  • Adding back-fill layers manually is very tedious

There is a new simplified method, suitable when your document is pixel art, or will / can be rasterized at export.

Steps:

  • add a levels adjustment
  • select the alpha channel
  • set the white level to 75% (depending on blend gamma of the pattern layers, you may need to use 50% in case of blend gamma 1.0).

In Photo, you can save this as preset for later re-use in other documents.

Whow does this work?

  • assuming you patterns / layer are fully opaque, and using default blend gamma of 2.2
  • Anti-aliasing will create edge pixels with a known range of alpha values: 75% to 100%. Values from 0% to 75% will only occur at edges where pattern do not face each other.
  • The curves adjustments ensures all alpha values above 75% will reach 100%, thus effectively removing the thin line, and replacing it by the blend of the colors of neighboring pixels
  • There is a minor collateral damage. These alpha values (75%-100%) may occur in other places. But the visual difference is small, and will be far less disturbing compared to a white line inside a seamless pattern.

Example of distracting thin lines / background shining through:

image.thumb.png.2decff2d5e389f1f39c71d72f6c7182a.png

harsh edges when deactivating AA:

image.thumb.png.02996c36307c6f30b64e9f8b04065699.png

Thin lines removed, while keeping AA active (with limited effect to alpha channel):

image.thumb.png.cd0bdd501cbb942c736e26dfd7fca0dd.png

AA on edges stays intact in general (reduced alpha)

image.thumb.png.487be69925a285ec369338382991bf68.png

Requires settings in levels adjustment:

image.png.738ef8325db708f55d6fdfd59b596c45.png

Mac mini M1 A2348

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thanks @NotMyFault. It is good to see a straightforward tutorial using words and pictures without recourse to using video.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

  • 2 weeks later...

I have this very problem with my Affinity Designer artwork (AD v. 1.9.3 on Mac OS Mojave) . Even if shapes (i.e. simple rectangles which are not rotated) are positioned abslutely pixel perfect flush to each other I'll get those thin lighter lines when exporting my artwork to pixel formats (say JPG). This actually has been some kind of a problem right from the start in AD years ago.

It's even visible pre-export in most zoom values while still in Designer.

As I'm in Designer I unfortunately don't have Adjustment Layers to try the method described here... Any ideas about what might be done to get proper exports?

Link to comment
Share on other sites

I'm adding two screenshots here: one from inside Designer at 800% zoom which actually doesn't show those fine lines (and the grain/noise looks finer) and another from the exported JPG (full resolution of a 300dpi AD file), also viewed at 800% zoom.

JPG-Export_fullres_800-percent-zoom_screen.png

AD_800-percent-zoom_screen.png

Link to comment
Share on other sites

@Lorox

Could you please open a separate thread under questions, to keep this tutorial thread focused?
i‘m happy to investigate deeper if you are able to upload the afdesign file there.

As i see you are probably use a noise filter, which might causer the issue. Some filters cause „fluctuations“ on alpha channel interfering with the issue. There are other causes of thin lines independent from alpha. Curious to find out 😉

Mac mini M1 A2348

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. 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.