Jyurin was my final project for my university graphics class, in which I set out to research and implement the procedural generation of trees.
Traditionally the go-to algorithm for generating plant-like things is Lindenmayer systems. However, L-systems are fractals. While trees can be considered as fractal-like, real trees are a product of their environment and their growth is influenced by the weather, other plants, nearby objects, animals, and available nutrients. As such, L-systems tend to produce unrealistic, overly-perfect tress. Other techniques exist to actually simulate a tree growing in varying environmental conditions, but this can quickly get very complicated and is not ideal for generating entire forests of trees. The compromise is the space colonization algorithm proposed by Runions et al, which uses a cloud of randomized points to influence branch growth.
One major benefit of space colonization is that you can manipulate the general shape of the tree by modifying the attraction volume to influence the way the tree grows. This can be used by artists to change the shape of the tree’s crown (as seen below) or to prevent the tree from growing in a certain areas–such as through walls in a game environment.
- C# w/ .NET Framework 4.5
- OpenGL via OpenTK
Also included in the download is the presentation associated with the project, as well as the papre describing the algorithm it implements.
Download for Windows
- The generation inputs can be manipulated using the window on the left.
- Left-click on the 3D view to toggle the flycam.
- WASD to move around
- Scroll wheel to move vertically (useful for traversing the height of the tree.)