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

How do you export smooth gradients? (Solved or ongoing - it's complicated)


Recommended Posts

Hello everyone. I'm currently working on a document that contains a simple 2 color gradient, that when exported looks likea "stepped" - like, edge visible gradient in .jpeg image. I tried exporting in different qualities ranging from 85~100, and in different resampling. I even turned on/off progressive from 'more' options, but the result is always the same. How do you export gradients properly?

image.thumb.png.5a0ed3efb675ed89cf32d14157fdec37.png

Link to comment
Share on other sites

Thanks for the reply. I was just generalizing in my problem description, aiming potentially at those who had dealt with the same problem before, and who could have the solution. I also included the file in the attachments. In the new image you can clearly see the rings being formed instead of a smooth gradient. I didn't try with tiff and other formats, because I need .jpeg to upload to the web site.

image.thumb.png.e337472fff3f9f94fd1fc163fcca613e.png

gradient test.afpub

Link to comment
Share on other sites

Thank both very much for taking the time to investigate this! I very much apreciate this! On this link you can see what I used the image for, and please, look at the gradient and tell me if you see rings: http://www.dooreart.co.kr/shop/goods/goods_view.php?goodsno=13119&category=

If you don't see the rings, then all I can say that my monitor has problems, not Affinity.

My 4k file was just random copy paste the elements in question to show where the problem lies. The size doesn't seem to have any relevance with the problem, as well as file format. Everything looks the same. I will definitely look at this further.

Thank you.

Link to comment
Share on other sites

Mandu, in the images posted so far:
On my external monitor (cheap and not calibrated, straight out of the box, no idea what “mode” it is in, if it has any others) -
* Mandu Post 1: I can see a tiny bit of banding in the image on the right but it is very slight;
* Mandu Post 2: The banding is very visible on the image on the right;
* Legatro Post 3: The banding is very visible.
On my laptop’s integral screen (probably cheap, not calibrated, as it came fixed to the machine) -
* Mandu Post 1: A bit of banding around the black but not much;
* Mandu Post 2: The colours are so dark I can’t see any banding;
* Legatro Post 3: Again, colours (in the gradient) are too dark to see much banding.
It would seem that, as suggested above, the results are very dependant on the reader’s screen, which you have no control over.

Link to comment
Share on other sites

I checked the website image, and the lighting cast on the black surface at the top and circular gradient behind the large Korean golden type both have visible banding. This is caused by dark values transitioning into darker values, and the 8bit RGB space just doesn't have the colour values range to create smooth transitions.

The lighting in the top image is less noticeable due to dithering. The circular gradient's banding is much worse because no dithering or noise is applied to it (a commonly used trick to reduce the banding effect to our eyes).

Whether these will be seen by the viewer depends on the screen and how it is calibrated. Good calibrated screens will display the banding more than others. And interpolation may reduce the apparent visual banding as well when the image is scaled down on a smaller screen. On badly calibrated screens the banding may not be visible at all. A small mobile screen may hide the banding to our eyes.

Fact remains, banding is apparent on a good calibrated screen. With gradients and lighting at such limited value ranges this is an expected outcome. To reduce the banding noise and/or dithering can be applied to simulate subtler transitions. Most viewers will probably not notice the banding and focus on the other objects in your layout. And most users are viewing this with screens on which it is difficult to see the banding anyway.

Besides, JPG is problematic as well in these cases. Gradients and JPG compression are no friends at all. Even at a higher compression level (like the one used in your image: 95%) will still cause obvious visual banding in many cases.

Link to comment
Share on other sites

20 hours ago, Mandu said:

In the new image you can clearly see the rings being formed instead of a smooth gradient. I didn't try with tiff and other formats, because I need .jpeg to upload to the web site.

I can see the banding rings in all picts above. (if I avoid watching them on the white forums background)

I mean to remind a known issue with gradient to transparency (can't remember in which way). In your document you used 2 transparencies, one for the gradient and one for the object. Your gradient appears to go through the color spectrum, I can see blue and a little green in the banding rings between the inner brown and the outer black in your images, and in your .afpub, too.

In the attached sample I defined the color in the CMYK color selector mode and avoided cyan (0 c, 50 m, 100 y, 95 k). Also I did not use any transparency for the gradient but the background color black. Exported as JPG from this RGB .afpub it seems to show less obvious & less colorful banding than in your samples above.

top: your samples / below: jpg of attached afpub.   gradient test _cmyk gradient.afpub

image.thumb.png.203659115403218a11b8f426828bcb15.png

271161778_gradienttest_cmykgradient.thumb.jpg.c72ec05c81ed8c712b18ceb4dcf7309d.jpg

 

 

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

@thomaso Thank you for checking this out! So you found your way around it. Your example is definitely much more accurate in terms of what I would want to achieve. I wasn't aware of the transparency issues, I thought it doesn't matter. As soon as I removed transparency, bending dissapeared even with full color spectrum! Thank you so much for posting your findings.

Link to comment
Share on other sites

20 minutes ago, Mandu said:

As soon as I removed transparency, bending dissapeared even with full color spectrum!

That's a good hint. Thank you, too!  (In the meantime I got doubts about my CMYK-selector-mode suggestion, because it should not affect an RGB export. So glad to hear it's just the gradient-to-transparency issue in Affinity)

    > I wasn't aware of the transparency issues, I thought it doesn't matter.

Yes, still a buggy occurrence in Affinity. Indeed, transparency should not matter for the quality of a gradient. There are somewhat related threads already: https://forum.affinity.serif.com/index.php?/search/&q=gradient transparent

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

4 hours ago, Lagarto said:

Is this really an Affinity issue, or a bug? I think that with all gradients, the following factors determine the smoothness of the gradual change from one color to another: a) The number of of available shades between the colors b) The distance across which the colors are distributed c) Resolution and line screen (when printing the gradience). 

