jessiscah23 Posted March 29, 2023 Posted March 29, 2023 (edited) Issue: In pixel view mode and export, undesirable aliasing artefacts occur on outlines. Reproduction steps: Create a shape. Set the fill and stroke. Set the stroke alignment to outside. Enable Pixel View Mode. Zoom in to where the outline meets the fill. Aliasing creates transparency between the fill and the outline. This is visible when exporting to PNG. A similar issue occurs when stroke is aligned to inside. Aliasing will reveal artefacts of the fill colour on the outer edge of the outline. On perfectly straight lines, this can be mitigated by ensuring the edge is perfectly pixel aligned. There is no apparent mitigation on curves. Example: Alias Example.afdesign Edited March 29, 2023 by jessiscah23 Quote
NotMyFault Posted March 29, 2023 Posted March 29, 2023 Hi and welcome to the forum. the issue you observe is unfortunately by design, a side effect of rasterization of vector objects to bitmaps while using anti-aliasing. The same issue can be observed only using fill, when using e.g. a donut shape and circle inside, or even 2 rectangles fading each other, but rotated by an angle other than 90 degree or integer multiples. The issue is fundamental, not limited to Affinity apps. Apps specialized in bitmap editing may mitigate the issue by compromising other (vector) functions, e.g. automatically rounding up positions of vector nodes, or not using anti-aliasing. Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K 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. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
jessiscah23 Posted March 29, 2023 Author Posted March 29, 2023 1 hour ago, NotMyFault said: Hi and welcome to the forum. the issue you observe is unfortunately by design, a side effect of rasterization of vector objects to bitmaps while using anti-aliasing. The same issue can be observed only using fill, when using e.g. a donut shape and circle inside, or even 2 rectangles fading each other, but rotated by an angle other than 90 degree or integer multiples. The issue is fundamental, not limited to Affinity apps. Apps specialized in bitmap editing may mitigate the issue by compromising other (vector) functions, e.g. automatically rounding up positions of vector nodes, or not using anti-aliasing. Thanks for the explainer, NotMyFault. This feels like a fairly crucial issue, particularly for use cases where background transparency is necessary. I would have assumed some form of behaviour that slightly inflated (or deflated) the fill of a shape during render to compensate the aliased offset against stroke. Quote
NotMyFault Posted March 29, 2023 Posted March 29, 2023 Unfortunately there is no build-in function, but there are workarounds: This might help jessiscah23 1 Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K 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. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
NotMyFault Posted March 29, 2023 Posted March 29, 2023 I really share that we need a out-of-the-box solution. The anti-aliasing needs to become context aware of surrounding pixels (created by adjacent vector objects), and automatically deliver fully opaque pixels in case the vector objects are exactly face-2-face. The current algorithms are dumb and draw one object after the other, in bitmap domain, probably for performance reasons. There are more issues - the mixture of colors with gamma 2.2 looks unnatural/odd, too. Gradients e.g. from red to blue create unnatural color values wrt hue and saturation (while mathematically correct). Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K 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. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
jessiscah23 Posted March 29, 2023 Author Posted March 29, 2023 Thanks for linking to that thread, @NotMyFault- that actually solve some other issues that I was hitting up against not too long ago. Very much hoping that Affinity devs have roadmap plans to confront this (and similar) issues. NotMyFault 1 Quote
Recommended Posts
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.