Skip to content
HN On Hacker News ↗

Growing trees

▲ 206 points • 28 comments • by ibobev • 2w ago • HN discussion ↗

Pangram verdict · v3.3

We believe that this text is a mix of AI, AI-assisted, and human-written content.

73 %

AI likelihood · overall

Mixed
22% human-written 68% AI-generated
SEGMENTS · HUMAN 10 of 44
SEGMENTS · AI 31 of 44
WORD COUNT 831
PEAK AI % 100% · §4
Analyzed
Oct 26
backend: pangram/v3.3
Segments scanned
44 windows
avg 19 words each
Distribution
22 / 68%
human / AI fraction
Verdict
Mixed
Pangram v3.3

Article text · 831 words · 44 segments analyzed

Human AI-generated
§1 Human · 0%

A procedurally grown linden. The branching structure comes from the simulation described below.

§2 Human · 0%

I’ve been playing with procedural tree growth recently. The method I am using is based on Self-organizing tree models for image synthesis, by Palubicki et al.

§3 Human · 0%

(SIGGRAPH 2009).

§4 AI · 100%

The idea is beautifully simple: buds compete for light, the tree distributes a growth resource among them, and the successful ones produce new shoots. Those shoots change the light available for the next round. The crown shape emerges from this feedback loop. Here is a quick breakdown, with some visualizations from my implementation. One season at a time The basic building block is a metamer: an internode (a short piece of stem), a leaf, and the buds at its upper node. A terminal bud continues an axis, and axillary buds may start lateral branches. Each iteration represents one growing season: Measure the light available to every bud. Sum that light from the tips down to the root. Distribute a proportional growth resource back up the tree. Grow shoots from the buds that receive enough resource. Shed poorly lit branches and age dormant buds. The same seed growing from season 2 through 30.

§5 AI · 100%

The camera and scale stay fixed.

§6 AI · 100%

Where is the light?

§7 AI · 100%

One way to approximate light availability is a voxel grid.

§8 AI · 87%

Each bud adds shadow to a widening pyramid of voxels below it, with its contribution decaying with depth.

§9 AI · 100%

Contributions from all buds add up, so the interior naturally becomes darker as the tree grows. Each bud reads two things from this grid: an available-light value \(Q\), and a direction \(\mathbf{V}\) toward the least shaded neighboring voxel inside its perception cone. Left: a vertical slice through the shadow grid. Right: light per bud.

§10 AI · 100%

Cyan buds are well exposed. Orange ones are shaded.

§11 AI · 100%

The paper also supports space colonization: fill an envelope with marker points, let buds compete for nearby markers, and remove markers as growth occupies their space. Same growth machinery, a different way to decide where growth is possible.

§12 AI · 100%

Who gets to grow?

§13 AI · 100%

Light values are first summed down the branching structure.

§14 AI · 100%

At the base, the total \(Q_{base}\) becomes a growth resource \(v=\alpha Q_{base}\). This resource travels back up, splitting at every branching point. Left: accumulated light flowing down. Right: resource flowing up. Orange dots mark buds that receive enough to grow.

§15 Human · 0%

In the extended Borchert-Honda model, the main continuation receives: \[v_m=v\frac{\lambda Q_m}{\lambda Q_m+(1-\lambda)Q_l}\] The lateral side receives the remainder.

§16 AI · 100%

At \(\lambda=0.5\), resource follows light.

§17 AI · 100%

Larger values favor the main axis. Smaller values favor the laterals. This little bias has a surprisingly large effect: Left: lambda=0.46, a spreading crown.

§18 AI · 100%

Right: lambda=0.56, a dominant leader. A bud receiving less than one unit stays dormant. Otherwise it produces a shoot of \(\lfloor v\rfloor\) metamers, subject to a configured cap.

§19 AI · 100%

New metamers receive their own buds, and the process repeats. Magic!

§20 AI · 99%

Which way?

§21 Mixed · 51%

Each new segment follows a normalized weighted sum of its previous direction, the light-seeking direction \(\mathbf{V}\), an upward or downward tropism, and some noise.

§22 Mixed · 51%

A horizontal component can make lateral branches spread into flat tiers.

§23 AI · 100%

Bud placement around the stem (phyllotaxis) provides another important control.

§24 AI · 100%

Spiral arrangements, opposite pairs, and annual whorls produce very different branching patterns.

§25 AI · 100%

The frame is parallel-transported along the shoot so the arrangement stays coherent as it bends.

§26 Human · 2%

Six phyllotaxis patterns, seen down the shoot axis.

§27 Human · 14%

Numbers identify consecutive nodes. Dropping branches and adding girth With the shadow model, a lateral branch is shed when the light collected by its subtree, divided by its metamer count, falls below a threshold.

§28 AI · 100%

Young branches get a grace period.

§29 AI · 100%

Otherwise the inner crown would keep accumulating starved twigs.

§30 AI · 100%

Same seed, without shedding (left) and with it (right). Self-pruning changes the light available for subsequent growth too.

§31 Human · 0%

Branch thickness comes afterwards, using a pipe model: \[r_{parent}^{n}=\sum_i r_i^{n}\] Start with a fixed radius at the tips and accumulate toward the root.

§32 Human · 1%

For \(n=2\), cross-sectional area is preserved at junctions.

§33 AI · 100%

Larger exponents produce slenderer trunks.

§34 AI · 100%

Shed branches still contribute to the girth below them.

§35 AI · 100%

Losing a branch does not make the trunk shrink.

§36 AI · 100%

Width and passive sag are calculated from the grown skeleton and do not feed back into growth.

§37 AI · 72%

From branches to foliage The skeleton becomes a bark mesh by sweeping tubes along its axes.

§38 Mixed · 50%

For foliage I use twig spray cards: each card depicts a small twig carrying several leaves, using variants from a procedurally drawn atlas.

§39 AI · 78%

The twig atlas and the cards that carry it.

§40 AI · 100%

Each card replaces a whole clump of leaves.

§41 AI · 100%

Blending the card normals toward an ellipsoid around the crown helps the foliage shade as a volume. Lower detail levels retain fewer, larger cards and simplify the bark.

§42 AI · 100%

At a distance, baked directional impostors take over.

§43 Human · 0%

Bonus: The grown tree can also be baked into depth-field views for forest rendering. The image below uses many instances of one baked linden, with size variation. The forest representation and lighting deserve a separate post, though.

§44 Human · 0%

One grown tree, instanced as a forest using baked depth-field views.