RSS/Atom feed Twitter
Site is read-only, email is disabled

Tablets and sub-pixel sampling

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.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

23 of 23 messages available
Toggle history

Please log in to manage your subscriptions.

Tablets and sub-pixel sampling Martin Vollrathson 26 Jul 00:45
  Tablets and sub-pixel sampling Sven Neumann 26 Jul 03:27
   Tablets and sub-pixel sampling Martin Vollrathson 26 Jul 11:59
    Tablets and sub-pixel sampling Martin Vollrathson 26 Jul 12:03
    Tablets and sub-pixel sampling Joao S. O. Bueno Calligaris 26 Jul 14:53
     Tablets and sub-pixel sampling Martin Vollrathson 26 Jul 15:20
      Tablets and sub-pixel sampling Joao S. O. Bueno Calligaris 26 Jul 15:51
       Tablets and sub-pixel sampling Martin Vollrathson 26 Jul 16:20
        Tablets and sub-pixel sampling GSR - FR 26 Jul 16:49
    Tablets and sub-pixel sampling GSR - FR 26 Jul 16:35
     Tablets and sub-pixel sampling Martin Vollrathson 26 Jul 16:58
      Tablets and sub-pixel sampling GSR - FR 26 Jul 19:15
     Tablets and sub-pixel sampling Sven Neumann 27 Jul 12:17
      Tablets and sub-pixel sampling GSR - FR 27 Jul 16:08
    Tablets and sub-pixel sampling Sven Neumann 27 Jul 12:13
     Tablets and sub-pixel sampling Martin Vollrathson 27 Jul 16:58
      Tablets and sub-pixel sampling michael chang 27 Jul 18:55
       Tablets and sub-pixel sampling Martin Vollrathson 27 Jul 21:45
      Tablets and sub-pixel sampling Sven Neumann 28 Jul 01:29
       Tablets and sub-pixel sampling Martin Vollrathson 28 Jul 01:47
        Tablets and sub-pixel sampling David Herman 28 Jul 07:34
         Tablets and sub-pixel sampling Martin Vollrathson 28 Jul 09:30
          Tablets and sub-pixel sampling David Herman 28 Jul 17:17
Martin Vollrathson
2005-07-26 00:45:05 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

I have a slight problem with using my new Wacom Volito tablet in GIMP. Everything works just fine except for one detail. It seems impossible do draw a smooth line. I was under the impression that GIMP would paint at a sub-pixel level because of the tablets high resolution but the brush always aligns at a pixel level. Therefor it's rather easy to draw a straight vertical or horizontal line but when using my tablet, obviusly that's not what I want. If I, for example, try to draw a circle, every part of the circle that's not entirly horizontal, vertical or at a 45 degree angle will be jagged and ugly.

Does anybody know if I've just missed some setting or if this is "normal" behaviour?

/Martin Vollrathson

Sven Neumann
2005-07-26 03:27:27 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,

Martin Vollrathson writes:

I have a slight problem with using my new Wacom Volito tablet in GIMP. Everything works just fine except for one detail. It seems impossible do draw a smooth line. I was under the impression that GIMP would paint at a sub-pixel level because of the tablets high resolution but the brush always aligns at a pixel level. Therefor it's rather easy to draw a straight vertical or horizontal line but when using my tablet, obviusly that's not what I want. If I, for example, try to draw a circle, every part of the circle that's not entirly horizontal, vertical or at a 45 degree angle will be jagged and ugly.

Does anybody know if I've just missed some setting or if this is "normal" behaviour?

Are you using the pencil tool perhaps? The one and only purpose of the pencil tool is to have a hard edge aligned with the pixel grid.

Sven

Martin Vollrathson
2005-07-26 11:59:22 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Sven Neumann wrote:

Are you using the pencil tool perhaps? The one and only purpose of the pencil tool is to have a hard edge aligned with the pixel grid.

No, I'm using the brush tool. And there are no hard edges. The brush just seems to align with the pixel grid anyway.

http://mavos.net/dump/jagged_line.png

There's a screenshot of a "jagged" curve in a GIMP window. As you can see, the lines are unnaturally straight. There's no way I could draw that straight if the brush was locking itself to the pixel grid, considering that the tablet has a 2000 or so DPI resolution.

/Martin

Martin Vollrathson
2005-07-26 12:03:20 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Martin Vollrathson wrote:

There's a screenshot of a "jagged" curve in a GIMP window. As you can see, the lines are unnaturally straight. There's no way I could draw that straight if the brush was locking itself to the pixel grid, considering that the tablet has a 2000 or so DPI resolution.

Correction: ”if the brush was NOT locking itself”

/Martin

Joao S. O. Bueno Calligaris
2005-07-26 14:53:52 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

On Tuesday 26 July 2005 06:59, Martin Vollrathson wrote:

