Sunday, February 21, 2010

Knitting With Adobe Illustrator

Over the past month I have participated in a whirlwind of knitting and other creative activity, but I realize you certainly wouldn't know it from my lack of blog entries. I have been thinking about this particular post for quite some time, since quite a few of you have asked me about this topic.



TechKnitter is my inspiration to learn how to make knitting illustrations. Any of you who read her blog will certainly understand. Since knitting illustration is its own unique beast, and there are not a lot of resources out there that specifically address how to learn this skill, I had to struggle through a lot of trial and error to get started (and as I continue learning, the trial & error continues). I'd like to share with you the key insights I've learned so far, in hopes that it will help get you drawing! (Note: this is my own method; I don't know what TechKnitter does.)

This tutorial assumes you have basic Illustrator skills. You should know how to use the pen, how to manage layers, colors, strokes & fills. You should also know how to use the Grid and the Smart Guides. If your Illustrator skills are more raw than this, I highly recommend the
Classroom in a Book series, published by Adobe, to get you started.


Before you start: Understand the topology of your fabric.
Note which parts of the paths come to the front and go to the back, and note that this is different for knit stitches and purl stitches.

You may notice that my drawing doesn't exactly look realistic. Compare with a photo I found on the
Classic Elite Yarns website:


Even though my illustrations don't necessarily reflect what you'd see in real life, I find that it's easier to explain knitting concepts when I open up the fabric and show the path of the yarn. This is just my own style -- your mileage may vary. :)


For our tutorial, let's start with a single knit stitch.

Step 1: Draw a stitch.

NOTE: To see a larger image, just click on it!

Using the pen tool, draw a single stitch. From the image above, you can see where I put the anchor points, and where I pulled the handles. Set a thick stroke width (in this case 10 pt) and no fill.


Step 2: Copy and paste the stitch.


Choose the Selection tool, select the black path, then copy and paste [ctrl-C]+ [ctrl-V] (or select these commands from the Edit menu). Position the new path directly above the first one. Change it to a different color, one that is clearly distinctive from the color of the first.

Tip: Take note of what's happening in the Layers palette. As you add objects, they appear here.



Step 3: Interlock the stitches.


In order to represent a knit stitch, the black path will have to be in front of the red path in some places, and the red path will have to be in front of the black path in other places. Illustrator doesn't let you bring parts of a continuous path to the front and send other parts to the back. Try it and you'll see what I mean.

So, you're going to do this by copying specific segments of the black path, and superimpose them on top of the red.


3.1 Add anchor points.


Choose the Add Anchor Point tool from the tool palette (hold down the Pen tool to get the flyout menu) and add four new anchor points (A, B, C, and D) in the approximate positions labeled above.


3.2 Select the "leg" segments of the black path.


Choose the Direct Selection tool and click on the black path between anchors A and B. Hold down the [shift] key and click on the black path between anchors C and D. (Note that the path segments will not turn yellow -- this is for illustration purposes only)


3.3 Copy these segments and paste them directly on top.


Press [ctrl-C] to copy the selected path segments, then [ctrl-F] to paste directly on top of the black path.

NOTE: It doesn't matter if you Paste In Front [ctrl-F] or Paste In Back [ctrl-B]. The important thing here is to NOT use Paste [ctrl-V], because if you do, your new segments will not be in the precise X-Y location that matches the black path, and it will be difficult to reposition them manually.


3.4 Group the new path segments.


Press [ctrl-G] to group (or select this command from the right-click or Object menu).

Although this step is optional here, it's a good habit to get into. Right after you paste them, all your new segments will be selected, so it's the perfect time to group them. Once you start making fabric with more stitches and rows, grouping your segments becomes crucial.

Note that the new group is now visible in the Layers palette. All of the objects that make up this group (in this case just 2 path segments) are listed under that group.



3.5 Bring the new segment group in front of the red path.


You can do this several ways: select the segment group and open the the R-click or Object menu (then Arrange --> Bring to Front), or simply click on the object in the Layers palette and drag it up above the red path.


Take a moment to admire your work. You've just made your first interlocked stitches! Now, to make the texture of the fabric really pop, it's good to outline these paths you've drawn. Let's outline these paths in bright yellow.


Step 4: Outline your paths.


Note that before you start making your outlines, your Layers palette should contain three objects: a group, a red path, and a black path. In this step, you will create a copy of each object directly behind it, then change the stroke width and color of the duplicated object. Here's how:


4.1 Duplicate the black path.


Select the black path, Copy it [ctrl-C] and Paste in Back [ctrl-B]. In the drawing space, it will look like nothing has happened, but in the layers palette you'll now see two black paths. The one at the very bottom of the list is the one you just created.


4.2 Change color and stroke of the duplicate path.


Leaving the new path selected, increase its stroke thickness (I chose 14 point) and change the color to yellow. Take note of how the Layers palette automatically updates as you make changes to your objects.


4.2 Outline the red path.


Select the red path, then repeat steps 4.1 and 4.2.


4.3 Outline the black path segments.


Select the segment group, then repeat steps 4.1 and 4.2.

Now, I know what you're thinking here: "yuck, I can see the edges of my path segments!" To hide these lines, select the black path segments (not the yellow ones) and open the Stroke palette...


By default, your strokes end in butt caps. Make sure only the black path segments are selected, then click on Round Cap.


... and, voila!



I'm sure this is enough information for now. Once you master this much, you'll be ready to draw fabric with more stitches and more rows. Stay tuned, that tutorial will come soon!