PDA

View Full Version : Does the Gradient tool suck or what?


markpxxxxx
10-24-2002, 02:43 AM
Does the Gradient tool suck or what?

I can't seem to get a decent gradient out of Photoshop! Try this, for instance:

1) Create a 720x480 pixel file.

2) Use the gradient tool to draw a smooth horizontal transition from black to white.

You will now see faint but clearly discernable vertical banding in the gray areas. I tried to smooth this out with tricks like Gaussian blur but they didn't do anything significant to improve. I need an absolutely smooth unbanded gradient from black to white, and Photoshop doesn't seem to be able to deliver! What to do???

Ranoka
10-24-2002, 10:06 AM
I don't see any noticable banding when I tried this. What colour depth have you set your display at. Also which resolution is your monitor set at? You might also want to check that your Gamma is well configured. hope this can help

markpxxxxx
10-24-2002, 10:35 AM
Depth 8 bits. Adjusting gamma has no effect.

Are you trying it with gradient black to white? There's where it shows up the clearest, and it defintely is there, and even worse it is irregular, with lighter areas appearing before darker ones etc.

I'd be happy to email a sample to anybody to see for themselves. mpalmer@jps.net

Greg Vander Houwen
10-24-2002, 10:46 AM
Ahh yes... the gradient love/hate.

I have yet to get a good answer on this one. In theory, it seems to me, that if you create a 256 pixel wide, grayscale doc, open you info palette, then with the gradient tool (dither off) click on the first left pixel and drag to the last right pixel, it should distribute one level, per column. It does not. If you examine the distribution of tones with the dropper/info box, you will see that the columns are often three or four pixels wide in tones that jump a number of levels. A look at the Histogram will confirm this.

If you run Image Adjustments, Equalize you can "improve" the distribution so that it more closely matches one column per tone, especially in the midtones but there will still be "blocks" in the hightlights and shadows.

A few versions ago Adobe changed how gradients render. It use to be that a gradient like the one above would produce a virtually, flat histogram (as expected). Then they changed it so that it is weighted towards the endpoints. A dithered version will produce a cupped histogram, a non dithered will produce spikes at the endpoints and holes in the midtones.

I have never understood why this the case. The math seems simple enough, one tone per column. I suspect it is a "feature" to help compensate with percieved tonal transitions (in print?) but the result is less than ideal for making a perfect gradient.

Back when I was working on high end film recorders, this drove us nuts. They could render these bands. Our answer was to add about .5 to .7 Gaussian, Mono, Noise.

Good luck ;)

Greg

markpxxxxx
10-24-2002, 10:58 AM
Thanks for the info and tips!

I guess the answer is a resounding YES. Oh well.

sPECtre
10-25-2002, 04:51 AM
To get "real flat gradients", you have to "change the smoothness to zero* to get linearly interpolated gradients, otherwise they're spline interpolated for visual smoothness." (Chris Cox, PS programmer)

*click on the gradient preview in the option bar to access the option

Did you play with the "dither" option, too?

Also, you could try switching to 16 bit, making the gradients, then downsample as this procedure includes a subtle dithering (you can do this in a copy of the file if you want)

As a sidenote, I noticed that My Black to White (the third one in the regular ones list) gradient doesn't go from 0,0,0 to 255,255,255, (it goes to 252, 252, 252 and I don't remind changing it...)

Greg Vander Houwen
10-25-2002, 11:57 AM
Sir sPECtre,

Good info, I had missed the smoothness at zero thing. Interesting...

And my "Black to White", white is at 252. I guess that must be true white that has been spline interpolated for visual smoothness ;).

As to the 16 bit move, I have played with it a bit and haven't seen much improvement if any. Although I haven't done enough looking to say this with much strength. Have you seen improvement with this? I had thought it could be much better, using this like scanners often do with high bit capture and then downsample. But I was not impressed. Maybe I missed something. If nothing else it sure sounds like it might work ;).

Greg

sPECtre
10-28-2002, 01:31 AM
LOL!

Some had success, I didn't had to fight banding until now...
http://www.adobeforums.com/cgi-bin/webx?128@188.gVd4aFvhoCW.819908@.1de5792d

The pictures are gone, but you can see a lot seems to agree!

Hannu Hurme
10-28-2002, 08:19 AM
Thanks Sir Spectre. :)

Looks like Greg isn't only one who's had blind eye towards the smoothness value, I've never really noticed that one.

austizmo
12-29-2002, 02:23 AM
this is a little dit of a dead thread... but i tried setting the smoothness to 0... and this is what happened.

sPECtre
01-02-2003, 03:10 AM
that's what's called banding... that's also why you've got the option to change the setting! you could blur the gradient, but check the "purity" of the gradient with the histogram...