I don't mean banding at all is the issue in Affinity but rather the influence of transparency in a gradient color is the effect which should not occur.

A pixel itself has no transparency but just a different color towards one without transparency. The fact that in the sample above the banding gets less obvious + less colorful as soon transparency is NOT used for one gradient color does illustrate that banding gets influenced by transparency of one gradient color (different to the gradient object's transparency, which affects the entire gradient, not one color only).

For instance an RGB color 0 10 20 with 50% opacity might, just theoretically, result in 0 5 10 (on a 000 background). That means it should not influence the quality of the gradient if I use no transparency for this color but set it directly to 0 5 10. – The experience of Mandu  "As soon as I removed transparency, bending dissapeared even with full color spectrum! " seems to support this thought. As if, in practice, Affinity needs user support to calculate the transparency with the color value.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

Sorry if I had ignored your samples, it appears just too complex and time consuming to read, detect and understand what's happening in each single pict in detail.

I just still trust the experience of Mandu, and my test above, too. However, I don't see that issue as a BIG problem since there are ways to avoid it.

11 minutes ago, Lagarto said:

Photoshop does have options like "Smooth" and "Dithered" which Affinity Photo does not seem to have

In Affinity for every single color definition you can add noise (which is kind of hidden in the UI: you need to click on the opacity icon to switch the slider from opacity to noise)

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

Lagarto: by the way it seems that a blur effect (which actually creates a gradient of transparency) does not show the banding that colorful (e.g. no blue) than Mandu's initial screenshot. That also gives the impression that there is "just" an issue in the gradient tool when it is used with 0 opacity as one of two colors:

Here to the brown ellipse shape object no gradient fill is applied but plain color only + an additional gaussian blur effect. ... No blueish banding so far.

1034582745_gradienttest_asblureffect.thumb.jpg.0f847c0c8a77f82b8b42f13b11da1708.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

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.