Gimptalk - Premier Gimp Community: Parallel curved lines using GIMP. - Gimptalk - Premier Gimp Community

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Parallel curved lines using GIMP.

#1 User is offline   DavidBr 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 16-December 08

Posted 16 December 2008 - 05:51 PM

Hey guys, I'm trying to make a top down map of an area that has railroad tracks running though it. Problem is, I can't seem to get the parallel lines to stay parallel around curves. Any suggestions?
0

#2 User is offline   MNM 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,336
  • Joined: 01-December 07
  • LocationNorway(near griatch's country :D )

Posted 16 December 2008 - 05:54 PM

Make the curves with the path tool?
Duplicate the path and move it :D
MNM
Posted Image

saulgoode said:

(we want our image to be "gimped", not "photoshopped"; the difference being one can't tell when an image has been properly gimped :) ).
0

#3 User is offline   DavidBr 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 16-December 08

Posted 16 December 2008 - 05:58 PM

I tried that. The distance between the strait lines doesn't stay consistant (hhmmm geomity I think it's called but don't quote me since my math skills suck) when it goes into the curve. What's more, over multiple curves it begines to look like calligraphy.
0

#4 User is offline   MNM 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,336
  • Joined: 01-December 07
  • LocationNorway(near griatch's country :D )

Posted 16 December 2008 - 06:00 PM

With some nice adjusting you should be easily able to make a new path with the same form..at least i could :P
MNM
Posted Image

saulgoode said:

(we want our image to be "gimped", not "photoshopped"; the difference being one can't tell when an image has been properly gimped :) ).
0

#5 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 16 December 2008 - 07:24 PM

DavidBr said:

Hey guys, I'm trying to make a top down map of an area that has railroad tracks running though it. Problem is, I can't seem to get the parallel lines to stay parallel around curves. Any suggestions?

Identical curves offset from each other are not parallel (if they are in the same plane).

I would recommend creating a path to represent the center-line of your tracks. Create a new Channel and stroke the path in white with a width equal to the desired distance between the tracks. Now convert that channel into a selection (using the red square button next to the trash can at the bottom of the Channels Dialog), create a new transparent layer, and stroke the selection with the color and width of your tracks. (You may need to clean up the stroked selection at the edges of the image, or work on a slightly larger image and crop it afterwards.)

Posted Image
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#6 User is offline   newt 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 1,806
  • Joined: 26-October 05

Posted 16 December 2008 - 10:15 PM

You could, create a single path, stroke the path, say 20 pixels, and then do an alpha to selection on the stroke.
After that turn the selection into a path selection>to path, Then release the selection, create a new layer, and stroke the new path on the new layer, with about 5 pixels.
You could then just cut off the starting points from the final image.
Posted Image Posted Image
0

#7 User is offline   DavidBr 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 16-December 08

Posted 17 December 2008 - 03:56 AM

This is great. It's just what I was looking for. I've laid out the tracks and they look perfect. Thanks for the help guys.
0

#8 User is offline   The Gimp Pimp 

  • Member
  • PipPip
  • Group: Members
  • Posts: 219
  • Joined: 21-November 08

Posted 17 December 2008 - 05:00 AM

Another option might be to copy the first line, and then make it a brush. Hold ctrl after your first click and click in the new spot. It will draw a line of them. Adjust the spacing to get the right distances between lines.
Posted Image
View Gimp Art, or view and submit your own Gimp Xcf Files and Gimp Tutorials!
0

#9 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 18 December 2008 - 01:24 AM

saulgoode said:

I would recommend creating a path to represent the center-line of your tracks. Create a new Channel and stroke the path in white with a width equal to the desired distance between the tracks. Now convert that channel into a selection (using the red square button next to the trash can at the bottom of the Channels Dialog), create a new transparent layer, and stroke the selection with the color and width of your tracks.


I don't know what I'm doing wrong but this absolutely has me totally befuddled.

    [*:79g0t1su]I made a path
    [*:79g0t1su]I created a new Channel
    [*:79g0t1su]I stroked the path
    [*:79g0t1su]Converting the channel into a selection would not work for me.
    [*:79g0t1su]So nothing beyond this point happened.


I ended up doing everything from the Paths dialog which worked fine. Using GIMP 2.4.7 in Fedora 8
Posted Image
Posted Image
0

#10 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 18 December 2008 - 04:42 AM

In step #3 are you stroking with WHITE? (since the channel has a black background just stroking with the FG set to black will accomplish nothing)
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#11 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 18 December 2008 - 07:42 AM

Yes, I stroke with white. When I hover over the red square in the Channels dialog I do not have a selection to path choice. I have to go to the paths dialog for that. Then I can stroke with the color.

I would like to try and understand what the channels dialog does but it just baffles me.
Posted Image
Posted Image
0

#12 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 18 December 2008 - 07:58 AM

Oregonian said:

Yes, I stroke with white. When I hover over the red square in the Channels dialog I do not have a selection to path choice. I have to go to the paths dialog for that.

Oh. I misread what you had written. In step #3, you're supposed to stroke the selection, not the path.

Oregonian said:

I would like to try and understand what the channels dialog does but it just baffles me.

Perhaps it would be more understandable if you used the QuickMask instead.
    [*:1v9jo6hj]Create your path.
    [*:1v9jo6hj]Set the FG color to white.
    [*:1v9jo6hj]Active the Quickmask and stroke the path ("Edit->Stroke Path...") with a very large width.
    [*:1v9jo6hj]Deactivate Quickmask, set the FG to the color you want your tracks, and stroke the selection ("Edit->Stroke Selection...") with a narrow width.


The QuickMask is just a channel which is created from the selection when you activate it; and when deactivated, the channel replaces the selection and is deleted automatically (you can see this if your Channels Dialog is open).
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#13 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 18 December 2008 - 04:26 PM

saulgoode said:

In step #3, you're supposed to stroke the selection, not the path.

OK, I clicked the red button in the Channels dialog and the thick white line is selected. I have the selection now and I don't know where to go to stroke the selection. I can't find an option anywhere to do that.

Going to Edit > Stroke Selection ... I changed the fg color to red and the width of the stroke to 5 ... it doesn't stroke the selection. I get nothing with that step.

OK, I uploaded the xcf file with the selection still in place.
Channelsparallellines.xcf

LATER: After closing the xcf file, I reopened it and it stroked with the red just fine. Sometimes things quit working in GIMP for me. Don't know why. It's not a memory problem I'm sure. I have 2gb of RAM.

I would certainly like to understand Channels better. The Paths dialog I love and use it a lot.
Posted Image
Posted Image
0

#14 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 18 December 2008 - 07:30 PM

Oregonian said:

Going to Edit > Stroke Selection ... I changed the fg color to red and the width of the stroke to 5 ... it doesn't stroke the selection. I get nothing with that step.

I will surmise that you did not create a new transparent layer as indicated in my original instructions, but instead were attempting to stroke the red lines onto an existing layer. If so, then you need to make that layer active before stroking the selection, otherwise the channel is the active drawable and your red stroke will be painted on the channel (creating a new layer automatically makes that new layer the active drawable so I failed to state that as an explicit step).

Oregonian said:

LATER: After closing the xcf file, I reopened it and it stroked with the red just fine. Sometimes things quit working in GIMP for me. Don't know why. It's not a memory problem I'm sure. I have 2gb of RAM.

What is occurring here is that when your XCF file is loaded, all of the channels, layers, paths, and selections are restored; however, the active drawable at the time of saving is NOT restored and instead GIMP sets the top layer in the layerstack active. Therefore, you have effectively activated the appropriate layer.

Oregonian said:

I would certainly like to understand Channels better. The Paths dialog I love and use it a lot.

Channels are indeed useful. One must be careful about whether a channel or a layer (or a layermask) is active whenever one does any drawing (painting, filling, stroking, etc). It is often necessary to re-activate your layer after, for example, saving your selection to a channel because this sets the created channel active (I wonder if it would not be more useful if the original layer remained active when this is done, maybe I will submit a patch :) ).
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#15 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 18 December 2008 - 07:43 PM

saulgoode said:

I will surmise that you did not create a new transparent layer as indicated in my original instructions, but instead were attempting to stroke the red lines onto an existing layer. If so, then you need to make that layer active before stroking the selection, otherwise the channel is the active drawable and your red stroke will be painted on the channel (creating a new layer automatically makes that new layer the active drawable so I failed to state that as an explicit step).
Aha! Thanks.

I think what I did was make the new layer first. That probably explains a lot.



saulgoode said:

Channels are indeed useful. One must be careful about whether a channel or a layer (or a layermask) is active whenever one does any drawing (painting, filling, stroking, etc). It is often necessary to re-activate your layer after, for example, saving your selection to a channel because this sets the created channel active (I wonder if it would not be more useful if the original layer remained active when this is done, maybe I will submit a patch :) ).
Something for me to keep in mind. Thank you saulgoode. Back to my drawing board. :mrgreen:

LATER: Well will ya look at that! AFTER clicking the red button in the Channels dialog, went back to Layers, made a new layer, Stroked the selection and Voila! Woooooo Hoooooooo!!!

Takes me awhile.

Posted Image
Posted Image
Posted Image
0

#16 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 19 December 2008 - 08:44 PM

I've been playing with this a bit and have lots of ideas to use it. This is a small image of a diamond-shaped frame that I made.

I can fill the edges and inside with anything I want. :mrgreen:

Posted Image
Posted Image
Posted Image
0

#17 User is offline   RobA 

  • Member
  • PipPip
  • Group: Members
  • Posts: 721
  • Joined: 05-November 07

Posted 22 December 2008 - 06:32 PM

@DavidBr-

There is another forum at http://www.cartographersguild.com that focuses on cartography and mapping. There are a fair number of gimp users (myself included) that may be able to provide tips specific to mapping!

The simplest way is to stoke the path once with your colour then stroke again with a narrower brush either with the eraser or with the paintbrush in the background colour.

Also, if you want to make ties on the track, create an angular gih brush and stroke the path a third timewith that:

Posted Image

-Rob A>
Posted Image
Fantasy Cartography and Mapping by RobA
0

#18 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 22 December 2008 - 06:42 PM

Wow, Rob A, that's really cool!
Posted Image
Posted Image
0

#19 User is offline   saulgoode 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 5,324
  • Joined: 22-August 05

Posted 22 December 2008 - 07:41 PM

RobA said:

Also, if you want to make ties on the track, create an angular gih brush and stroke the path a third timewith that:

Or I could provide a way of doing it using the GAP's Move Path command which only entails about 20 steps, requires 2gig of RAM, and produces a less favorable result. :lol:
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.
0

#20 User is offline   Oregonian 

  • Retired Staff
  • PipPipPip
  • Group: Retired Staff
  • Posts: 2,360
  • Joined: 13-November 07

Posted 22 December 2008 - 08:50 PM

RobA said:

Also, if you want to make ties on the track, create an angular gih brush
... and how do you do that? ... they angle with the curves.


saulgoode said:

Or I could provide a way of doing it using the GAP's Move Path command which only entails about 20 steps, requires 2gig of RAM, and produces a less favorable result.


ROFL!! Good one!
Posted Image
Posted Image
0

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic