生长中的树木
Growing Trees

原始链接: https://brashandplucky.com/2026/10/15/growing-trees.html

这描述了一种基于 Palubicki 等人自组织树模型的程序化树木生长方法。生长按季节进行,使用节间、叶片和芽等分生单元(metamers)。每季为芽测量光照,向下汇总到根部,转换为生长资源,再向上重新分配。获得足够资源的芽产生新枝;光照差的分支被脱落,休眠芽老化。光照可用体素阴影网格或空间殖民标记近似。在分枝处,资源按 lambda 在主轴和侧轴间分配,强烈影响树冠形状。新节段沿光照、向性与噪声生长,而叶序控制芽的排列。当子树每分生单元光照低于阈值时,分支被脱落。随后用管状模型计算树干与分支半径,即使脱落也保持厚度。骨架转为树皮网格,而叶片使用带法线混合的细枝喷洒卡片;更低 LOD 简化细节,远距离树木使用烘焙替身。生长好的树还可通过烘焙深度场视图实例化为森林。

Hacker News 上的一篇帖子链接到“Growing Trees”(brashandplucky.com),一篇程序化树木生成文章(191 分,26 条评论)。其方法模拟真实生长:芽在光照下竞争,树木在芽之间分配生长资源,成功的芽产生枝条并改变可用光照,树冠形状由此反馈循环产生。评论者称赞结果与可读性,指出独立树木与林地树木的差异,以及风对可行叶片的影响。讨论探索了扩展,如模拟受胁迫或“退化”树木、毛虫、真菌、甲虫,以及相邻树木间的树冠羞避,还有用稀疏锥体存储光照而非大规模体素网格等想法。一些评论者将程序化生成简化为简单的竞争规则,另一些则询问林业应用并请求动画生长演示。少数离题评论抱怨新账号或类似 LLM 的账号。
相关文章

原文
Procedurally grown linden with foliage
A procedurally grown linden. The branching structure comes from the simulation described below.

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. (SIGGRAPH 2009).

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:

  1. Measure the light available to every bud.
  2. Sum that light from the tips down to the root.
  3. Distribute a proportional growth resource back up the tree.
  4. Grow shoots from the buds that receive enough resource.
  5. Shed poorly lit branches and age dormant buds.
The same seed growing from season 2 through 30. The camera and scale stay fixed.

Where is the light?

One way to approximate light availability is a voxel grid. Each bud adds shadow to a widening pyramid of voxels below it, with its contribution decaying with depth. 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.

Vertical slice through the tree's shadow grid Tree buds colored by available light
Left: a vertical slice through the shadow grid. Right: light per bud. Cyan buds are well exposed. Orange ones are shaded.

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.

Who gets to grow?

Light values are first summed down the branching structure. 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.

Light summed from the tree tips to its base Growth resource distributed back toward the buds
Left: accumulated light flowing down. Right: resource flowing up. Orange dots mark buds that receive enough to grow.

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. At \(\lambda=0.5\), resource follows light. Larger values favor the main axis. Smaller values favor the laterals.

This little bias has a surprisingly large effect:

Broad crown grown with lambda 0.46 Narrow crown grown with lambda 0.56
Left: lambda=0.46, a spreading crown. 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. New metamers receive their own buds, and the process repeats. Magic!

Which way?

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. A horizontal component can make lateral branches spread into flat tiers.

Bud placement around the stem (phyllotaxis) provides another important control. Spiral arrangements, opposite pairs, and annual whorls produce very different branching patterns. The frame is parallel-transported along the shoot so the arrangement stays coherent as it bends.

Six arrangements of buds around a shoot
Six phyllotaxis patterns, seen down the shoot axis. 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. Young branches get a grace period. Otherwise the inner crown would keep accumulating starved twigs.

Dense branching structure with shedding disabled More open branching structure with shedding enabled
Same seed, without shedding (left) and with it (right). Self-pruning changes the light available for subsequent growth too.

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. For \(n=2\), cross-sectional area is preserved at junctions. Larger exponents produce slenderer trunks. Shed branches still contribute to the girth below them. Losing a branch does not make the trunk shrink.

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

From branches to foliage

The skeleton becomes a bark mesh by sweeping tubes along its axes. For foliage I use twig spray cards: each card depicts a small twig carrying several leaves, using variants from a procedurally drawn atlas.

Procedural atlas containing four leafy twig sprays Foliage card geometry shown in wireframe
The twig atlas and the cards that carry it. Each card replaces a whole clump of leaves.

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. At a distance, baked directional impostors take over.

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.

A forest rendered from instances of one baked linden
One grown tree, instanced as a forest using baked depth-field views.
联系我们 contact @ memedata.com