trees

Hallo,

is there a tutorial how to generate trees (with leaves or needles)?

Thanks
macherb

Hi macherb,

there’s a good python script called “tree maker” on this page:

http://www.geocities.com/blenderdungeon/lsystem/index.html

which makes very good trees (using the l-system). It’s not a tut but I
hope it’s usefull anyway.

Cheers, Tobur.

If you want the trees just as decoration and don’t need close looks on it, there is an easy possibility:

You need a photo of a tree with a white background. There should be only the tree with everything else white. Finding this photo is the most difficult part. :wink: If you find a good one, please send me a copy!

Now you create a plane and map the photo onto it. Give the plane a material which uses the photo as color-texture and the same photo as ALPHA-Channel. (press the alpha button twice, so that it gets yellow).

In the Top-View duplicate the plane and rotate it 90 degrees. (You get something like X )

Your tree is finished.

Hope that helps. And don’t forget to send me the tree-photo! :slight_smile:

Holger

PS: You can see how the trees look inside a scene at: www.adoptimum.de. Click on “Kompetenzen”, then “Visualisierung” and then “Architektur und Raumgestaltung”

http://www.adoptimum.de/test/blenderbaum.jpg

Hehe,

besides being far away, you must also be not too fond of shadows.

Very interesting technique anyway.

You can also add leaves using the particle system.

Make a casual mesh around that tree.

Make it emit particles

Make a single leaf

Parent leaf to mes, press duplivert.

Play with particle randomness…

Stefano

OK, I must admit that the lighting and shadows always makes me some trouble. :-? But what’s wrong whith the shadows in this case? There’s just no floor for them to fall upon.

Nice idea to put particle leaves in. But I’m afraid that they wont integrate nicely with the tree. Must try it one day… I’m still hoping to find a better photo with leaves and single colored background. :o

Holger

Well, when you will want to place a ground beneath the tree you’ll have :smiley:

Particles won’t mix very well, right, but if they are enought and somewhat clustered it may work.

I said that without having tried before, so I’ll try :slight_smile:

Stefano

Th problem here is that a square (or shape of mesh on which you put tree) shadow will be cast because the alpha channel is not considered for shadow casting, but only the actual mesh - at least as far as I know.

The work around is to fake the shadow using the same image and applying it to the floor material.

The “tree image” technique was used for the forest shots in “The Hunt” to keep the number of polys (and render times) down. I think it works great a long as the trees are clumped together so you cannot see the forest floor. Even then, if the tree plane meshes were put on a separate layer and illuminated by a layer spot light, then setting the Samples and Bias in the Lamp buttons for a really blurred shadow would work for distant shots.

Thanks tibur for this. But …
I open lscript.blend, select the empty, link the empty to the script, and start the script mit alt-P.
This results in an error:
File “lsystem.py” line 6 in ? Import error: no module random …

pressing the button generate of the script:
File “applicaton.py” line 447, in bevent
NameError: there is no variable named ‘lsystem_build’

What did I wrong. are some parts missing?

Thanks
macherb

And thx the others for the hints. I have to work on it. Especially to find o photo :smiley:

Just disable Traceable and Shadow in the material settings.

Martin

hmm, how about this one?

http://forums.endless-stupidity.com/images/castan.jpg

As you may have seen on the blenderdungeon-page: You have to install
the full version 2 of python to get the script running. The python-files
which were shiped with blender are not complete. Go to

and get at least the version 2.0.1. Install it on your harddrive and set the
path in blender in the info-window to “…/python/lib”. Should by working
after that.

Tobur.

That one looks pretty usable. Thanks! :smiley:

Hm, OK, you and S68 are right. The shadows will be rectangular. But until now I only used the trees as far away decoration so that the shape of the shadow didn’t really show up.

A solution could be to use an invisible (Alpha=0) roughly tree-shaped mesh as shadow-caster.

As you may have seen on the blenderdungeon-page: You have to install
the full version 2 of python to get the script running.
[/quote]

Thanks again, tobur. Python was installed, but there was a wrong path to the libraries. Now there is the following messages:
File “Application.py” ,line 447 in bevent
File “lsystem.py”, line 291, in lsystem_build
File “lsystem.py”, line 205, in grow
AttributeError: random

Sorry, tis is my first explicit contact with python and hence I have to ask a lot of questions. This script contains no README, so I am not really shure what I have to expect. I think even running the script with default settings should result in some change of the default-tree (I also tried the settings suggested in blenderdungeon). The default path in the script points to the script directory or to the user directory?

Thanks
macherb

I do nothing else than these steps:

  1. Open “lsystem.blend”
  2. Press ALT+P in the Textwindow of the pythonfile.

That’s it. Works fine for me. What version of python are you using?

Tobur.

I do nothing else than these steps:

  1. Open “lsystem.blend”
  2. Press ALT+P in the Textwindow of the pythonfile.

That’s it. Works fine for me. What version of python are you using?
[/quote]

I tried python 2.1 as well as 2.2, (makes no difference) on a debian/testing system.
I did as you told me and there remains this AttributeError:random.
What does the script actually?: save the object somewhere (where?) or display the generated tree in the graph-window to be saved later?

Thanks
macherb

Hi macherb,

if you press ALT+P you get a large number of buttons and sliders which
can be modified to alter the trees shape, size and so on.

The finished tree is generated in the 3d-window (where the little
brown thing with the green end is located!).

I haven’t any experience with the linux version. I use Windows98 and
have no problems here. Did you tried python 2.0.1? There are
scripts out there (f.e. the renderman script) which need this version
and don’t run under a newer one.

If this doesn’t help, maybe you could send an e-mail to the maker of
tree maker to get some help with it.

Cheers, Tobur.

i need to bring this topic back up, i have the same problem.

it sounds like i need teh source for lsystem and need to place it in the director with blender or somthing? i don’t know, it workd at one time befor… maybey tomarow it will work with 2.26

can’t wait to get my grubby hands on 2.26 :o :o :stuck_out_tongue:

I forgot that when i set up python i only set teh variable in blender to the python folder, not in windows, DUh, me feel little dumb now…

all you peoples having troubles…

https://blenderartists.org/viewtopic.php?t=2428&highlight=lsystem