Creating a Smooth Gradient?

CI
Posted By
Cyclops_Images
Sep 21, 2006
Views
1542
Replies
35
Status
Closed
Hi there:
I shot a TV set and we decided to add a white to transparent gradient on the otherwise black TV screen to create depth for shaping.
What I did was create a circular gradient in the top left corner of the TV set. It was set to go from White to Transparent.
Then I reduced the opacity to around 40% to make it seem more realistic. The problem is that there are very visible bands from where it starts to where it fades out. These are visibel from 1000% opacity and downwards.
I want the transitions to be smooth smooth smooth
My Layer Blend mode is set to normal
Will changing the blend mode help?
Please help
Thanks

W
Using CS2 9.0.2 on Powerbook with Cinema Display

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

DR
Donald_Reese
Sep 21, 2006
Some people add a small amount of noise to the gradient to hide the bands.
CI
Cyclops_Images
Sep 21, 2006
Wow thanks, so simple and it really helped alot.
Any other ways to do it?

Thanks

W
B
Bernie
Sep 21, 2006
Turning the Ditering option on (in the gradien tool option bar) also helps
PC
Paul_Cutler
Sep 23, 2006
I also only add noise to the offending channel(s).

peace
Y
yassy
Sep 24, 2006
Use "Lasso" tool then enclose the circular gradient then use the "Blur" If you still does not get sharpen or smooth image,try to use "Sharpen" tool.
CC
Chris_Cox
Sep 24, 2006
Blurring may make any banding WORSE (because it’s removing some dithering). And sharpening would certainly make the banding worse (by accentuating the edges).
RM
Rick McCleary
Sep 24, 2006
I also only add noise to the offending channel(s).

Be careful with this approach. You might end up with a color cast due to the fact that the noise is not evenly spread among all the channels.
PC
Paul_Cutler
Sep 24, 2006
Actually I have come to enjoy the slight texture this approach gives me. I haven’t had trouble with color casts, but I will certainly watch for it. Recently I had a black to transparent gradient over a flat pink. Banded extremely fast. I was trying to give some depth to these pink columns. Noise in the black channel fixed the gradient and gave this wonderful texture to the columns. So sometimes this works our quite well actually.

And blurring never did a thing for me regarding banding, like Chris Cox said, it makes it worse most of the time.

peace
Y
yassy
Sep 24, 2006
Blur tool is one of best Photoshop tool ever,I like this tool and I also using the tool when i had gradient problem.And sharpen tool was one of my idea when it had too much blurring.actually it works perfectly as well.
R
Ram
Sep 24, 2006
Oy weh!
PT
Phil_Taz
Sep 24, 2006
Yassy, you are so wrong!

This has been discussed so many times, you need to review your methods.

I have put a question to the photoshop team about banding issues and even after it was passed to QE by Chris Cox, I never had any response….so I guess there is no answer.

Adding noise is the only decent remedy I have seen and I have been using photoshop since 3.0.

Photoshop is a phenomenon, but it is disappointing that there is apparently no answer to the banding and the islands in the bands that I queried Chris on…(even though I went to the trouble of raising the problem here, and, having no objections from the wise forum members, I made and sent samples to Adobe months ago)

I could understand that there is a mathematical reason why bands appear, but photoshop creates more bands on top of the mathematically inevitable ones, that is what bugs me!

I guess we just have to wait for more bit depth to fix the bands, pity that probably wont fix the islands though…..
Y
yassy
Sep 25, 2006
When I adding noise effect,the noise actually appear onto the gradient.also it doesn`t looks smooth either.Anyway,I`m bit misunderstanding this issue but the Original Quetions was "It was set to go from White to Transparent"So I thought that the adding "Blur" is as result as it seems more natural than that…..actually i dont see any big band from these when i set Radious of blur from 1.0 ~2.8 and it looks more naturally without Contrast.When I Adding the Contrast onto the gradient the band will be more accurate.
L
Larryr544
Sep 25, 2006
Add the noise in a greyscale image and then copy and paste that into your color image?
DR
Donald_Reese
Sep 25, 2006
Yassy,you better check out your work closer. gaussian blur definetely makes things worse. it can create banding when implementing it on a photo,even when gradients are not involved. you must add the noise gently to not create too strong an effect, but it will help. zoom in to 100 percent or more to see the effect of the blur you reference. maybe on small prints,you never notice it.
PT
Phil_Taz
Sep 25, 2006
Hi Yassy, sorry if my tone was a little direct, but this issue comes up over and over…..and there seems to be no answer.

Adding noise is the way to go, after adding noise in a blend to transparent, go to /edit/fade/lighten that will stop it adding colour to the transparent or lighter areas. You must do this *straight* after adding noise or you cannot choose to fade.

You can do the same with dark blends, except use ‘darken’ to avoid getting noise in the shadows.

