Creating blender trees

Hi,

I want to create tree’s in blender, and unfortunately I couldn’t find a linux app that create’s them. I did come across lsystem though which seems to be quite popular.

When I try to run the downloaded file (which is a single zip with 1 blender file), it goes undefined call to cos… So I add from math import * to the top.
Then I run again, but I get undefined call to lsystem_build, and notice at the top there’s an import statement for a module called lsystem… Checking portage found I didn’t have it, so I downloaded something call lsystem off of python and put in same dir as script and added to my PYTHONPATH.
I run it and get same error again, and looking inside the lsystem.py file realize its a bunch of classes and stuff (no lsystem_build function), so its most likely unrelated.

What am I doing wrong? As far as I can tell from the site, I am just meant to run the text on the right in the blender file and it should work when I click GENERATE. :frowning:

blender 2.4 (which uses python 2.4)

Thanks

You need to use the version updated for py.2.4 by jms:
(Download the 2.28 Neo-Lstseed one)

http://jmsoler.free.fr/util/blenderfile/images/lsystem/lsystem.htm

%<

Or you could try to model them yourself :wink:


[email protected] ~ $ blender
Using Python version 2.4
imported from text buffer...
imported from text buffer...
imported from text buffer...
imported from text buffer...
Traceback (most recent call last):
  File "Application.py", line 459, in bevent
  File "lsystem.py", line 337, in lsystem_build
  File "lsystem.py", line 245, in get_mesh
NameError: global name 'identityMatrix4' is not defined
Saved session recovery to /tmp/quit.blend

Blender quit

What the hell is going on there? I looked in lsystem.py, where the function identityMatrix4 is getting called and yet at top it clearly says “from Matrix import *”, and in Matrix.py there is a function called identityMatrix4… why is it undefined?

new_neo: haha

See page 3 and 4 of this post:

https://blenderartists.org/forum/viewtopic.php?t=21517

The problem seems to be name collsions with random.py and whrandom.py.

thank you boxfish (and indeed new_neo and Fligh %), renaming the Matrix.py to lsystem_Matrix.py as per the thread sorted the problem out! Thanks very much.

2 ways to make trees.

  1. make a circle, put each vertice in a random spot, select all the vertices and ectrude. Scale it a little the more you go up.
    2)Make a cube, select top vertices, extrude. When you think you’ve gone high enough. Make the branches. By selecting faces and extruding out. Add a little subsurf after, then put the material on.

Or just use the plugin.

Sorry for the lack of detail, im in a hurry.

Here’s another way to model trees:
http://www.planetquake.com/polycount/cottages/bk-coffeehouse/tut/realtimetree1.html

Here’s one for trees in the distance using normal maps:
http://www.drone.org/tutorials/lighting_flat_objects.html
This technique is also used in Sears Barn by Harkyman:
http://www.harkyman.com/searsbarn04.html

wow, thanks thats a really cool link!

This is a bit outside of Blender, but anyway.

For heavy trees you could use Arbaro. Nice examples included with the program. Writes DXF and OBJ that are easily imported into Blender.

You need a bit of RAM and patience though (Java + not so fantastic gui = quite slow in every respect). But it creates nice trees.

Cheers,
Mats

…the above which was mentioned in one of the tutorials already…

sorry 'bout that