Jack Blazes' Stuff
Home Origami Graphics Game Development Miscellaneous About
Resume

Tree Engine: Procedural Tree Generation and Physics
A more advanced version of my previous L-System project


I have taken a break from this project in favor of working with Vulkan, but this is another WebGPU project I've been working on. The goal is to produce very realistic tree meshes, with leaves, and then use the tree structure to simulate physics on the tree (wind, gravity, branch collision and compression) using the compute shaders that WebGPU provides. So far, I have made good progress on the trunk and branch generation using lots of modifications to L-systems and some janky collision code. Here is an example of the current state:



The mesh generation is just a noisy cylindrical method


I have this project up on GitHub, the bulk of the code is in TreeGenerator.cpp and OccupancyGrid.cpp. I've added a readme with images as well. The client has a lot of options for tree generation that can be modified - when I complete the project I'll write up an explanation for each of them. The next step is to add leaves, texture mapping, and then we can move on to compute shader physics.

Here are some other images of trees at various stages of the project.



Trees generated at various versions of the project