To see the bad side of blurs and bands, add a (temporary) curves layer and increase the highlight end to ‘input 10, output 100’ and you will see the bands and artifacts. These are almost invisible on screen, but may print. If you try different blurring filters and apply this temporary layer, you will see all the different kinds of banding.

Try using 2 overlapping irregularly shaped masks and then put this temp layer over and see the islands I hate!
CC
Chris_Cox
Sep 25, 2006
Phil: banding is an inevitable result of quantization (the fact that we only have 256 values in each channel). Add the 8 bit quantization to printer (or other output device) quantization, and you are bound to get banding somewhere. And noise (dithering) is the appropriate solution. That’s why Photoshop has dithering as an option in the gradient tool, and has an add noise filter.
PT
Phil_Taz
Sep 25, 2006
Thanks, Chris, as you see from my earlier post, I agree with the inevitability of some banding, but I never had any feedback from adobe regarding the islands. I am not wanting to badger you on this, but I did ask months ago and I would be interested in getting past the boilerplate response as this is a common production issue.

(Isn’t the printer 8 bit the same as the channel 8 bit anyhow?)

I have 2, no… 5 questions:

1. why couldn’t gradients be noisy by default?
2. why is banding even worse in masks/filters than gradient tools?
3. why does photoshop only work in steps of 1% when making gradients? (I have shown before that it actually *can* create smaller steps in practice)
4. isnt it odd that illustrator’s blend tool can make smoother blends than photoshop by spreading 256 steps over the actual length of the gradient rather than treating each gradient as a piece of a full gradient? (I realise that photoshop images are more complex, but I am referring to gradients created by gradient tools where the gradient is a separate entity to the rest of the image.)
5. I guess QE still could not figure out why overlapping mask gradients are (illogically) creating contour islands (You passed on my inquiry back in March)?
CC
Chris_Cox
Sep 25, 2006
(no, the printer 8 bits may be only 5 bits, and it goes through curves and halftoning before getting to the paper)

1. They are if you turn on dithering. But there are other uses that don’t need the noise..
2. That depends on how you’re using them.
3. Trying to keep the UI understandable…
4. That makes no sense. And Illustrator always creates banding (because they can’t dither)
5. I don’t know – I don’t recall seeing it
Y
yassy
Sep 25, 2006
Hi Yassy, sorry if my tone was a little direct, but this issue comes up over and over…..and there seems to be no answer.

No problem,Phil.
PT
Phil_Taz
Sep 25, 2006

1. Feh….can’t imagine what the other uses are…

2. actually it doesnt, they are always bandy. At least with coloured gradients the channels are staggered to reduce the appearance, but masks are single channel; couldnt multiple layers be overlapped or smart dithering or something?

3. You’ve got to be kidding! Are you saying Photoshop users cant handle reading decimal places???? Its not only the ui anyhow, the program is capable of doing fractional percentages anyhow, you needn’t change the ui, just the values. Are you saying that there are only 100 steps in a cmyk blend channel because 256 would make the ui messy?

4. You probably dont use illustrator I suppose, but to make a smooth gradient, I make 2 rectangles at 0 and 100% respectively and blend from one to the other in 200 steps (number doesnt matter), Illustrator uses fractional percentages and divides the difference in start and finish values by the number of steps and creates smoother blends than photoshop. (With NO dither)

5. *Thanks*……………..If anyone else *is* interested, here is the sample I sent…..the problem is that *2 prints darker than 1 or 3 and stands out.
This behaviour should not be acceptable.

< http://www.pixentral.com/show.php?picture=1aVGosDgNBKnwnmsB4 IJp00y6Id1>

And if you are persistent (like me), here is an illustrator blend (lower half) beating a photoshop blend 2 to 1 (undithered)…..

< http://www.pixentral.com/show.php?picture=1AAixF8pbWaIIZRZH6 HxdWZh9NUkYe0>
CC
Chris_Cox
Sep 25, 2006

1) Calibration targets, step wedges, etc.

2) No, they’re as accurate as they can be. And again, dithering is there to reduce the quantization issues (we calculate at a higher precision then apply dithering).

3) It’s just the UI. And yes, most users cringe at the sight of decimal places. Internally it’s stored at higher precision. And there are 4096 steps in EVERY Photoshop gradient. If you are in an 8 bit document, then you will get 8 bits of range (256 values, if your colors have that much range).

4) …and that will show more banding than Photoshop because it has only 200 steps and no possibility of dithering. Illustrator cannot generate smooth gradients because of that. And yes, the number of steps matter a lot because with fewer steps you’d get even more visible banding.
4
428ra4
Sep 26, 2006
Phil,

create your gradients on a non transparent Background and not in a layer. You will see a difference regardless of the quantization issues. More bit depth, the type of blend and the make up of said blend will play a roll in the quality of the blend. Noise and a very small amount of blur will help some banding situations, but it’s best to generate blends on a non transparent background and not a transparent layer. Less mathematics in the stew.
MO
Mike_Ornellas
Sep 26, 2006
What also plays havoc on blends is color adjustment layers piled on an image.
PF
Peter_Figen
Sep 26, 2006
How much of your banding is in the image and how much is from the VLUT in your video card? Even the best Barcos and Artisan will show a slight amount of on screen banding that is not in the file. Displays like the Cinema are far more prone to not showing you truly what is in your file.

