I don't hate Microsoft - I just love freedom. Microsoft hates freedom. So we're enemies.

Inkscape Tutorial - Trees

Date/Time Permalink: 07/22/07 08:38:46 am
Category: Graphics Tutorials

Fractals have a long history of fascinating computer and math geek alike, but this time we're going to take the way a fractal simulates natural ordered chaos and apply it to the practical purpose of drawing a natural object! However, this isn't going to be a very realistic tree, just a drawing good enough for an icon or a game sprite.

I'm assuming you know the basics of Inkscape editing. If not, head on over the one of the best manuals for any graphics tool I've ever read, "A Guide to Inkscape". This tutorial also makes heavy use of the 'effects' plug-ins in Inkscape 0.44. Not only are the effects items being changed and shuffled around between versions, but they also require that you have the PyGTK library. In short, I'd recommend finding a GNU/*nix system which already has all of this installed and configured for you. I did it all manually a while back on Slackware, which I remember as being a painful experience.

Anywho - if your system doesn't have the exact same names and menu configuration, hopefully you can adapt this and follow along.

How to draw trees in Inkscape:

We'll mainly use two Inkscape tools: 'random tree' to make the trunk, and 'fractal (Koch)', used to make the foliage.

1. Effects-> Render-> 'Random tree' gives you a slightly different tree within the two parameters you specify. The 'initial size' parameter will be the overall size of the tree, and the 'minimum size' parameter will determine how many times the branches fork on average. This is easier to demonstrate than explain, so here's some typical examples:

first random tree

second random tree

third random tree

Yes, lower numbers for 'minimum size' give you more branches. Is this a bug, or were they just playing with us?

Of course, these objects are paths, so if you didn't get the exact shape you had in mind you can always use the node edit tool to alter it.

When you have the branches in the position you want, conform your stick diagram into something more like a real tree by selecting it, hitting Ctrl-L a few times to smooth the path, then Ctrl-) (Control-Shift-right parenthesis) to outset the path. Maybe outset it a couple of times to get a thicker trunk.

tree tutorial step 1

2. Move to another space in the drawing and use the Bezier lines tool to draw out a line segment with a couple of angles in it. We're going to use the C-curve method. Something like this:

tree tutorial step 2

3. Now with the segment selected, pick Effects-> Modify Path-> Fractal (Koch) load pattern. The pattern will load, taking a second. Select the segment again and Effects-> Modify Path-> fractal (Koch). Repeat that last move a few times.

tree tutorial step 3

4. When you have the top of the foliage shaped, hit Ctrl-D to duplicate it, hit Ctrl-] (Control- square bracket) twice to flip it over, move it below, but overlapping, the top shape. Then select them both and hit Ctrl-+ (Contol-Shift-plus) to paste them together.

tree tutorial step 4

5. The shape you probably ended up with looks a little too geometrical, so let's rough it up. Go Effect-> Modify Path-> Radius Randomize. Use a value of between 5.0 and 10.0 in the dialog. this will stagger the path's nodes, making it a little chaotic. You can then smooth it a little with Ctrl-L a couple of times.

tree tutorial step 5

6. Use the fill 'n' stroke dialog to change the colors of the tree parts (I kept them in black outlines so you can see how they go), and bring them together. Hit Page-Up with the trunk selected to move it onto the layer on top of the foliage.

tree tutorial step 6

7. Here's the finished example after I exported the bitmap from Inkscape and got it into Gimp, where I ran some effects on it. The effects were the cloud noise and hurl filters on the foliage and bump-map on the whole thing, if anybody's interested.

finished tree

Now, this is OK for a quick drawing, but a realistic tree is beyond the grasp of this - and possibly any - tutorial. When it comes to natural elements, you get out of them what you put into them. Use this for a starting point for a basic technique, then elaborate to taste.

