I start by emitting points randomly from the terrain surface, and then placing a tree at that point. I also varied the size of the trees so that those that are lower and where more water would collect are larger.
I originally wanted the trees to have varying lifespans based on how optimal their location was, and then the trees that lived longer would produce more seeds. However, with my current implementation all the trees have the same lifespan. So to simulate the reproductive success of the trees, those that are in an optimal location spread more seeds over time. The seeds are spread by scattering particles in random directions from each tree and then projecting those particles back onto the plane. Once that is done, a tree is instanced at that point.
This first image is the initial condition with the trees scattered randomly across the terrain. Although, you can see that I have a treeline to prevent the trees from growing too high up on the mountain.
Advancing forward in time, you can see that the trees start to become more clustered and a structure appears.
Even further ahead in time, the trees become even more clustered in the optimal regions, however, I also check to see how many trees are near a given tree, and kill the tree if it is being crowded out.
I still need to work on the visuals so that I can render a timelapse, rather than showing these screenshots.
No comments:
Post a Comment