Mobile app version of vmapp.org
Login or Join
Murphy569

: Is it really impossible to have gradient without banding? I am struggling to create a gradient without banding. I have watched all the videos on YT and tried: Bluring all kinds, Noise, Dither,bit

@Murphy569

Posted in: #AdobePhotoshop #Gradient

I am struggling to create a gradient without banding. I have watched all the videos on YT and tried: Bluring all kinds, Noise, Dither,bit depth, Brush and doing the gradient in Illustrator.

Everything fails and I can always see the banding.

The background color I use behind the image: 050b3c

10.07% popularity Vote Up Vote Down


Login to follow query

More posts by @Murphy569

7 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo857

Very useful article on the topic: nomorebanding.com/cache
Here is the essence:

The idea is to create gradient in 16-bit mode, and then convert it in 8-bit mode, following procedure for manual dithering (using custom dithering layer). Here is the procedure:

1.Turn off default dithering (Edit > Color Settings un-check Use Dithering), because we're going to make our own dithering "engine"

2.Create a new layer (should be topmost).

3.Fill it with solid 50% gray.

4.Filter > Noise > Add Noise. (Amount 25%, Distribution-Uniform, Monochromatic-checked)


Hit Ctrl+F to repeat the noise filter on the same layer.


6.Set the layer to Linear Light.

7.In the Layers palette, set Opacity to 1%, Fill opacity to 19%.

Important: You need to flatten the image (including the noise layer) while in 16 bit mode and only then convert to 8 bit mode for export. If you do it the other way around, you'll lose all 16 bit information first, and then the noise layer will do precisely nothing in 8 bits. Also, mind Photoshop's Use Dither setting. You can use either the layer or the native dithering method, but don't use both during conversion, it results in twice the noise you need.

10% popularity Vote Up Vote Down


 

@Cofer715

These are three samples demonstrating dither. The set below is the above set with levels adjusted to highlight the effects of dithering.



From left to right, first one is most visibly banded; no dither present. The second one is the same gradient with dither; much better. And the third one, the one on the right, has dither, and I have additionally added a layer of noise, in effect boosting the dither. See commentary for why you would add the additional noise. See "additional notes" for how to dither transparency/alpha channel.

Commentary

I have been making large renderings of gradients with minimal color variation, and banding was very visible without dithering, like in the first sample. Then I found out about dither and it improved things a lot, that's the second sample. But on a large rendering (less visible here) there was still some banding. I needed more aggressive dither. So I copied* the gradient layer, rasterized it and added a tiny amount (0.1%) of uniform monochrome noise. That improved the large scale image considerably. That's the third sample. The improvement from additional noise (which is what dither is essentially) is less visible on a small scale like in this sample here, but it was very important on a large rendering like the ones I was working on.

*I created a separate layer for noise because that way I could control noise with the new layer's opacity.

Additional notes


I've only discussed the actual image. The hardware and driver side of things can be influential as well; another device might display things differently. Other answers have covered that pretty well.
Photoshop does not dither the alpha channel. If you need dithering on transparency you have to dither the alpha channel manually. I would use a mask layer to create transparency, so it would only be a matter of dithering that mask layer. And when working with layer masks don't forget to ALT+left click on the layer mask to display it.

10% popularity Vote Up Vote Down


 

@Vandalay110

I've found a similar problem in Illustrator (which doesn't even have a "dither" option for gradients). It sounds a bit crazy, but I get around it by applying a "glass" filter, which can approximate dithering with the right params.

I use:


Distortion: 2 (this is dependent on the size of your bands).
Smoothness: 1
Texture: Frosted (the noisiest built-in texture)
Scaling: 50%


In Illustrator, this introduces white specks at the edges of your object, which you can fix by using a clipping mask.

Results? "Dithered" one on the right. It does add a bit of a noisy texture, but I think it's better than the bands most of the time.

10% popularity Vote Up Vote Down


 

