Jimmini Posted June 18, 2021 Share Posted June 18, 2021 Using Affinity Designer or Photo 1.9.2 on Windows 10, I can see an abrupt increase of noise at the position of a gradient stop, which looks like this after applying a level adjustment to exaggerate it: The noise slider is set to the minimum value for all stops. It's not extremely noticeable but still quite visible in some cases. I can reproduce it for example by simply creating a shape with a linear gradient, a black stop, a gray stop in the middle and a white stop. An example file is attached. GradientBug.afdesign Quote Link to comment Share on other sites More sharing options...
Staff Sean P Posted June 18, 2021 Staff Share Posted June 18, 2021 Hi Jimmini, This is intentional and is known as dithering. It is applied to gradients to smooth them out and avoid the typical banding issues you see may see without it. As you say the Levels Adjustment you've applied really pushes that and exacerbates the noise and makes it stand out a lot more.Dither Gradients On: Dither Gradients Off: Quote Link to comment Share on other sites More sharing options...
Jimmini Posted June 18, 2021 Author Share Posted June 18, 2021 I understand the purpose of dithering, and I do want noise, but there shouldn't be such a sudden increase in noise that actually introduces visible seams. Such an artifact isn't needed for dithering, and seems like an implementation issue to me. Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted January 1, 2022 Share Posted January 1, 2022 @Jimmini The settings in Preferences only impacts rendering while in Designer. When you export your file in bitmap format (or merge / merge visible / flatten), the dithering will apply unavoidably. You can deactivate the otherwise forced dithering with help of a workaround: Put the layer into a group Add an invisible layer fx to the group, e.g. overlay with 0% opacity Quote 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. Link to comment Share on other sites More sharing options...
Jimmini Posted January 2, 2022 Author Share Posted January 2, 2022 10 hours ago, NotMyFault said: You can deactivate the otherwise forced dithering with help of a workaround I'm not looking to disable dithering though. I do want it. In fact, I wish there was more of it in various situations. The problem I'm trying to bring attention to is the artifact that this specific implementation of dithering produces. To make it more clear (hopefully), here is a comparison between various gradients: The first is simply a black to white gradient. The second one is a darker gray to a lighter gray with levels applied on top. The third is the same as the second, except there is middle gray stop at the center, which produces the issue I'm talking about, namely the seam at the stop's location. The third is supposed to look like the second, but doesn't. The levels are just used to emphasize the issue, but it happens regardless. (The fourth is just something I stumbled upon when making this comparison, which is a another issue.) GradientBug2.afdesign Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted January 2, 2022 Share Posted January 2, 2022 Well, affinity should simply implement a new live filter called „dither“, including sliders to control the algorithm and strength. https://en.wikipedia.org/wiki/Dither Until then, using noise as a workaround might be the option to get more control. Or use gmic plugin, which provides a variety. For me, having a forced dither is a bigger problem vs. using workarounds or 3rd party plugins. Quote 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. Link to comment Share on other sites More sharing options...
NotMyFault Posted January 2, 2022 Share Posted January 2, 2022 I agree this is a bug. It seems dithering is broken at every inner node of the gradient. If you add more nodes (e.g. 25% 50% 75%), you get a seam at every node. Dithering only works between two nodes pairs. If you have more nodes, you get partially correct dithering between every pair, but not across 3 or more. There is a (destructive only) Filter>Noise>Dither showing smoother results, but you can't restrict it to gradients only. Quote 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. Link to comment Share on other sites More sharing options...
Paul Mc Posted January 2, 2022 Share Posted January 2, 2022 This looks like a linear interpolation issue. Without dithering the colour transition appears smooth albeit with the risk of Mach banding. With the dithering there is a discontinuity visible. Quote Link to comment Share on other sites More sharing options...
Old Bruce Posted January 2, 2022 Share Posted January 2, 2022 On 6/18/2021 at 6:37 AM, Jimmini said: which looks like this after applying a level adjustment to exaggerate it: If you are exaggerating it then it is exaggerated. I personally don't see this as a bug, Quote Mac Pro (Late 2013) Mac OS 12.7.4 Affinity Designer 2.4.1 | Affinity Photo 2.4.1 | Affinity Publisher 2.4.1 | Beta versions as they appear. I have never mastered color management, period, so I cannot help with that. Link to comment Share on other sites More sharing options...
Jimmini Posted January 2, 2022 Author Share Posted January 2, 2022 Just because I exaggerate it for demonstration purposes doesn't mean it's not a problem. I wouldn't have made this report if I hadn't noticed it in normal conditions. Not that adding adjustments would be an unusual thing to do. Seams at gradient stops seems like a pretty big deal to me for a professional image editing software. Quote Link to comment Share on other sites More sharing options...
Paul Mc Posted January 2, 2022 Share Posted January 2, 2022 If this was smoothly interpolated across the stop then there would be no discontinuity, even when exaggerated. At least until you reach the granular resolution of the colour space. Here's a black to white RGB/8 gradient with a low noise level. The left has three stops the right two. The mid point grey colour is (128,128,128). To my eyes the right panel seems overall to be darker than the left. The noise is interpolated evenly over the centre line and is as expected. The left panel shows a clear discontinuity. I am stretching the colour space quite a bit using the adjustment in the OP supplied file. It is looking like the error propagation (noise) on the left panel approaches zero when it reaches the stop (moving from top to bottom) and then starts again as it gets darker. Sampling the image also makes it look like there is pure colour at that boundary and not a dithered colour. Of course (with my programmer hat on 😉) this is all correct and is probably as designed but as a designer I'd say this is less than desirable and not very useful. It is looking like the error approaches zero at the stops when (to be useful) it should only do that at the start and the end of the whole gradient - if at all. None of my testing takes into account the colour space transformation for the display profile, gamma correction etc. and these may be moving this to a non-linear interpolation which then might cause the dither to reveal the discontinuity. Quote Link to comment Share on other sites More sharing options...
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.