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

Recommended Posts

How do you make a smooth gradient? I want to make a bar that is 964x45, background color is 33,33,33,255 and I just want simple linear white gradient to radiate from center towards the edges at maybe 5% opacity so it makes a shine effect. But whatever I do, it ALWAYS has some banding or noise. Tried doing it in both Af photo and Designer, but photo is def worse. I use all default settings, dithering is ON. 

Link to comment
Share on other sites

I'm not quite understanding what you are doing. The last time I made anything w. dithering was for 8 bit .gifs. By definition, those were noisy and usually banded.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Link to comment
Share on other sites

Yeah something like that, but here is exactly what im trying as you can see in the png there is no banding on the left but on the right banding is noticable.

I see what you mean

I don´t have a solution but I admire the problem  :D

 

do you have the affinity file (probably a simple file but anyhow :P )?

 

 

Link to comment
Share on other sites

so where did these pixel layers originate from?

Ultimately it does not matter though, so anyway

 

use a vector shape and fill it with a gradient and then export and all looks perfectly fine (at least when I tried it, so please try on your side)

 

I attached the file

 

cheers

 

 

 

Link to comment
Share on other sites

Hi neithque,

 

It seems that the lines appear whatever the drawing method used to make the bar.
I tried the rectangle, the pen and the pencil and the result is always the same.

 

post-37692-0-39923900-1487510909_thumb.png

Link to comment
Share on other sites

I know what is going on, but know if I can quite describe it. Human vision can perceive intensity variations that are around .005 different. That is why 256 grey scale images are perceived as having continuous tones. At 200 shades, one will inevitably see slight differences. Dithering helps, but only if the dots are small enough to mix in the eye. That's why printed documents need to be at least 150 dots per inch, preferably 300. The sample image is at screen resolution, 72. The tonal range is slightly too small, and a smooth interpolation will have pixels that are more than .005 different.

 

I haven't used AD's pixel features much, so I wasn't able to improve the file. I don't had AP. I do have Photoshop elements, and when I put the sample .png, the dither artifacts can be suppressed by doing a Gaussian blur of no more than 1 pixel. .5 is almost as good to my eye.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Link to comment
Share on other sites

yeah that looks much better thanks. i was adding the gradient on a blank layer :S

ah you used a pixel layer

 

well that is kind of bad practise in this case

(because vector is resolution independent and seems like affinity can thus optimise it in a better way)

 

@gdenby, does my file not look good on your side? did you choose a very high export compression?

 

cheers

 

 

Link to comment
Share on other sites

ah you used a pixel layer

 

well that is kind of bad practise in this case

(because vector is resolution independent and seems like affinity can thus optimise it in a better way)

 

@gdenby, does my file not look good on your side? did you choose a very high export compression?

 

cheers

 

 

When I open it in AD, I can see some slight variations. When I zoom to about 1200% the dithering is obvious.

 

I edited my post. I had written that the tonal range was to large, but should have written too small for the size of the area.

 

I am viewing on a retina display. It takes about a 400% zoom to view things at about the same grain as 72 dpi.

 

I've just started reading about .svg. Only scratched the surface, but I wonder if a fix to the problem would be outputting the bar to that format rather than .png. If I'm understanding the spec correctly, it is rather like postscript, in that the files can be rendered to the best quality of the viewing/printing device.

iMac 27" Retina, c. 2015: OS X 10.11.5: 3.3 GHz I c-5: 32 Gb,  AMD Radeon R9 M290 2048 Mb

iPad 12.9" Retina, iOS 10, 512 Gb, Apple pencil

Huion WH1409 tablet

Link to comment
Share on other sites

A gradient will always cause banding if the two values are too close and the width of the element is too wide to accommodate a smooth transition.

 

The OP's gradient example must transition from [33,33,33] to [56,56,56] - a value shift of 23 over a width of about 480px---> each value shift takes up 21px. And that results in visible banding. Gdenby mentions that our eyes will notice the banding (more than a 0.05 value/intensity shift occurs).

 

Working in 16bpc often prevents this from occurring, but the end result generally must be converted to 8bit per channel. The only solution that works to mitigate these banding issues is to apply some dithering between steps or apply noise to the overall gradient in the 8bit version.

 

Here is an example of how dithering applied between each step considerably visually reduces the banding. Zoom in to make out the dithering. (do not attempt to view this file within the context of a white background - our eyes adjust to the white, and it is difficult to compare the two! Open in Photo instead)

 

mrsivr.png

 

And exacerbating the matter is banding caused by low-quality screens with a limited colour gamut.

 

When working with SVG (Scalable Vector Graphics) the banding ought to be prevented by the browser's built-in dithering/anti-aliasing algorithms. Unfortunately, it depends on the browser and the operating system whether this actually is applied or not.

 

For example, the above gradient displays with bands in Firefox Developer for me, while it looks fine in both Opera and Chrome. (I am on Windows, btw.) I read that OSX may introduce bands in Chrome.

 

In a nutshell, SVG may not be the solution you are looking for if banding is to be avoided altogether - it depends on the OS and browser in my experience.

Link to comment
Share on other sites

  • 4 months later...

Sorry to open an old topic, but I ran into the exact same problem as OP in Affinity Photo.

I'm creating a new pixel layer (256x256) and place a rectangle across the whole layer, which I fill with a gradient (linear, black to white, 256 greyscales, which should theoretically result in one step up in lightness per row).

 

I too noticed considerable noise instead of a smooth gradient.

Then I found the slider 'noise' in the gradient color picker. It is set all the way to the left, which should disable any noise. Moving it to the far right will increase the amount of noise in the gradient which is to be expected.

 

However, moving the slider only slightly to the right from its leftmost position will decrease the noise to a barely visible level (it will not disappear completely!).

 

I'm pretty sure that's not the intended behavior...

 

One could argue that if it's barely visible, it's no big deal, but I need a perfectly smooth gradient because I'm using it as a lookup table of sorts for a program I'm writing. Having discontinuities appear in the image will render it useless.

 

noise.png

 

left: default settings (magnified gradient)

right: noise slider moved slightly. Noise is reduced but still visible.

 

Is there a known workaround to this?

 

Thanks!

Link to comment
Share on other sites

To answer my own question:

 

The problem with visible dithering in theoretically smooth gradients lie with the application's performance settings.

 

Edit -> Performance -> Dither gradients

 

Unchecking this option will make gradients perfectly smooth :D .

Having the option checked will result in the above mentioned behavior.

Link to comment
Share on other sites

  • 1 year later...

I has problem with gradient too. I made a book cover, and I see gradient lines on exported PNG.

What I tried:

  • turned off Dither gradients option
  • used Fill layer or Rectangle - no helped

My project was in CMYK mode, and I set gradient from white to black. I used 1.6.5 version of Affinity Photo.

I added Nose Live Filter, and set to 10%. This is enough for smoother.

 

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.