Keywords: Gimp, Paths, Selections, Text Modification, Animation
In the following series of lessons, we will be learning about the paths tool in GIMP. This lesson is dedicated to GIMPtalk.com board member, techyon, who requested help with this tool sometime back. Hopefully, his patience will be rewarded.
Lesson Prerequisites: This is a moderate-to-advanced level series of lessons. All steps to complete the examples will be given; however, the exact menu item locations and pictures may not be provided. Please forgive me, but this is a very detailed tutorial series that has taken several hours of time to research and prepare.
You should be familiar with opening projects, adding layers, changing colors, and the various selection tools. The final lesson is optional and will cover utilizing paths within the Gimp Animation Program (GAP). Again, I will discuss the steps to complete the animation examples, but should you choose to proceed through the lesson, you will need a good understanding of creating basic GAP animations.
Disclaimer: These lessons are not intended to cover every possible aspect of paths, as I'm still learning the functions myself. However, I do believe that you'll discover enough from the material to be able to incorporate paths into your GIMP creations and learn the subtleties yourself.
These lessons were prepared utilizing other web resources found here:
http://gimp-savvy.com/BOOK/index.html?node39.html and
http://docs.gimp.org/en/ch02s04s07.html As always, if you discover that I've made a mistake or am unclear about something, please let me know and I'll correct it as soon as possible. Comments and suggestions are always welcome!
Now that all the housekeeping tasks are out of the way, let's begin our first lesson on paths.
The path tool (which is also known as the Bezier path tool) is one of the most powerful selection tools in Gimp's arsenal. Like the other selection tools (ie. Elliptical, lasso, magic wand, etc.), selections created with the path tool can be stroked, filled, converted to mask, and altered by any of Gimp's filters and plugins. Additionally, selections can be converted back into paths for additional alteration (ie. Adding, moving, deleting anchors).
This is, however, where the similarities between paths and selections end.
[*]Paths are vector objects, whereas selections are raster based. Without getting into a detailed discussion of this topic, just know that vectors are made up of lines, and rasters are made up of pixels. Gimp is generally considered a raster graphics program. Vectors within Gimp cannot be modified with the various filters/plugins like layers or selections. To apply effects to a path, it first must be converted to a selection.
[*]Paths can be created in two ways: the paths tool (now I'm sure you weren't aware of that) and coverting a selection to a path.
[*]Paths do not have to be closed loops; they can be straight or curved lines. However, if you try to convert an unconnected path to a selection, Gimp will automatically connect the first and last points together. Keep that fact in mind. But remember, if you make a mistake, you can always convert a selection back to a path for modification.
[*]As stated in the last point, paths can contain curved or straight lines. A curved line segment is composed of anchor points and handles (from what I've read, this is where the term Bezier curve comes in, although a discussion of Bezier curves is beyond the scope of this lesson and very possible the author ;^) ). Anchor points are essentially where the line makes a change in direction. Handles are used to adjust the curve of the line segment entering and leaving an anchor point. For each anchor, you can have two handles, which can be adjusted at the same time or independently of each other. Straight line paths are referred to as polygonal. They have anchors and handles, but the handles are not visible or usable in the “polygonal" state. A polygonal path can be converted to a Bezier curve for alteration. When you first begin creating paths with the paths tool, the handles are hidden. One way to make them visible is to click an anchor point and without releasing the mouse button, dragging the mouse away from the anchor. The two handles are then exposed. Handles are only visible on the active or “selected" anchor. Below is an example of a path being drawn. The black circles are anchor points, the white circle is the selected anchor point, and the two, white squares are the handles.
[*]Unlike selections, paths can be saved with a project (xcf file). Let's say it's 1 in the morning (well, actually, it is right now for me!), and you're trying to make that perfect cutout of your favorite render to be added to a signature. You're tired and no matter how many cups of java you drink, you can't stay awake. Hey, no problems, it's a path. Save the project, go to bed, and finish editing tomorrow!
[*]Paths are like layers in the sense that you can have as many different paths as you want.
[*]Lastly, a path can be made up of disconnected segments called components. Let's say you're using an image in a presentation. In one view you want to make some pointers that point to certain parts of the image. Yet you also want to use the same image for another viewpoint, but have arrows pointing to other parts of the image. Do you have to create two separate xcf files for this project? Nope. You can use one path with multiple components for one view. Then create a new path with multiple components for the next view. Just like layers, you can turn them on and off as needed.
Are you still with me? Alright, let's do a quick lesson on the path tools. Here are the main path tool buttons and dialog boxes:
Path Tool Button
Path Tab in Layer Dialog Box
Path Tool Options Dialog Box
We will not be discussing the path tool options dialog box. You can play around with the various settings and discover what it can do for you. Frankly, I don't use it. From what I can tell, all the functions contained within this box, can be achieved by other means. Especially, the design, edit, and move functions, which I've outlined in the table below.
You may want to print this graphic out and keep it as a handy reference until you get the hang of creating and manipulating paths. Study this resource and become familiar with the various items. Of special importance are the cursors.
Now, let's create some basic paths. Remember, I will not be going into great detail on these steps. From here on out, you're on your own!
[*]Open up a new Gimp document
[*]Select the path tool
[*]Place the cursor over the document and review the cursor shape (should have a square in the corner)
[*]Now click a point and move to the next location as in my graphic. Continue to observe the cursor and refer back to my reference chart above.
[*]Add a new anchor point as I've done.
[*]When you get back to the first point you created, notice that Gimp does not know that we want to close this path. You should still see the path cursor with the little “+" sign in the corner. We want to close this path. To do that you must hold down the Ctrl key and click on the first point. Did you notice the cursor change to the path tool with an upside down “u"? If it did not, your path is not closed.
Note that the path is created entirely of straight lines. Class, what do we call a path composed of all straight lines and no handles? Polygonal.
Now, let's make a new path, but this time, we'll add/delete/move anchors and move the entire path.
[*]Open a new Gimp document or better yet, start a new path by clicking on the Path Tab in the Layer Dialog Box (see above graphic) and click the add new path button. Turn off the previous path you created and turn on the new one.
[*]Make a new path like before. You can close it if you want, but for my example I won't
[*]Once you're done. Pick a spot in between any two anchors that you want to add a new anchor. Hold down the Ctrl key and,if your cursor changes to the little “+" sign, click once with the mouse button. You should now have a new anchor point. Play around and add as many or as few as you want.
[*]Next, let's delete some anchors. Move your cursor over any anchor that you want to delete, hold down the Ctrl-Shft key (cursor should change to the minus symbol), click once with the mouse. Anchor should be gone!
[*]To move an individual anchor, hover over it and, if your cursor has the 4-headed arrow, click and drag the anchor around.
[*]To move the entire path, hold down the Alt key and click and drag the path to anywhere on the screen.
Now, for our last example of this installment, let's show some handles and see how they work.
[*]Start a new path
[*]Add some points with the paths tool
[*]As you're placing anchors, click and drag on one of the anchors as you place it. Notice that the handles now become visible.
[*]Hold down the Ctrl key and drag an handle. Notice only one handle moves. Try the same thing on the opposite anchor.
[*]To move both handles, hold down the Shft key and drag. The handles move simultaneously.
[*]To display handles on a point that's already been placed, make that anchor active by clicking on it with the paths tool (no keys need to be held down). Then, hold down the Ctrl key and drag away from the anchor. Only one anchor will be displayed at a time so, you'll have to do the same thing to the other side, if needed.
[*]Continue to add anchors and see how the handles have modified the look of the path.
Well, I'm literally exhausted! How you doing so far? My apologies for such a long introduction, but I felt it best we get this information out of the way. I promise the remaining lessons won't be as long, but they should be a lot more fun! Until then, have fun playing with the paths tool.[/center]
Art