@Marchetta832

A very basic difference on creating gradients is using the Gradient Layer which has a dither option built in (Layer>New Fill Layer>Gradient) and stays adjustable. From here on you could convert to smart layer and add whatever effects you need to improve further, but it gives you a much better starting point.

10% popularity Vote Up Vote Down


 

@Vandalay110

Marc Edwards writes that "Photoshop doesn't and can't dither on the alpha channel." If so, you might be able to fake it by creating a dithered gradient from white to black and then making the white transparent. Alas, it's been a while since I used Photoshop, but the general idea would be something like this:


Create a 16-bit gradient from black to white.
Dither it down to 8-bit.
Create a solid black layer and add a layer mask to it.
Copy the dithered gradient into the layer mask (and invert it, if needed).
Apply the layer mask to get a nicely dithered gradient from black to transparent.


(Yes, I know this is more of a comment than an answer, but it got too long to fit into the comment box.)

10% popularity Vote Up Vote Down


 

@Twilah924

Yes, it's possible to create high quality gradients. There's lots of factors to take into consideration though.


Photoshop doesn't and can't dither on the alpha channel. You're better using solid colours, if possible. Also, try to avoid layer opacity. Create the gradient using the exact colours you need. Edit: Photoshop CC 2014.2 added alpha channel dithering. :)
There can be some cumulative rounding errors if your image editor is using 8 bit per channel colour depth. The best quality way to generate a gradient that's created from several layers (with blending modes and opacity at play) is to render at a higher bit depth, then dither down to 8 bit per channel, if possible. Photoshop can do this. If you want an all solid gradient created from one layer, 8 bit per channel is ok (16 bit is only handy when there's layer blending involved).
Dithering is really, really important. (See previous point.)
Don't use Illustrator. It's 8 bit per channel and doesn't dither.
Image scaling will ruin the good work dithering has done, so you'll need to create the image at the correct size from the outset.
Most laptops have 6 bit per channel displays with some animated dithering tricks to make things appear better. Obviously you're fighting the display and smooth results may not be possible, due to the display. The new MacBook Pro with Retina display is a notable exception — it has a 24 bit IPS display. Edit: Laptop displays have improved a bit since this post!
As thebodzio has suggested, other OS-level processing can mangle things as well.
If you do use 16 bit mode in Photoshop, test it against 8 bit mode. There's certain circumstances where 8 bit mode looks better and other circumstances where 16 bit mode is better. Basic rule of thumb: If you have one gradient, use 8 bit with dithering. If you have several layers and gradients using opacity, use 16 bit mode.




Looking at your image, it seems like there's some other destructive conversion happening. Are you using Save For Web? Do you have Convert to sRGB turned on? If so, turn it off (it's the easiest way to ruin the quality of your images, and make destructive colour changes at the same time).

10% popularity Vote Up Vote Down


 

@Nickens508

Noise and dither usually yield quite good results. There's a couple of things that may make “banding” more apparent:


“start” and “stop” colors
gradient size (banding becomes more apparent when “start” and
“stop” points are getting farther from each other—gradient have to be “projected” on more samples with the constant number of available brightness values),
miscallibrated/poor quality monitor (have you tried to view your gradients on different monitors?),
reduced “per-channel” color resolution in system settings (seems unlikely nowadays since most systems use 32 bps settings, but still a possibility),
“wild” video card gamma settings (e.g. in “video card control panel” or gamme loader like Adobe Gamma Loader),
too “agressive” monitor profile (again view-on-other-monitors test should provide some hints about it),
reduced bit depth of an image.


Also it would be useful to know what your target device is. There's a difference how much you can “spread” your gradient whether you're targeting print (what kind of print also matters e.g.: screens like AM, pseudo-stochastic, stochastic) computer monitors or mobile devices displays. It also makes difference then wether you use raster graphics or vector graphics.

Bottom line is: this is quite complex subject :).

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme