Tree Generator

Started by
1 comment, last by Troll 18 years, 6 months ago
Hi, for my game im working on the tree generation. The base of the tree doesnt need to be worried about, but just the branches. Right now the only variables affecting the branches are x,y,z, and tree type. Others will be added later on but for right now thats all. Im thinking the generator will have a base for each type of tree (there will be about 32 types of trees) and then the x,y,z variables follow the tree type's rules and change it. This is where I dont know what to do, im not sure how to have it generate the vertices exactly. Meshes dont need to be worried about right now either. Just the vertices of all the branches for the tree being generated. So if that tree type says to have long skinny branches that cover a broad but not high range, and curve like a rounded "L", how would I generate the vertices for each individual branch? Thanks a lot, please help!
DONT LET THEM DISCRIMINATE! BRING BACK THE BLACK!
Advertisement
Maybe you could work from a 3D space determined for each type. For instance for a nice round tree, this shape could be a sphere. For a conifer it might be a tall cone.

Your vertex generation could then be the simple bit - getting random points in the space. But describing the space and transforming points might be a bit too much maths?
I think you want to check out this site: Algorithmic Botany Home Page. I'd recommend starting with the book The Algorithmic Beauty of Plants.

This topic is closed to new replies.

Advertisement