Sven Neumann wrote:

Are you using the pencil tool perhaps? The one and only purpose of the pencil tool is to have a hard edge aligned with the pixel grid.

No, I'm using the brush tool. And there are no hard edges. The brush just seems to align with the pixel grid anyway.

http://mavos.net/dump/jagged_line.png

There's a screenshot of a "jagged" curve in a GIMP window. As you can see, the lines are unnaturally straight. There's no way I could draw that straight if the brush was locking itself to the pixel grid, considering that the tablet has a 2000 or so DPI resolution.

?????????????????????
Given this picture, I do not see how it could be physically any different from what you presented us - tehre simply are not more pixels on that image.

The subpixel colorign is there as you can see: almost no pixels is 100% black.

Try using a higher resolution on your image - that will give you more pixels, and they will not look "locked".

IF you want to reduce jagginess anyway, after you are done with your drawing, copy your layer (t preserve the original drawing in any case), apply a gaussian blur with radius 2 - 3, and use the curves tool making an "S" shapped curve.

JS ->

/Martin

Martin Vollrathson
2005-07-26 15:20:03 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Joao S. O. Bueno Calligaris wrote:

Given this picture, I do not see how it could be physically any different from what you presented us - tehre simply are not more pixels on that image.

No, that's right, there are no more pixels. But that's exactly the point. With the very high resolution of the tablet, I should be able to move the brush at a sub-pixel level. Take a look at this new screenshot:

http://mavos.net/dump/jagged_line_2.png

The black line on the left is drawn using the shift-key with the brush tool, to make a straight line.

The two pink lines are my attempts to paint the same line just using my hand and my pen. Assuming my hand was unrealistically steady I should be able to produce the exact same results. Of course I cannot do this but I should at least be able to come closer than this. Can you see how the brush wants to go in exact vertical direction? _That_ is what I should not be able to do. :-)

/Martin

Joao S. O. Bueno Calligaris
2005-07-26 15:51:50 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

On Tuesday 26 July 2005 10:20, Martin Vollrathson wrote:

Joao S. O. Bueno Calligaris wrote:

Given this picture, I do not see how it could be physically any different from what you presented us - tehre simply are not more pixels on that image.

No, that's right, there are no more pixels. But that's exactly the point. With the very high resolution of the tablet, I should be able to move the brush at a sub-pixel level. Take a look at this new screenshot:

http://mavos.net/dump/jagged_line_2.png

The black line on the left is drawn using the shift-key with the brush tool, to make a straight line.

The two pink lines are my attempts to paint the same line just using my hand and my pen. Assuming my hand was unrealistically steady I should be able to produce the exact same results. Of course I cannot do this but I should at least be able to come closer than this. Can you see how the brush wants to go in exact vertical direction? _That_ is what I should not be able to do. :-)

/Martin

There are no places on the image to store the information you want. An image is made out of pixels - what is freferred as sub-pixels is the ability to fill a pixel partially - not of subdividing a single pixel into more than one shade of gray. Darw with the pencil tool instead - you will notice the difference.

What I told you to do is to incresae the resolution of your image, so that you get MORE pixels. That is, if you are working in a 800x600 image, use a 1600x1200 or even a 3200x2400 image to paint on (scaled down to 25%) - Then if the GIMP gives you strange results due to the painting happening on a zoomed out image, you write here, and the GIMP-developers will see if it can be imporoved in the program.

Martin Vollrathson
2005-07-26 16:20:51 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Joao S. O. Bueno Calligaris wrote:

There are no places on the image to store the information you want. An image is made out of pixels - what is freferred as sub-pixels is the ability to fill a pixel partially - not of subdividing a single pixel into more than one shade of gray. Darw with the pencil tool instead - you will notice the difference.

Well yes, in the end result, the smallest element is a pixel. But with sub-pixel positioning, of course I mean adjusting the shade of gray on each side of the curve I'm drawing. Anti-aliasing.

So simplify my explanation, I will provide yet another example... :-)

http://mavos.net/dump/jagged_line_3.png

This time I chose to illustrate my point with a curve. Guess which one is hand drawn and which is a stroked path.

The path is stroked with the brush tool, 3x3 soft brush. The exact same brush is then used in an attempt to paint and identical line by hand. I see no reason why I should not be able to produce the exact same result. The stroked path does not care about pixel boundaries, it simply adjusts the shade of gray to follow the path more closely.

/Martin

GSR - FR
2005-07-26 16:35:56 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,
mavos@mavos.net (2005-07-26 at 1159.22 +0200):

Sven Neumann wrote:

Are you using the pencil tool perhaps? The one and only purpose of the pencil tool is to have a hard edge aligned with the pixel grid.

No, I'm using the brush tool. And there are no hard edges. The brush just seems to align with the pixel grid anyway.

