Results 1 to 6 of 6

Thread: Doing very fine lines in GIMP

  1. #1
    Guild Artisan Freodin's Avatar
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    513

    Default Doing very fine lines in GIMP

    I have been running into some problems while trying to get very fine, slightly irregular lines consistently in the way I want them.

    So I have done a little test.
    lines.png

    The two ways of getting regular, precise lines and curves in GIMP is by stroking selections or paths. These shapes were all drawn with the same PAINTBRUSH settings... 100% hardness round brush, 1.5px size and a jitter of 0.3.

    As you can see, stroking a path gives much smoother results for non-orthogonal lines than stroking a selection. Yet for orthogonal lines, stroking the selection gives finer results than the path-stroke.

    These fine lines are what I want. I got these to work very well with selections, and a little additional magic. But as soon as I want to get some more complex shapes, I am stuck. I can't use selections: too blocky, and I can't use paths: too thick.


    Two ideas to solve this problem as yet:
    - forget GIMP for the lines, do all that stuff in Inkscape. That means additional problems with getting the positions right, and how to apply the jitter effect.
    - or, do the whole image at larger size, do it with paths, and see how to best scale it down. That could lead into size problems with larger maps and multiple layers.


    Anyone has a better idea?

  2. #2
    Guild Expert Abu Lafia's Avatar
    Join Date
    Feb 2015
    Location
    Germany
    Posts
    1,256

    Default

    Hey Freodin, thanks for sharing the outcome of your little experiment. I usually prefer stroking a path over stroking a selection for the said smoothness, but wasn't aware of the strangely thick stroke with a orthogonal path... Have you tried doing the stroke path with the selection on? This way you get only "half" the stroke (on the inside or outside respectively) but it might look a little weird. Looking forward if there's a solution to this.
    Map is not territory...
    Current work in progress:Korobrom | My finished maps
    My DeviantArt site and Twitter

  3. #3
    Guild Artisan Freodin's Avatar
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    513

    Default

    Yes, stroking a path while the selection is still on works... at least partially. In order to get the same bleeding on both sides of the line, you can do a small gaussian blur. But that reduces the overall saturation of the line, so you have to do a colour- equalise to bring it back up to black. That again doesn't work on transparent layers... it needs both black and white to balance it out. So I would need to draw my lines on a white background instead of transparent and either multiply it onto the "paper", which leads to some problems with the layer stacking... or do a colour to alpha.

    Additional work, though it might be worth it.

    The bigger problem though is that this whole approach doesn't work with non-closed paths... because there isn't a selection per-se to keep active. I already tried this way: extending the path beyond the image border (or at least, the drawing area borders), stroking the path and deleting the outside parts.

    This again gets out of hand rather quickly when you have one path made up of several segments... like, in a grid. You can easily have one GIMP path make up the whole grid, and stroke it in one go. But if I use the "active selection" method, I would need a selection for every single segment of the path. Can you still follow me?

    So I know that I am striving for perfection (damn me)... and I know that perfection can mean a lot of work... but I am still looking for a simpler way. Especially because I am looking for a workflow that everyone can follow. It is complicated enough as it stands now.

    I am comming to think that up- and downscaling the whole thing might be the easiest way. Need to do more tests.

  4. #4
    Guild Artisan Jacktannery's Avatar
    Join Date
    Jun 2011
    Location
    Dublin, Ireland
    Posts
    924

    Default

    Because Gimp is a raster-based programme (unlike Inkscape), the quality of your finished line depends entirely on the resolution (ie dpi/ppi). For example, here are three hand-drawn lines of the same size (in mm) but at 72ppi, 150ppi and 300ppi. They look rough due to the jitter (which I kept at .3). These are hand-drawn but would show the same differences if stroked from selection or path I think ( = ie at high resolutions, your line issues would disappear).

    lines72.jpg lines150.jpg lines300.jpg

  5. #5
    Guild Artisan Freodin's Avatar
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    513

    Default

    Quote Originally Posted by Jacktannery View Post
    Because Gimp is a raster-based programme (unlike Inkscape), the quality of your finished line depends entirely on the resolution (ie dpi/ppi). For example, here are three hand-drawn lines of the same size (in mm) but at 72ppi, 150ppi and 300ppi. They look rough due to the jitter (which I kept at .3). These are hand-drawn but would show the same differences if stroked from selection or path I think ( = ie at high resolutions, your line issues would disappear).
    That is only relevant when you work for printing. As yet, I haven't even considered how my approach would look on paper in different resolutions... right now I am working on-screen exclusively.

    It might be completely crazy... most likely no one will indeed take note of the slight variations that I try to achive. But that's a personal problem: I have this certain idea in mind, and I am obsessed with getting it just right. And for some of the things I am doing to come out correctly, they have to be set up in a certain way.

    I know I should try to tone it down... but I am SO CLOSE! WAH!

    MainMap.png

  6. #6
    Guild Artisan Freodin's Avatar
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    513

    Default

    I think I got it. Starting at double size and scaling down works quite well... there is just a teensie-tiny-little problem with the cubic interpolation used.
    Lines_Thickness_Test.png

    As you can see, at full size, there is no difference between the two lines. Yet when you scale it to half the size, it depends on exactly where the stroked path was sitting whether it comes out as a sharper, darker line or a blurred, lighter one.

    For a different effect that I want to apply to these, I need the blurred lines. It's some fiddeling with the numbers to ensure that all of the paths are drawn at the correct position... but it works.

    Getting this stuff pixel-perfect is a lot of effort... still I think the result will be worth it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •