My passion: tree generators. This is the art of content generation where I had invested the most time. It is still fun and the next generation generator is already planed.
This first tree generator was a subcomponent of the "Orkteckengine" which was my main project over years. To call it TreeFolk 1.0 is a post mortem idea. Most time and most lines of code were consumed by the triangulation algorithm. The leftmost picture is the first tree I ever created.
The generator itself was just one recursive method with some parameters to influence recursion depth, randomness and trunk-branch deviation. The triangulation was designed to create as few triangles as possible. Therefore each branch reuses the top vertex ring of its parent. Problems occur if the vertex number decreases and with the texture mapping. I solved the first problem by equally placing triangles instead of quads. The second problem has not so obvious. Since nothing creates circles the texture coordinates can just increase with the recursion depth using wrap mode. Unfortunately the scaling around the cylinder cannot be defined nicely. If the texture is wrapped around exactly one-time it is stretched at the trunk and too clenched for the smaller branches. Since everything is continuous one cannot use different amounts of repetitions for different sized branches. I did not found a really satisfying variant but having a constant scale and a cut in the texture on one side looked best.
For the leaves I used billboards too get a higher filled volume at less performance. You can see the final results in the third screen shot above. For different distances different handmade billboard textures were placed inside the tree. Depending on the view distance maximal two of the sets were blended together. I recommend you: don't use billboards as specially not today. They do not have much more performance and you need a good graphic artist and last but not least they are creepy to lighten. With shadow maps and self shadowing ... (just NO)