r/computergraphics • • 6h ago

Tree growing studies

I do landscape photography and started thinking how to simulated tree growing dynamics from some of my pictures. Started by recognizing the tree from one fork in its trunk, but I didnt know what that fork should look like when the tree was knee high. I ended up building a little tree lab to work backwards from there.

The basic growth solver does two passes each season. First, every bud checks how much light it can reach in a 3D grid. I add those numbers up from the tips back to the trunk. Then I go the other way and divide up the growth at each fork. Say the main shoot and a side bud get equal light. With the bias at 0.55 the main shoot gets 55% and the side gets 45%. That sounds like a tiny preference until you repeat it at every fork for 20 seasons. You start to see it in the outline of the whole tree.

Wind took a seperate solver. At one point a little twig and a bough thicker than my leg both bent about 14 degrees in the same gustt. The tree looked a bit like rubber. I made each joint acts like a damped spring instead where a long thin branch gives more, and when it bends it carries all the twigs growing off it.

These run live (not prerendered) in Metal for TideGlass, the Mac app I make for my second monitor. Music sets the pace of growth and stirs up the wind, and the entire world follows.

Happy to answer any questions about the tech and what not.

9 Upvotes

1 comment sorted by

1

u/camilo16 1h ago

This is really cool!

How is your geometry represented, is it a manifold mesh or disconnected tubes? And how are you modelling your foliage?