Tuesday, 11 October 2011

Adventures in Inkscape

My dad is an amazing artist. He can take a piece of paper and almost anything that will make a mark on it, and voila! A drawing emerges. There's a beautiful chalk drawing of my mother that sits in their house - she can't be much older than I am now and the amount of life he managed to make radiate off the board is simply breathtaking. My sister managed to get the drawing gene off him, but I wasn't so lucky. I'm even worse on a computer - I can compose and edit things in Photoshop, but trying to draw them from scratch is a nightmare.

One of the few things I can draw are little cartoon elephants. Someone sketched one out for me once - so long ago that I don't know who or when anymore - and it stuck somehow. I've wanted to make labels for the things I make for a long time, and sticking an elephant on it seemed like a natural thing to do, but the idea of drawing it on a computer was terrifying to me.

To illustrate just how terrifying, here's the first attempt I made at digitising an Oliphant Kat, courtesy of Nick's iPhone:

Not very reassuring. But as you can probably see in the header, I managed to do it, and it actually only took a few hours.

Before I show you how I did it, first, a plea - please don't ever be intimidated by software. Experimenting on a computer isn't very different to experimenting with a sewing machine, or with some knitting needles. I saw a tutorial recently about printing custom material, and the first step was "Open Microsoft Word" and I almost audibly sighed. If you want to do something with graphics, use a program that's built for graphics. You can find a lot of free ones online, including Inkscape, which is what I used over the weekend.

I've done enough design computing to know that if you want to draw a logo, you should really be doing it as a vector graphic - it scales really well, which is especially good when printing things. In terms of software, this basically means using Illustrator instead of Photoshop. Sadly enough, I don't have Illustrator, but my friend pointed me towards Inkscape. It comes with some built in, interactive tutorials (Help > Tutorials), which helped me get the hang of it really quickly.

Whiskers, body, head and an ear
As you can see, I drew the Oliphant Kat in pieces. The reason I really suck at computer drawings is that I have next to no mouse control, but the program came with both built in shapes, and lots of ways to combine them. By drawing a shape, giving it a thick stroke and no fill (CTRL+SHIFT+F will get you the stroke and fill options), you end up with nice line drawings.

The body was fairly easy - it was two arcs on top of each other with their endpoints joined together (which I learnt in the tutorial!). The best bit I discovered, though, was while I was drawing the ear. One of my friends was helping me, and we got two ovals on top of each other and joined them together, but the join was really pointy. It turns out that if you want to draw curves, you can draw a built in shape and then hit CTRL+SHIFT+C and it becomes what's called a path. You end up getting points on the outline of the shape that allow you to control where the line goes and how curved or pointed that area is. This means you can draw a curve and then just start bending it, instead of having to draw your shape freehand in the first place.

Green control points on a path
Once I had the pieces drawn, it came down to positioning. You can align objects vertically or horizontally really easily (CTRL+SHIFT+A for options) but making the shapes look like they were in front of or behind each other was more difficult. I wanted to do this all on one layer, so I had to just combine the shapes I had.

Combination options in the Path menu
In the second section of the Path menu there are some interesting looking options that will look familiar if you've ever done set theory in maths. The most useful ones were 'Union' and 'Difference'. Union joins two objects together as if you've stuck them together by gluing the overlapping parts. Difference does the opposite, and will take two objects and delete one of them along with the sections in which they overlap. To make the body look like it was behind the head, I positioned them, hit difference, and was left with the body minus the overlapping head area. The only trick with this is knowing what will get deleted - would I get the remainder of the body, or the remainder of the head? We discovered that in Inkscape, you can move objects 'above' and 'below' each other (Object > Raise/Lower). You need to move the piece you want to keep to the bottom of the other one (Object > Lower to Bottom) before you do the difference.

The head and the body, difference with the head below the body, difference with the body below the head
One last tip - don't ever hit CTRL+C! If you want to copy something, Duplicate (CTRL+D) instead - whenever I tried copying something it did strange and unexpected things.


That's it! I went from 'Before' to 'After' in a couple of hours of fiddling with some new software and I'm really happy with the result :D


  1. Yay, Inkscape!

    What's wrong with copying shapes though? I always do that and nothing 'strange and unexpected' happens to me (or, maybe it does, but I just expect it...)

  2. From what I could tell it was copying it as a bitmap :( The fill lost its transparency and you couldn't grab any control handles any more. Maybe it's a bug in the Mac version, or there's some sort of setting I need to change.

  3. Oh weird, yeah, it definitely doesn't do that in the Linux version.