Sign up now! · Forgot password?
RSS/Atom feed Twitter

GIMP's gradients are not smooth?

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

12 of 12 messages available
Toggle history

Please log in to manage your subscriptions.

GIMP's gradients are not smooth? Anthony DiSante 09 Jan 04:05
  GIMP's gradients are not smooth? John Coppens 09 Jan 05:33
  GIMP's gradients are not smooth? Sven Neumann 09 Jan 11:34
   GIMP's gradients are not smooth? Anthony DiSante 09 Jan 19:13
    GIMP's gradients are not smooth? Sven Neumann 10 Jan 11:22
     GIMP's gradients are not smooth? Anthony DiSante 10 Jan 19:04
      GIMP's gradients are not smooth? Sven Neumann 10 Jan 19:50
    GIMP's gradients are not smooth? Sven Neumann 10 Jan 12:24
  GIMP's gradients are not smooth? photocomix 10 Jan 15:54
   GIMP's gradients are not smooth? mac9416 10 Jan 16:32
    GIMP's gradients are not smooth? Sven Neumann 10 Jan 19:52
   GIMP's gradients are not smooth? GSR - FR 10 Jan 22:27
Anthony DiSante
2010-01-09 04:05:29 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

Hello,

I'm trying to create a smooth radial gradient in GIMP. I'm doing what I guess is the obvious thing: use the Blend/Gradient tool, set the shape to Radial, and draw it. This gives me a decent gradient, but it's not actually smooth. And it's especially unsmooth when I set the gradient layer's opacity to ~25%, which is where I want it to be for the effect I'm trying to achieve.

Here are my files:

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.xcf.gz

As you can see, there are obvious striations there, rather than a smooth gradient.

What am I doing wrong? I've tried it with and without dithering, adaptive supersampling, etc; none of that seems to improve it.

I'm using GIMP 2.6.7 on Ubuntu, if that makes any difference.

Thanks,

John Coppens
2010-01-09 05:33:47 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On Fri, 08 Jan 2010 22:05:29 -0500 Anthony DiSante wrote:

As you can see, there are obvious striations there, rather than a smooth gradient.

Hi, Anthony.

I believe the problem is that you are making a gray gradient (which means that all three colors are changing equally). This means that you have only 256 levels available to render the gradient.

Then you are trying to produce a gradient from value 84 to 129, which are only 55 steps, over a distance of couple of 100 pixels - this causes the banding.

I may be wrong here - I haven't used it yet - but I believe GEGL provides you with a lot more precision in the colors. You may not be able to see it on the screen, as your monitor probably has the same 256 level limit, and you'll have to use a special output format for the same reason (eg. 16 bit PNG).

This kind of problem frequently appears in the sky part of images, the the blue gradient can present a real challenge.

John

Sven Neumann
2010-01-09 11:34:56 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On Fri, 2010-01-08 at 22:05 -0500, Anthony DiSante wrote:

Here are my files:

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.xcf.gz

As you can see, there are obvious striations there, rather than a smooth gradient.

On what display are you viewing these images? Your gradients only use a small subset of the RGB color-space (about a few dozen colors). Most modern displays are not able to render all the 16 million colors of the 24bit RGB color-space. Modern LCD panels, unless you spend a lot of money, are limited to somewhat like 20 or 18 bits. So that will further reduce the amount of colors used to display your gradients.

If you enable dithering and look at the results on a good monitor, favorably a well-calibrated CRT, then the gradients should appear reasonably smooth.

Sven

Anthony DiSante
2010-01-09 19:13:09 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On 01/09/2010 05:35 AM, Sven Neumann wrote:

On Fri, 2010-01-08 at 22:05 -0500, Anthony DiSante wrote:

Here are my files:

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.xcf.gz

As you can see, there are obvious striations there, rather than a smooth gradient.

On what display are you viewing these images? Your gradients only use a small subset of the RGB color-space (about a few dozen colors). Most modern displays are not able to render all the 16 million colors of the 24bit RGB color-space. Modern LCD panels, unless you spend a lot of money, are limited to somewhat like 20 or 18 bits. So that will further reduce the amount of colors used to display your gradients.

If you enable dithering and look at the results on a good monitor, favorably a well-calibrated CRT, then the gradients should appear reasonably smooth.

Sven

My monitor is not a CRT, but I think it's pretty good: it's a Samsung 2253BW LCD, from 2008. Not sure if this tells you much, but on this monitor I can easily distinguish every shade in the color scale from dpreview.com:

http://nodivisions.com/stuff/ext_posts/dpreview.com-color-scale.jpg

But I don't think this is a monitor issue. Here's an image of a gradient that I found on the web:

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

On my monitor, that looks extremely smooth: I need to blow it up to ~200% before I see the striations, and even then they're nowhere near as rough looking as in the gradient I created in GIMP. Is that because this is a color gradient whereas my GIMP gradient is in gray?

Thanks,