Here's one I've done with a lot more work put into it. In Inkscape, I did some detailed node editing after generating the shapes. I then exported three separate layers. In Gimp, I built the layers with the trunk sandwiched between two layers of foliage. I then applied a few more filters to rough up the texture of the various layers and different levels of bump-mapping to the front and back foliage layers. Then I finally just did some good old-fashioned brush work in Gimp.

improved tree

16 feedbacks Follow me on Twitter for an update every time this blog gets a post.
Stumble it Digg this Reddit this add to Delicious share on Facebook

Comments:

Comment from: ERM [Visitor] · http://www.ericsbinaryworld.com
not bad....looks like you made it with clay after you got through with it in GIMP.
Comment from: syahid ali [Visitor] · http://coolware.blogspot.com
makes me want to install and try inkscape. nice tutorial!
Comment from: rockraikar [Visitor] · http://raikardesigns.blogspot.com
Wow...great one. I'll give it a try.
Comment from: tk [Visitor] · http://o-server.dyndns.org/inkscape/english.html
see also http://o-server.dyndns.org/inkscape/english.html

Inkscape tutorial
Comment from: Dubai Web Design, Development [Visitor] · http://www.go-gulf.com/
excellent Idea, Cab we also draw illustration and cartoons. How can u get this software.I really want to use this one for my personal projects.
Comment from: Penguin Pete [Member] · http://www.penguinpetes.com/
@Dubai Web Design

Oops, I usually link to the program's home site when I do these.

Get Inkscape here.
Comment from: Loonie [Visitor] · http://loonie.mabulle.com
That is cool ! i was looking for how to make a fractal tree in inkscape and i never realised there was a pre-build option especially for doing that !

But I don't think that minimum size segment making more branches with a smaller number is a mistake : it defines the length you want your smallest branches to be. To make the tree it makes one stroke, the trunk, then two smaller branches, then at the end of these branches it makes even smaller branches and so on until the length of the smallest branches is the minimum size you said, then it stops. so the smallest the minimum sizes, the more branches it can make :)
Comment from: Relsi Ramone [Visitor] · http://relsiramone.blogspot.com

hello, I'd like to translate their tutorials of Inkscape for the Brazilian community users of inkscape, if not problem.

=)

Relsi Ramone
--------------------------
http://relsiramone.blogspot.com
http://inkscapebrasil.org/
Comment from: Penguin Pete [Member] · http://www.penguinpetes.com/
@Relsi Ramone

Certainly you may! I am very happy to see my work translated into other languages. Post a link here in these comments when you are done translating and I will link to you! :-)
Comment from: inkscape tutorial [Visitor] · http://o-server.main.jp/inkscape/english.html
Inkscape tutorial is also available here
http://o-server.main.jp/inkscape/english.html
Comment from: Sarah [Visitor]
Is inkscape free or do I have to by it?
Comment from: Penguin Pete [Member] · http://www.penguinpetes.com/
It's as free as air. Download it here for Windows and Mac, and it also comes standard now on most major Linux distros.
Comment from: Josh Tykes [Visitor]
I go with sarah above me. How do you get inkscape. Is it free? What would we use it for? - Josh
Comment from: Will [Visitor]
Scary how many people don't read and ask the same questions again and again eh?

Interesting concept, thanks :)
Comment from: Anonymous [Visitor]
Minimum means minimum size for the branches that's why it makes more branches... well a bit strange anyway :P
Comment from: xxx [Visitor]
hi


Your URL will be displayed.
Allowed XHTML tags:
p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, a,
span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite,
abbr, acronym, q, sub, sup, tt, i, b, big, small, pre
Options:
 
(Line breaks become <br />)
(Set cookies for name & url)
images required for CAPTCHA viewing

Alphabet letters and digits 2,3,4,6,7,8,9. The digits 0,1, and 5 are NOT used.

Enter the letters/numbers in the CAPTCHA picture above:
My apology to readers for the hassle. I don't like CAPTCHAs any more
than you do. But we all hate spam even more, and this seems to be an
effective way to stop it.
suddenly the moon