Tree Generator

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

Post Reply
aligorith
Posts: 0
Joined: Sun Dec 05, 2004 3:40 am
Location: Chch, NZ

Tree Generator

Post by aligorith » Wed Feb 09, 2005 6:22 am

Greetings,

I often find myself trying to find a good way to economatically generate trees.
There are basically several ways currently:[\b]

1) Model it by hand (yuk! troublesome, and very time consuming)

2) Use an external program (they either don't look right, or have too many verts = large files = slowness)

3) Hack one of the outdated existing scripts so that I can run it (hmm... quite difficult to do)


Of these current methods, I know that one good method is the one Arbaro uses, with quite a good result, but sadly too many verts meaning that the filesizes are just too large for me to use in any decent time.

What we should aim for:[\b]

1) Well, as a last resort we can still model them it hand...

2) Make some improvements to the particle system, so that particles
can be in a group together, growing off each other and being connected,
and then each group can optionally be duplicated and positioned. This could then be used for lightning bolts as well...

3) Create a new Python script to make trees.
This would possibly be the one I could look at. However, for this to work, some new things would need to be added to Blender:
- ability to find out whether the frame change is caused by rendering. this is useful so that scriptlink scripts can choose whether to do anything during editing
- ability to generate data at the start of a rendering session, instead of generate during design/editing before render, and save with file or (re)generate everytime the frame changes.

Aligorith

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Wed Feb 09, 2005 10:14 am

There are some more ways to make trees.

-Shaders. Put a cube in the scene and assign a tree shader that will render a tree.

-Paint effects. Pretty much like a shader but more 3d visual feedback.
Nice about paint effects it's that you can mix vertex with paint effects.
So you can paint the leaves on a vertex tree. giving not much verteces in the scene and high detail on the rendering.

bullx
Posts: 0
Joined: Mon Jan 05, 2004 9:25 pm

Post by bullx » Wed Feb 09, 2005 12:25 pm

you have already considered to use an external program.
but maybe you can give a chence to the one called arbaro
http://arbaro.sourceforge.net/
it's os and it's java based
it can export obj and dxf.
it's a loto of vertex, yes, but you can produce very nice trees

aligorith
Posts: 0
Joined: Sun Dec 05, 2004 3:40 am
Location: Chch, NZ

Post by aligorith » Fri Feb 11, 2005 6:07 am

bullx wrote:you have already considered to use an external program.
but maybe you can give a chence to the one called arbaro
http://arbaro.sourceforge.net/
it's os and it's java based
it can export obj and dxf.
it's a loto of vertex, yes, but you can produce very nice trees
actually, my favourite option would be to have arbaro or an arbaro clone in python able to generate directly inside Blender, at the start of a render session.

SamAdam
Posts: 0
Joined: Thu Mar 04, 2004 1:28 pm
Contact:

Post by SamAdam » Fri Feb 11, 2005 6:30 am

that could be done, with a lot of coding, and python ain't all that fast, if you plan on adding thousands of verticies.

oin
Posts: 0
Joined: Fri Apr 02, 2004 6:34 pm

Post by oin » Fri Feb 11, 2005 9:06 am

with deeper knowledge of arbaro, you can produce very low pol trees.I have even done low enough as to get loaded in a game engine. People don't usually know, but there's a way to output a tri per leaf.

Iloaded perfectly a arbaro tree I made from zero, into blender, with ideasman obj script.JMS one is very good ,too.

no uv generation yet.

so I found a method to uv map it in short time in Ultimate Unwrap, with a packing-overlaped, separated by conectivity feature that Ultimate has . (I don't know a similar workflow in Blender) I selected the leaves group, and applied that auto maping. Asigned an alpha material to the overlaped leaf shape (of zillions of leaves all matching same leaf shape...ie: i did an automatic workflow in Ultimate like th ouput Xfrog has, but with more control on how I want the mapping,hehe) of an scanned leaf with transparent bacground.

did some auto map(ruling lines one, for this would be a bit better blender's auto map, but all can work) for the sterns group, other for branches group, other for trunk.

rendered in a real time 3d previewer with 2 sides renderable alpha faces, and man, did it look nice for such a low poly count.

so yep, can be pretty good for any purpose, low or hi res.

it's gonna have uv export in obj someday, but not yet.

i needed for this Ultimate Unwrap, whic costs 40$, but I had it since years, for all my mappings and converting my character animations.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Fri Feb 11, 2005 9:15 am

I think the main problem are the leaves, not the branches. Polycount wise.
On the fly (at render time) poly creation can solve display problems, but it can create huge render times. (At least the poly limit has gone up dramaticly so maybe it's just a matter of swapspace)

There is no forest in arbaro :)

Paint effect/particle solutions seem to give good results (if the tree is not to close) also for grass and flowers. But that needs illuminated 3d brushstrokes, and that's not easy to implement.

oin
Posts: 0
Joined: Fri Apr 02, 2004 6:34 pm

Post by oin » Fri Feb 11, 2005 10:20 am

As I mentioned, ther's a trick in arbaro to not use that minimum of 5 or 6 tris per leaf...but just one tri (you can't go lower than that in any tree generator, comercial or not ;) ) an alpha texture the uvmapped leaves. I posted it some while ago, not in elysiun nor here.If I see someone interested (though I doubt it) , I'll rescue that thread and paste here the trick(or just load arbaro to remember that simple 3 settings.I know is hard to guess,though. ;) )

arbaro has a seed value: with same config of tree, u can export several random trees of that type.it includes many realistic existing trees in real life (in xml) but i like producing my own, even if not to accurate (you can make accurate from scratch too) So you can go exporting obj with different random value once you have an small number, just one do an automatic array of them (I use other packages, sure you can do in blender)

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri » Fri Feb 11, 2005 11:16 am

I'm not sure how particles are drawn, but I think they use less poly's than a tri. In my imagination it's a brushstroke in 3d, a function that draws in the rendering. Leaves can be like that to. In a renderpipeline a tri with a texture is much easier, but can get very slow, specialy when it's a texture with alpha.

oin
Posts: 0
Joined: Fri Apr 02, 2004 6:34 pm

Post by oin » Fri Feb 11, 2005 12:59 pm

True.

Maybe for a forest is better what you suggest.

Friday13
Posts: 54
Joined: Wed Oct 16, 2002 10:40 pm

Post by Friday13 » Fri Feb 11, 2005 10:40 pm

How about implementing text-based object generation, like the one use in L-system?:

http://www.geocities.com/tperz/L4Home.htm

Have a look here for an example:

http://www.geocities.com/tperz/L4Examples.htm

This is good, and not only for making trees!
Don't miss the sequel: "I still see dead people"

dsp_418
Posts: 0
Joined: Wed Jan 12, 2005 2:29 pm

Post by dsp_418 » Sun Feb 13, 2005 1:18 pm


Post Reply