http://mavos.net/dump/jagged_line.png

There's a screenshot of a "jagged" curve in a GIMP window. As you can see, the lines are unnaturally straight. There's no way I could draw that straight if the brush was locking itself to the pixel grid, considering that the tablet has a 2000 or so DPI resolution.

That is an issue that has existed for a long time, Gimp uses the screen coordinates to paint. So zoom out, and get crappy lines, no curvy smoothing or anything. Only way to get non polygonal lines is to zoom in, which severely limits what you can paint in a single stroke and gets in the middle of workflows that rely in constant global view and work area, obviously.

Anybody can test, with mouse too, a 512*512 image will be enough. Set zoom to 4:1 and paint a rough circle with Paintbrush and Circle 01 brush (100 or so pixels of diameter, look at the guides before starting), then set zoom to 1:4 and paint a similar circle next to it (paint, not select and stroke). Compare how zoomed in gives a smooth line and zoomed out gives seems to be based about jumps of 4 pixels.

I am unable to find the bug about this, I think there is one, I managed to find lots about the display side of the problem, but not checked all of them to see if the input issue is there (I am sure the issue about input has been raised enough times that people would remember it... seems not due the other replies, always pointing to "not using Pencil?" or "blur your paint"). One of such references to the issue is in last line of comment #1 of http://bugzilla.gnome.org/show_bug.cgi?id=134410

May I suggest you fill a bug? If someone else finds the original, yours will be closed as duplicate and all happy. And if I remember wrongly, well, now there will be such bug.

GSR

GSR - FR
2005-07-26 16:49:44 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,
mavos@mavos.net (2005-07-26 at 1620.51 +0200):

So simplify my explanation, I will provide yet another example... :-)

http://mavos.net/dump/jagged_line_3.png

This time I chose to illustrate my point with a curve. Guess which one is hand drawn and which is a stroked path.

See the next image, both curves hand drawn as described in my other mail (zoom 1:4 vs 4:1, mouse, Paintbrush, Circle 01 brush).

http://infernal-iceberg.com/gimp/tmp/zoom-1_4-vs-4_1.png

It is an input issue, not a how many pixels you have. Stroked path does not have a view based limitation (or maybe only for control points, dunno, but that is small issue that could pass without notice), paint tools do.

GSR

Martin Vollrathson
2005-07-26 16:58:59 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

GSR - FR wrote:

That is an issue that has existed for a long time, Gimp uses the screen coordinates to paint.

Ah, thanks, now at least I know it's a real bug and not just my expectations being to high. :-)

/Martin

GSR - FR
2005-07-26 19:15:22 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,
mavos@mavos.net (2005-07-26 at 1658.59 +0200):

Ah, thanks, now at least I know it's a real bug and not just my expectations being to high. :-)

Thanks http://bugzilla.gnome.org/show_bug.cgi?id=311603
GSR

Sven Neumann
2005-07-27 12:13:40 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Him

Martin Vollrathson writes:

Sven Neumann wrote:

Are you using the pencil tool perhaps? The one and only purpose of the pencil tool is to have a hard edge aligned with the pixel grid.

No, I'm using the brush tool. And there are no hard edges. The brush just seems to align with the pixel grid anyway.

http://mavos.net/dump/jagged_line.png

There's a screenshot of a "jagged" curve in a GIMP window. As you can see, the lines are unnaturally straight. There's no way I could draw that straight if the brush was locking itself to the pixel grid, considering that the tablet has a 2000 or so DPI resolution.

Your mouse only delivers pixel coordinates. So if you stroke a paint, GIMP gets delivered a handful of pixel coordinates and interpolates a paint stroke between them. If two subsequent coordinates have the same horizontal or vertical coordinate, you end up with a line that is aligned with the pixel grid.

If you are using a tablet, the tablet should deliver higher precision coordinates. But is that actually the case? Are you really using your tablet as extended input device or is it only delivering core pointer events for some reason?

Sven

Sven Neumann
2005-07-27 12:17:16 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,

GSR - FR writes:

That is an issue that has existed for a long time, Gimp uses the screen coordinates to paint.

Where's the issue here? Screen coordinates is what GIMP gets delivered. It can hardly guess what you meant to draw in physical coordinates of the virtual paper. You are drawing on screen and that's it. What's your point?

Sven

GSR - FR
2005-07-27 16:08:28 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,
sven@gimp.org (2005-07-27 at 1217.16 +0200):

That is an issue that has existed for a long time, Gimp uses the screen coordinates to paint.

Where's the issue here? Screen coordinates is what GIMP gets delivered. It can hardly guess what you meant to draw in physical coordinates of the virtual paper. You are drawing on screen and that's it. What's your point?

That it could try something better than linear interpolation so at least mouse users (or people with misconfigured tablets, which sadly seems too common latelly) would get better results.

