Jump to content
You must now use your email address to sign in [click for more info] ×

Gradients and Blur don't calculate correctly


Recommended Posts

Problem

Gradients have bothered me forever, not only Affinity but every piece of software that has them. Turns out that both gradients and blur are subject to the same problem, which is that they are not performing the color average calculations correctly.

The issue is best explained in this video.

 

The gradient is on the left and the blur is on the right. The color between these two is too dark. This happens for every color combination. You can also see the edges of the gradient because it is being calculated linearly.

5968faf092def_ScreenShot2017-07-14at11_05_32AM.thumb.png.67e817427d9f85de4f9e0465fac87df1.png

 

The fix below using gradients is still wrong because it still is victim to the darkness resulting from the bad average calculation. This is also a good example of the linear gradient issue because you can see a definitive purple line down the center.

5968fbda5c9b6_ScreenShot2017-07-14at11_13_33AM.thumb.png.daba71cc3b4a451d7e0eef285ff34cfe.png

 

This is my best attempt to fix the linear gradient and make it more logarithmic

5968fd36dbcfe_ScreenShot2017-07-14at11_19_21AM.thumb.png.ba98d2815d8b5a7ebe40e1e487aeb74f.png

 

This calculation issue is also extremely visible in the color chooser

5968fecf35620_ScreenShot2017-07-14at11_26_28AM.png.ff93ccf26174e1c124aa0361cd55ed37.png

 

The examples above are all using Adobe RGB, not sRGB.

 

Suggested fix

Idea 1

Because many documents are now using the wrong calculation, my suggested fix would be to add an option to the gradient tool for what type of calculation to use in order to maintain compatibility with older documents.

 

Idea 2

Take the Photoshop approach and just make it a document setting (and turn it on by default for new documents).

 

Result

Fixing this will result in a more accurate and pleasing gradient and blur tool.

Fixing this will also fix the linear gradient problem, which causes the center and edges of gradients to be extremely visible since they are not being calculated logarithmically to compensate for how humans perceive brightness/color.

 

Here is a snapshot of the video I linked above showing what the blur and gradient should look like:

5968fe82b7195_ScreenShot2017-07-14at11_24_13AM.thumb.png.98e34adabf418021606dba4463c26dee.png

Link to comment
Share on other sites

41 minutes ago, TonyB said:

Why not just switch to LAB/16 colour mode. Doesn't this give you the results you are looking for?

 

LAB/16 doesn't fix the problem but RBG/32 does fix the problem (as far as I can tell) and makes for a smaller file size which is interesting.

 

I still think that it should be fixed for the other color formats/profiles as well. This is because some people need to use CYMK for printing and there is no fix to the problem when using CYMK color profiles. I think my update to a suggested fix would just to make the fix a checkbox in the document settings that applies to all the color profiles and formats.

Link to comment
Share on other sites

Search for a post using the terms 

 

photoline gradient 

 

Choose the post by Herbert  (3 listing for the same post if I recall. Photoline can use cubic and linear interpolation of gradients. But also read the thread linked to in one of his responses. Quite entertaining and the Chris Cox in that thread is/was the lead Adobe Photoshop developer. There are other applications mentioned that have other gradient interpolation methods as well.

 

All that said, I can make a beautiful gradient in PL that cannot be well represented in CMYK. There are methods to step down such a gradient, that depending on the color mix, can be more than acceptable. And they can also be garbage. 

 

As for vector gradients, AD like other decent software, will/can export a gradient as a smooth axial gradient that any given RIP can blend to the best of its abilities no matter what it looks like on-screen. 

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...
On 17-7-2017 at 3:09 PM, Chris_K said:

Hi Squizit

 

Thanks for bringing this to our intention. I shall make sure it get passe don to the development team. As this is more of a feature request than a bug I;m moving this to our feature requests section

 

Cheers

 

For additional background, I would like to add a reference to this excellent article on gamma and how it pervades all image manipulation, not only gradients: colour blending, alpha blending, image resizing, antialiasing, ...

 

In the light of this it would IMHO be best to go with Squizit's second suggestion and make it a document setting, not just a gradient tool setting.

 

Cheers, and keep up the good work!

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.