I’ve done hundreds of gradations across tv screens and monitors. If you can, make your gradient in 16 bits per channel, adding enough noise to smooth it, but check your gradation on an actual output, not just on the screen, especially with that screen.
PT
Phil_Taz
Sep 26, 2006
Thanks, Chris, I always appreciate your candour….

1. Okaaaay, I guess if someone wants to create a step wedge with a gradient tool……. ;^)

I’m not suggesting noise everywhere.

I think my point is not quite clear, if I am making a mask from 25-0 percent over a distance of 256 px, why cant I have 256 steps of 1px/.1 percent each?

Why isnt every single channel gradient 256 steps regardless of range?

Gradients in masks seem to be the weakness, people use them to feather photos and solid colour blocks which is where the problem is evident.
CC
Chris_Cox
Sep 26, 2006
Because 25 percent to zero percent is 255*25/100=64 to 255*0/100=zero, only 64 values out of 256 (assuming 8 bits). So there’s only 64 values you can play with in that range, and it’s going to have 64 steps if it’s longer than 64 pixels. I can give you millions of distance positions, but you’ll still have only 64 values in an 8 bit image.

An 8 bit channel only has 256 values from black to white. If you aren’t using that whole range, then (surprise, surprise) you’re only using part of that range and are limited to the values in the range you’re using.

Gradients in masks are the ones that most need some dithering – because you’re effectively multiplying the mask values with the color values to get the result. But if you use the whole range of the mask (zero to 255, aka black to white) then you’ve got 256 steps. But that still could be visible over a large area, which is why you need dithering.
CC
Chris_Cox
Sep 26, 2006
And if you want real fun: try painting in the individual values in the channels to get the effect you want. You’ll learn a lot about quantization that way. 😉
PT
Phil_Taz
Sep 26, 2006
Well thanks for bending my brain! It may never recover!

However…..you are assuming that values ‘outside’ the 25 % might be used…..what if you drop that and assign 256 steps to the range * max 25 to min 0 * and shift your starting value? Shouldn’t that be possible since you have 4096 values to play with.

Therefore step 1 =255*.25 and step 255=0*.25.

You would have to know the starting value of the mask but that would be 25% and when you extrapolate that, you get fractional steps. So your mask that uses the whole 100% would be the ‘steppiest’ and any other mask would be smoother. Every mask would have 255 steps.

Most problem masks only have issues in the highlight fringe, so lay out the steps logarithmically with the most steps at the highlight end (0 opacity) and no more problems!

This is fun, but I am not joking…..there must be a better way!

(And I will try assigning those values.)

Thanks for indulging me this far, now I have said my piece, I might be able to let it go ;^)
CC
Chris_Cox
Sep 26, 2006
Phil – I have 4096 POSITIONS, not values.
(positions along the gradient from the first to second point)

You can do better by filling a layer with color, then use a black to white gradient on the layer mask (giving 256 levels). But then you have to match your color gradient with the mask gradient (not so easy).

No, you can’t always use all 256 steps. That’s a problem with quantization: there are a fixed number of steps over a fixed range. But that’s what you have to live with to work in 8 bits per channel. 16 bits per channel would have 32768 color steps available per channel.
CI
Cyclops_Images
Sep 26, 2006
Wow, I am impressed with all the discussion this has generated. I agree with you Peter and did not take my monitor’s limitation into consideration. I also will try the 16Bit version next time as well. In the end I added a bit of noise and it looked great. I did notice that if I selected the noise to be monochromatic that it seemed to show up more than leaving it set to the default. Any thoughts on this?

Thanks to all for replying

William
CC
Chris_Cox
Sep 26, 2006
All these things that you normally don’t think about when using the tools — we have to think about (sometimes in excruciating detail) and test.

William – monochromatic noise would make it more visible to the human eye because it creates a luminance change (which humans are more sensitive to). Spreading the noise differently among the channels creates small hue changes and smaller luminance changes that average out in the human eye and are thus less visible. Does that help?
CI
Cyclops_Images
Sep 26, 2006
Thanks Chris it does..

William
MO
Mike_Ornellas
Sep 28, 2006
To add to this – there seems to be excessive banding in 9.0.2 at different zoom factors with mutiple layer adjustments.

Make sure you view your image on screen at 100%

If the banding goes away at that zoom factor, the file is OK as per my contract proof testing.

weird…..
CC
Chris_Cox
Sep 28, 2006
But nothing changed in 9.0.2 related to color, gradients, etc.
MO
Mike_Ornellas
Sep 28, 2006
I don’t know what to tell you.

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections