Look Ma ... No Pixels pg 4: Production Graphics with Wendy Peck at webreference.com | WebReference

Look Ma ... No Pixels pg 4: Production Graphics with Wendy Peck at webreference.com


Look Ma ... No Pixels: Creating and Editing Curves

  You have probably noticed that I have kept you working with lines so far. That is because selection handles, and curves changing shapes can complicate the most simple functions of paths. If you have worked through the first few pages, any "path" fog should be starting to clear. The last piece to fit into place is working with curves. But you already know most of the techniques you need for working with paths.

Path created with the Freehand Pen tool. The o beside the cursor indicates that the path can be joined to the starting point.

A similar path to the sample above was drawn here, but the Curve Fit setting was increased, removing detail and creating fewer nodes.

Creating a Freehand Curve
I am going to start you off with an easy and intuitive way to create a curve with paths. The Freehand Pen tool is not much different than working with the Brush or Pencil tool. You simply drag the mouse to draw the shape that you desire. With the wonder of paths, though, you get to go back and fix the spots that are not perfect, and you can not only stroke the resulting line, but also fill an object.

Select the Freehand Pen tool as shown at the right. Place your cursor at the start point for the path you wish to create and click and drag to complete the shape. You do not have to create a joined object, but if you wish to, look for the o beside the cursor to show you when your cursor is in the right place to join with the starting point. Release the mouse when your shape is complete.

The nodes required for the shape you draw will be added automatically. In the toolbar, you can set the tolerance for nodes with the Curve Fit option. A low number adds more nodes, and a high number smoothes the curve you draw for fewer nodes and a smoother line. In the second sample shown at the left, I drew a similar shape, but with the Curve Fit set to 10px, instead of the 2px setting for the first one. Note how most of the detail has been removed. The first sample added eight nodes to create the shape. The less detailed sample contains only five.


Deleting two nodes, as marked by the red arrows, removed the untidy lines at the join.


Editing Curve Nodes
We have reached the fun stuff that I promised on the first page. When we were working with lines, we only had deleting, adding and moving nodes to contend with. Now we can work on reshaping curves. The methods you learned on the previous page all work for curves as well, and you will probably find that you delete many nodes on a freehand curve.

I have included a magnified view of the object I drew. It is quite common to create a mess at the start/finish point of a freehand object. This is the first place I look to edit. I deleted two nodes (marked by red arrows) to create the smoother join shown in the second sample.

Many of the curve segments need a little tweaking. The first line of correction is to use the control handles to create a more pleasing shape. You may also need to move nodes a few pixels (see previous page). In the sample at the left, with the Direct Selection tool active, the control handle is stretched to smooth the node and move the curve further from the node. Curve adjustment with control handles is a "do it" exercise. I could fill three pages trying to describe what you should be looking for, but just pulling on the handles, moving them up and down and watching the curve is always the best teaching tool. It does not take long for shaping curves to become an instinctive operation.

Clicking and dragging with the Convert Point tool changes the cusp node to a smooth node as shown below. Note how the sharp change in direction disappears.

Converting Nodes
Some areas of the curve need more help, though. Think back to the introduction of this article, when I was talking about the different types of nodes that were used when working with bezier curves. We are going to convert node types to create the perfect shape for this object.

The sample at the left is taken from the right side of the object, and is supposed to be a smooth curve. Note how it has a sharp change in direction. That can only be created with a cusp node. We want a smooth node. You can convert nodes with the Convert Point tool.

Select the Convert Point tool. Click on the node, and drag in the direction of the red arrow. This changes the node from cusp to smooth, and creates a very smooth curve. See the final results at the left. Don't panic if the whole curve seems to collapse when you start to drag the node. Keep dragging the cursor, and usually you can find the correct shape. If not, simply release the mouse, undo and try simply adjusting the handles without converting the node.

  Once you have worked through the sample above, you will be well on your way to understanding nodes and how they work. The onboard help, and manual with Photoshop has excellent detail on which direction to drag a node to change the type of node, and is generally very good for specific information. I recommend reading through the entire section on shaping path segments.


Drawing Curves with the Pen Tool
And finally, we arrive at the one that can make beginners vow never to touch paths. The pen tool defies all graphic logic if you have never worked with bezier curves, and only works when you think ahead to the next node as you draw. I have deliberately left this function to the end so that you have already worked with nodes, reshaped curves and know how easy it is to add or delete nodes.

Activate the Pen tool and we will do a super easy one to start – a line. Click where you would like your line to start. Press your Shift key down and click where you would like your line to end. Done. A perfect line. The Shift key will constrain the line to 45 degree increments. (That little exercise was just to get you used to clicking ahead of where you want the line to be.)

It takes a little more thinking to create a curved line with the Pen tool. The reward is the smooth and controlled curves you can create – well worth working past the confusion point. In order to create a smooth curve, you must click and drag from two points. In the sample at the left, I have provided directional arrows to show where you would click and drag.

The first part of the curve is created by clicking and dragging from the baseline up, until the control handle reached the top guideline. The second portion of the curve is drawn from the line down, until the guideline that extends up from the drawing point reaches the top guideline. You must try this. Understanding from words is just too hard. When you are actually seeing the curve created it makes sense.


Creating a path with all lines or all curves can be done with no additional techniques. However, most paths will be a combination of curves and lines. When you are drawing, you can switch modes by creating the changeover point your Alt or Option key pressed down.

Try this exercise. Create an object with a circle and square selection filled with a light color. Start at the upper left corner, and using your Pen tool, create a path that follows the shape. The image at the left gives approximate click points, and shows the key that should be used at each point. The Shift key references are to create straight lines. The Alt (or Option) references change the mode of the nodes you create.

It may take you a few times to get the hang of the technique and to place your nodes in the correct place. Remember that minor deviations can be corrected. Use your undo command to correct if necessary. Just remember that you must click and drag for curves, and you are working ahead when you place every node.

And that is the basic how-to for creating paths. Continue on to see how you can create selections from paths, and import and export paths.


Next page

Look Ma ... No Pixels: Tutorial Index

Paths in Raster Programs
Creating Simple Paths in Photoshop
Working with Paths and Nodes
Creating and Editing Curves
Selections, Importing and Exporting

Front page2345

URL: http://www.webreference.com/graphics/column45/
Created: April 2, 2001
Revised: April 2, 2001