Sign in to follow this  
Falling Sky

Tree Generator

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this