[color=darkred]This is not directly Panda 3D related, but maybe some people are still interested in that. I wrote this little script for 3dsmax, it basiclly creates a simple tree.
[color=red]Update: Now it is actually directly Panda3D related.
You can create all kinds of trees and you have quite some control over the amount of detail, so it will work for realtime aswell. The trees are normal poly objects, so they are easily tweaked, if you’re picky. They also come with a UV-set, so you can just throw a bark-texture on it and it should look kinda fine.
The controls for the tree are pretty self explanary: Height is the height, radius is the radius of the trunk. Generations says how often branches, well, branch. Radius- and length-drop define how much the branches become thinner and shorter. A 0.5 value here makes a child branch half as thick or long as its parent. Spread angle and -rotation define how the branches spread out. The lower the values here, the straighter the tree will be. Spread Randomness and Rotation Randomness make it look more random, less straight. Segments and sides finally define the detail amount on the branches.
The function “rollDice” creates random values that produce more or less natural looking trees.
Can’t really say, i have no possibility to test it. It was developed on Max 2009 and i’m pretty sure it will work with 2008 aswell… i can’t guarantee anything for earlier versions
I intend to add some further features aswell as time permits. Ideas are:
poly reduction for child branches
leaves
option for reducing branches from a certain generation to planes for even more low poly
joining of branches to one single shell
procedual bone system for animation
EDIT: I created some demo trees, feel free to take a look. They’re freeware too, so have fun.
Thanks for the hint, i’ll check that… fyi and i’m still learning myself…
The geomwriter… i pretty much just created a poly-pipe-primitive (cylinder without top and bottom), which is duplicated. There are several issues with that approach anyways, i am thinking of some improvements already…
Nevertheless it tought me a lot about matrix transformation, so i already won something
Very interesting indeed - I’m interested in this project, as it could turn out to be what I’m looking for for a much-delayed project that I have in mind…