GSR

Martin Vollrathson
2005-07-27 16:58:22 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Sven Neumann wrote:

If you are using a tablet, the tablet should deliver higher precision coordinates. But is that actually the case? Are you really using your tablet as extended input device or is it only delivering core pointer events for some reason?

Ok, so at least the GIMP is supposed to use the precision coordinates from the tablet? That's all I expect and desire.

I've configured my tablet as an extended input device which also delivers core events. My first thought was that the core events were confusing the GIMP so I turned the core events off completely for the tablet but the results were the same.

But as long as I know that the GIMP will take care of the high resolution coordinates if they're being fed to it correctly, then I suppose there's still something wrong with my setup. I can't see what I could possibly have done wrong though.

/Martin

michael chang
2005-07-27 18:55:56 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

On 7/27/05, Martin Vollrathson wrote:

Sven Neumann wrote:

If you are using a tablet, the tablet should deliver higher precision coordinates. But is that actually the case? Are you really using your tablet as extended input device or is it only delivering core pointer events for some reason?

Ok, so at least the GIMP is supposed to use the precision coordinates from the tablet? That's all I expect and desire.

I've configured my tablet as an extended input device which also delivers core events. My first thought was that the core events were confusing the GIMP so I turned the core events off completely for the tablet but the results were the same.

But as long as I know that the GIMP will take care of the high resolution coordinates if they're being fed to it correctly, then I suppose there's still something wrong with my setup. I can't see what I could possibly have done wrong though.

Are you running Windows or Linux?

Martin Vollrathson
2005-07-27 21:45:38 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

michael chang wrote:

Are you running Windows or Linux?

What's "Windows"? :-)

No, I'm using Linux and X.org X11 version 6.8.2.

Still trying to figure out what the linuxwacom driver is actually sending to GIMP. The wacdump tool shows everyhthing as it's supposed to be but the xidump tool doesn't show any output so until I figure that one out I can't really be sure what XInput is telling the GIMP. I tried once again to use the tablet as just an extended device, without core events and I still get the same results in the GIMP - brush sticking to screen coordinates.

Is there a way to make GIMP print the coordinates from an extended input device somewhere?

/Martin

Sven Neumann
2005-07-28 01:29:33 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Hi,

Martin Vollrathson writes:

Ok, so at least the GIMP is supposed to use the precision coordinates from the tablet? That's all I expect and desire.

As long as the tablet is configured as an extended input device, shows up in the input device configuration dialog and is enabled there.

Sven

Martin Vollrathson
2005-07-28 01:47:09 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

Sven Neumann wrote:

Ok, so at least the GIMP is supposed to use the precision coordinates from the tablet? That's all I expect and desire.

As long as the tablet is configured as an extended input device, shows up in the input device configuration dialog and is enabled there.

Yup, I can see that now. I found a rather vaguely documented feature in the linuxwacom driver called "RawFilter", which just happens to be turned on by deafult. When I turn it off everything works fine.

I'm just surprised this question doesn't turn up all the time.

/Martin

David Herman
2005-07-28 07:34:56 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

On Wednesday 27 July 2005 4:47 pm, Martin Vollrathson wrote:

Sven Neumann wrote:

Ok, so at least the GIMP is supposed to use the precision coordinates from the tablet? That's all I expect and desire.

As long as the tablet is configured as an extended input device, shows up in the input device configuration dialog and is enabled there.

Yup, I can see that now. I found a rather vaguely documented feature in the linuxwacom driver called "RawFilter", which just happens to be turned on by deafult. When I turn it off everything works fine.

I'm curious where you found that info. I have a problem w/ gimp and my wacom driver but can't really describe what the problem is. perhaps turning off "RawFilter" might help in my situation as well.

Thanks

Martin Vollrathson
2005-07-28 09:30:26 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

David Herman wrote:

I'm curious where you found that info. I have a problem w/ gimp and my wacom driver but can't really describe what the problem is. perhaps turning off "RawFilter" might help in my situation as well.

Running "xsetwacom list param" shows: RawFilter - Enables and disables filtering of raw data, default is true.

There's no explanation what that means though.

xsetwacom set [devicename] RawFilter false ...to turn it off.

/Martin

David Herman
2005-07-28 17:17:16 UTC (almost 19 years ago)

Tablets and sub-pixel sampling

On Thursday 28 July 2005 12:30 am, Martin Vollrathson wrote:

David Herman wrote:

I'm curious where you found that info. I have a problem w/ gimp and my wacom driver but can't really describe what the problem is. perhaps turning off "RawFilter" might help in my situation as well.

Running "xsetwacom list param" shows: RawFilter - Enables and disables filtering of raw data, default is true.

There's no explanation what that means though.

xsetwacom set [devicename] RawFilter false ...to turn it off.

Thanks Martin, I'll give it a try