Sven Neumann
2010-01-10 11:22:43 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On Sat, 2010-01-09 at 13:13 -0500, Anthony DiSante wrote:

My monitor is not a CRT, but I think it's pretty good: it's a Samsung 2253BW LCD, from 2008. Not sure if this tells you much, but on this monitor I can easily distinguish every shade in the color scale from dpreview.com:

http://nodivisions.com/stuff/ext_posts/dpreview.com-color-scale.jpg

But I don't think this is a monitor issue. Here's an image of a gradient that I found on the web:

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

On my monitor, that looks extremely smooth: I need to blow it up to ~200% before I see the striations, and even then they're nowhere near as rough looking as in the gradient I created in GIMP. Is that because this is a color gradient whereas my GIMP gradient is in gray?

Oh, are you trying to create this gradient on an image in gray-scale mode? If you do that, then you are effectively disabling dithering. Dithering works by introducing errors and the full RGB color-space is needed for such dithering to yield the desired result.

Sven

Sven Neumann
2010-01-10 12:24:27 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

Hi,

On Sat, 2010-01-09 at 13:13 -0500, Anthony DiSante wrote:

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

Not a fair comparison. Your unsmooth gradient has a much smaller range than the image of the smooth gradient you are comparing it too. And you ignore the fact that the smooth gradient is not a grayscale gradient.

Sven

2010-01-10 15:54:49 UTC (almost 11 years ago)
postings
65
contact
Send private message

GIMP's gradients are not smooth?

You already get a lot of good advices

I will add that just apply a simplicistic but very effective trick may do marvels

just some gaussian blur on your gradient may create all the smoothness you may desire ...more the range, more smoothness

