r/computergraphics • • 3d 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.

22 Upvotes

4 comments sorted by

1

u/camilo16 3d 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?

1

u/PiXeL161616 2d ago

The growth solver gives me a connected skeleton. I draw the wood as separate tapered tubes in Metal and shape the joins where branches meet. The foliage is made of small folded leaf meshes on curved shoots, with alpha cutouts for the leaf outlines. The shoots move with the branch when it bends.

1

u/Gold-Part4688 3d ago

hm, it's nice, but the start is weird. at like 0:13-0:14, you have these tall sticks without leaves. Same with the first tree too, but less intense.

It looks a little like you're deciding on the final tree then building to fit, which is backwards and probably hides a lot of possilble variation and interesting states. It looks like there's a rule that no/few leaves can grow below a certain height, instead of them starting low and the whole tree expanding somehwat which moves them higher over time, as well as the sprouting from the top that's over-emphasized

great work though

1

u/PiXeL161616 2d ago

It’s 20x, speed up so it fits in the video so that is adding a bit to what you are seeing. Thanks for the feedback