Jump to content

Antialiasing destroys angled shapes in Designer [+ Photo]


Recommended Posts

Hey, so I made a minimal example of this in the attachments of this post. 

Gist of it 

If you have two perfectly aligned, angled shapes and you want anti-aliasing as to not have jagged lines everywhere, anti-aliasing will remove enough of both shapes (instead of adding to at least one of them) so the background shines through.

In this example I made two irregular shapes with the pen tool. The orange (upper) shape has its upper nodes snapped to the upper corners of the artboard. The lower ones were placed along the sides at different heights. The purple (lower) shape has its lower nodes snapped to the lower corners of the artboard and the upper nodes are snapped to the lower nodes of the orange (upper) shape. Theoretically this would mean the resulting image should have no gap between them. Practically it does (except if you disable AA for this artboard - which makes everything look jagged instead).

The background is just an eyesore of a green color, which shines through in the exported PNG image at all resolutions (see my export settings).

Yes, I know

you can "just" overlap the shapes. However:

1. This is a really annoying process if you have a large project. Not only if you've already finished and you now have to fix it but the creation of this kind of artwork is still annoying cause you can't just rely on snapping, you need to zoom in and move everything just slightly inside each other.

2. It's pure testing of what actually works. If you have more complex shapes, you might need multiple tries of shoving shapes under shapes cause sometimes the first try is not enough.

Somewhat important note 

I've tested this behavior in Affinity Photo, Adobe Photoshop and Adobe Illustrator and it's just as broken there, too.

This is how the edge looks (zoomed in):

image.png.9d74253800e3c06270a10d408a11d2ce.png

Solution?

See my purple text above with (what I hope is) a hint towards fixing this issue. I'm not good with graphics programming myself but maybe it's possible to influence the anti-aliasing by looking at what shape is above the other in the layer hierarchy? In this example one passable solution would be to either fill the created gaps with the shape that is "above" in the hierarchy (which is purple) OR to tell the renderer to remove (sub)pixels from the lower shape (orange, lower in hierarchy) while adding to the upper one (making the purple shape effectively a bit bigger).

aa-bug.afdesign

Link to comment
Share on other sites

4 hours ago, NotAffine said:

If you have two perfectly aligned, angled shapes and you want anti-aliasing as to not have jagged lines everywhere, anti-aliasing will remove enough of both shapes (instead of adding to at least one of them) so the background shines through.

This is not how AA works currently in Affinity Apps.

AA only impacts the current layer rendering without any influence of other layer below or above.

Multiple layers are then combined by the alpha composting/ blend mode / gamma rules - which does not know anything about AA, because this is handled beforehand on individual layer level.

If you want the lower layer without AA, you can disable it on that level.

Your approach seems superior at first sight, but only  in special cases like 2 shapes. It will fail as soon as you have multiple shapes overlapping.

What you are asking for is essentially  a 3D functionality from an 2D App. Possible in theory, but very unlikely to happen in near future. 
 

4 hours ago, NotAffine said:

I've tested this behavior in Affinity Photo, Adobe Photoshop and Adobe Illustrator and it's just as broken there, too.

Its not broken, its simply all vendors agree how to implement it in 2D apps. Maybe because all vendors depend on the same underlying Framework of graphics libraries.

I‘m dissatisfied with the status quo, too. But  maybe a bit more realistic what is possible.

And time plays against investing in better AA. 4K / 8K displays with retina resolution (>350 dpi) make this a absolute non-issue - except for pixel peeping strangers like us using 100x zoom.

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

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.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

This is how the normal Photo UI looks when i zoom in 4x, the lower part with additional zoom 8x (total 32x).

Your result may vary, depending on (Windows) ClearType settings.

Am I correct when i say you never ever in live noticed how colorful white-on grey text is actually rendered on Windows?

 

image.thumb.png.60346c12e6d3d96357bd4d2213bc5b9e.png

 

And when you really really zoom in, with a 1:1 macro lens in 4cm distance to my LG Monitor, you can see the individual LED patterns.

This image below is a 3x3 px square (white stroke, black fill).

image.png.1b4b44eb7576412c593b43cf2eb6063e.png

When you add a gaussian blur, and a levels adjustment to correct lighness, and a highpass filter, you start to see the square:

image.png.d0b1c65fc6723fe610f55e686120c454.png

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

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.

My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected.

 

Link to comment
Share on other sites

17 hours ago, NotMyFault said:

This is not how AA works currently in Affinity Apps.

AA only impacts the current layer rendering without any influence of other layer below or above.

Yeah, I thought of that I I also thought that might be fixable? I mean, it's probably possible to somehow create an AA algorithm that takes in that knowledge. But as you later pointed out, it's probably not going to happen.

17 hours ago, NotMyFault said:

If you want the lower layer without AA, you can disable it on that level.

Sadly, that doesn't help me cause then I still get a partial shine-through background.

17 hours ago, NotMyFault said:

Your approach seems superior at first sight, but only  in special cases like 2 shapes. It will fail as soon as you have multiple shapes overlapping.

What you are asking for is essentially  a 3D functionality from an 2D App. Possible in theory, but very unlikely to happen in near future. 

Its not broken, its simply all vendors agree how to implement it in 2D apps. Maybe because all vendors depend on the same underlying Framework of graphics libraries.

Like I said, I'm not very familiar with rendering software (although I've took a course on graphics rendering at uni) so I wasn't sure what exactly the counter points would be.

17 hours ago, NotMyFault said:

I‘m dissatisfied with the status quo, too. But  maybe a bit more realistic what is possible.

And time plays against investing in better AA. 4K / 8K displays with retina resolution (>350 dpi) make this a absolute non-issue - except for pixel peeping strangers like us using 100x zoom.

I'm sure it gets better with time but the thing is I want to make poster designs for my walls and printers can very well just print the jaggedness of my image. :/

So I have no idea how to actually realize my ideas except by shoving layers under other layers. :|

 

2 hours ago, NotMyFault said:

Am I correct when i say you never ever in live noticed how colorful white-on grey text is actually rendered on Windows?

P.S. No, you're not correct. I've zoomed in on text very often and I know how (generally) displays work. ^^

Link to comment
Share on other sites

23 hours ago, NotAffine said:

In this example one passable solution would be to either fill the created gaps with the shape that is "above" in the hierarchy (which is purple) OR to tell the renderer to remove (sub)pixels from the lower shape (orange, lower in hierarchy) while adding to the upper one (making the purple shape effectively a bit bigger).

If I understand what you mean correctly, you should be able to do this by turning off antialiasing on the "Irregular" group layer. I know you said that doesn't work because you still get a partial shine through, but I do not see that. What I did was to select the "Irregular" group layer, click on the blend ranges gear-shaped button on the Layers panel, & in the Blend Options window that opens, set Antialiasing to Force Off. The result is this aa-off.afdesign file.

Of course, in the pixel view modes the edge between the purple & orange layers has the characteristic 'jaggies' of aliased bitmaps but there is no way around that (since a rendered pixel can have only one color).

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

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.