(you can't save "as gradient" a blurred gradient but you may well apply gaussian blur after applied the gradient)

Hello,

I'm trying to create a smooth radial gradient in GIMP. I'm doing what I

guess

is the obvious thing: use the Blend/Gradient tool, set the shape to Radial,

and draw it. This gives me a decent gradient, but it's not actually smooth.

And it's especially unsmooth when I set the gradient layer's opacity to

~25%,

which is where I want it to be for the effect I'm trying to achieve.

Here are my files:

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.xcf.gz

As you can see, there are obvious striations there, rather than a smooth

gradient.

What am I doing wrong? I've tried it with and without dithering, adaptive supersampling, etc; none of that seems to improve it.

I'm using GIMP 2.6.7 on Ubuntu, if that makes any difference.

Thanks,

mac9416
2010-01-10 16:32:03 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On the contrary, applying a Gaussian blur will have no effect. The gradient is already as smooth as it will get.

Anthony, is it absolutely necessary that you have a white>transparency gradient layer over a background layer? I was able to eyedrop the center color and outer color and create a one-layer gradient that looks very smooth.

I can't articulate why a one-layer gradient looks better than semi-transparent gradient over a background, but it certainly seems to be the case.

http://mac9416.keryxproject.org/images/gimp-smooth-gradient.png http://mac9416.keryxproject.org/images/gimp-smooth-gradient.xcf.gz

On Sun, Jan 10, 2010 at 8:54 AM, photocomix wrote:

You already get a lot of good advices

I will add that just apply a simplicistic but very effective trick may do marvels

just some gaussian blur on your gradient may create all the smoothness you may desire ...more the range, more smoothness

(you can't save "as gradient" a blurred gradient but you may well apply gaussian blur after applied the gradient)

Hello,

I'm trying to create a smooth radial gradient in GIMP.  I'm doing what I

guess

is the obvious thing: use the Blend/Gradient tool, set the shape to Radial,

and draw it.  This gives me a decent gradient, but it's not actually smooth.

And it's especially unsmooth when I set the gradient layer's opacity to

~25%,

which is where I want it to be for the effect I'm trying to achieve.

Here are my files:

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.xcf.gz

As you can see, there are obvious striations there, rather than a smooth

gradient.

What am I doing wrong?  I've tried it with and without dithering, adaptive supersampling, etc; none of that seems to improve it.

I'm using GIMP 2.6.7 on Ubuntu, if that makes any difference.

Thanks,

--
photocomix (via www.gimpusers.com)

Anthony DiSante
2010-01-10 19:04:08 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On 01/10/2010 05:22 AM, Sven Neumann wrote:

On Sat, 2010-01-09 at 13:13 -0500, Anthony DiSante wrote:

My monitor is not a CRT, but I think it's pretty good: it's a Samsung 2253BW LCD, from 2008. Not sure if this tells you much, but on this monitor I can easily distinguish every shade in the color scale from dpreview.com:

http://nodivisions.com/stuff/ext_posts/dpreview.com-color-scale.jpg

But I don't think this is a monitor issue. Here's an image of a gradient that I found on the web:

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

On my monitor, that looks extremely smooth: I need to blow it up to ~200% before I see the striations, and even then they're nowhere near as rough looking as in the gradient I created in GIMP. Is that because this is a color gradient whereas my GIMP gradient is in gray?

Oh, are you trying to create this gradient on an image in gray-scale mode?

No, it's an RGB-mode image; it's just that the only colors I'm using in it are white and gray.

On 01/10/2010 06:24 AM, Sven Neumann wrote: > On Sat, 2010-01-09 at 13:13 -0500, Anthony DiSante wrote: >
>>>> http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg >
>> http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg >
> Not a fair comparison. Your unsmooth gradient has a much smaller range > than the image of the smooth gradient you are comparing it too. >

I don't think that's it either. Here's the smooth one again, along with a new one created in GIMP with the same dimensions as the smooth one:

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient-smaller.jpg

That one's better, but still has more visible striations than the non-GIMP image.

Or by "range" are you referring to white-to-gray vs. white-to-blue? Am I running out of intermediate colors faster because white and gray are more similar than white and blue?

Ideally what I'd like is a white radial gradient with a transparent background, approx. 800px wide and 25% opaque, which I could then overlay on any colored background in different situations. But I guess the color of the background will affect how smooth the gradient appears. Still, I can't seem to re-create that non-GIMP smooth gradient using GIMP, even on the same color background.

Thanks,

Sven Neumann
2010-01-10 19:50:40 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

On Sun, 2010-01-10 at 13:04 -0500, Anthony DiSante wrote:

On 01/10/2010 05:22 AM, Sven Neumann wrote:

On Sat, 2010-01-09 at 13:13 -0500, Anthony DiSante wrote:

My monitor is not a CRT, but I think it's pretty good: it's a Samsung 2253BW LCD, from 2008. Not sure if this tells you much, but on this monitor I can easily distinguish every shade in the color scale from dpreview.com:

http://nodivisions.com/stuff/ext_posts/dpreview.com-color-scale.jpg

But I don't think this is a monitor issue. Here's an image of a gradient that I found on the web:

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

On my monitor, that looks extremely smooth: I need to blow it up to ~200% before I see the striations, and even then they're nowhere near as rough looking as in the gradient I created in GIMP. Is that because this is a color gradient whereas my GIMP gradient is in gray?

Oh, are you trying to create this gradient on an image in gray-scale mode?

No, it's an RGB-mode image; it's just that the only colors I'm using in it are white and gray.

On 01/10/2010 06:24 AM, Sven Neumann wrote: > On Sat, 2010-01-09 at 13:13 -0500, Anthony DiSante wrote: >
>>>> http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient.jpg >
>> http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg >
> Not a fair comparison. Your unsmooth gradient has a much smaller range > than the image of the smooth gradient you are comparing it too. >

I don't think that's it either. Here's the smooth one again, along with a new one created in GIMP with the same dimensions as the smooth one:

http://nodivisions.com/stuff/ext_posts/smooth-gradient.jpg

http://nodivisions.com/stuff/ext_posts/gimp-unsmooth-gradient-smaller.jpg

That one's better, but still has more visible striations than the non-GIMP image.

Or by "range" are you referring to white-to-gray vs. white-to-blue? Am I running out of intermediate colors faster because white and gray are more similar than white and blue?

Range was referring to the range of colors your gradient goes through. Your start and end colors are very close to each other. So there is only a very limited range of colors between them. That is different in the smooth gradient you are comparing to. Its gradient covers a larger color range.

I don't think you can substantially better results than what GIMP will create for you. But if you are not happy about the result, feel free to use different software or to patch GIMP to yield a better result.

Sven

Sven Neumann
2010-01-10 19:52:49 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

Hi,

On Sun, 2010-01-10 at 09:32 -0600, mac9416 wrote:

Anthony, is it absolutely necessary that you have a white>transparency gradient layer over a background layer? I was able to eyedrop the center color and outer color and create a one-layer gradient that looks very smooth.

I can't articulate why a one-layer gradient looks better than semi-transparent gradient over a background, but it certainly seems to be the case.

http://mac9416.keryxproject.org/images/gimp-smooth-gradient.png http://mac9416.keryxproject.org/images/gimp-smooth-gradient.xcf.gz

Oh, if Anthony is blending a gradient over a background, then it's absolutely not surprising that he gets visible banding. At least not until GIMP starts to use higher bit-depths than 8bit per channel.

Sven

GSR - FR
2010-01-10 22:27:28 UTC (almost 11 years ago)

GIMP's gradients are not smooth?

Hi,
forums@gimpusers.com (2010-01-10 at 1554.49 +0100):

You already get a lot of good advices

I will add that just apply a simplicistic but very effective trick may do marvels

just some gaussian blur on your gradient may create all the smoothness you may desire ...more the range, more smoothness

Err, no, in cases like this, when a smooth transition shows bands because the colour change is small but the zone is big, the hack is to use Spread filter, AKA poor man dithering. It requires proper masking, only work with bands that should be smoother but have no real detail, etc, etc, but sometimes it can do the trick to fix problems (in photos or after compositing many layers... if using a gradient, first try dithering option there, as already suggested).

GSR