SimulationA tree that grows as a front
Grown by rule from a seed (Weber and Penn) and drawn growing from one number in the vertex shader, with a WebGL fallback
A tree grown by rule from a seed (Weber and Penn.
A broadleaf tree, a spruce and a flowering bush grown on the GPU.
Measured 11 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 157, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Three plants and the grass tufts in a 6 m/s gusty wind, summer, the whole scene in view, the broadleaf shaken every 3 s: per plant six compute passes a frame (bend, move, reset, list branches, list leaves, clamp) and four to six indirect draws. Phones: tiers are being measured next.
| Machine | GPU ms | CPU ms | CPU p95 |
|---|---|---|---|
| RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring tool | 1.65 | 0.35 | 0.92 |
| apple · Apple A19 Proin a browser tab · 16 November 2026 | 8.73 | 0.14 | 0.20 |
| Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026 | 15.9 | 1.46 | 2.10 |
Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.
.toVar() first.renderer.compute(node) is its own submit, so a uniform may change between calls (the growth steps rely on it); passes given together as an array all see the same uniforms.position and rotation options, in the shaders: do not move or parent object3D (its meshes stay at the origin, frustumCulled off).tier to low (FOLIAGE_TIER): the light leaf count (about half, drawn larger so the crown keeps its cover), wood round only from 8 px, the coarse leaf mesh past 9 m, leaves thinned from 20 m and none past 80 m.moveTo) must not bake: run without waiting, the bake left every leaf unlit (black crowns); waited on, it stalled a frame.turns; four plants at three turns read as twelve trees), size and lean the instances, and let a live hero take only a spot where its plant stands as it grew.compileAsync starts, then hide it: left showing while the compile ran, the frames drawn meanwhile drew it and built every shader on the spot (26 stalls, and a tree showed in the garden it was not part of).compileComputeAsync, through the shared queue): grown after load, each pass built its pipeline on its first dispatch, 28 stalls a plant.sunShade (cloud shadows) is read as each material is built: set it before the first plant, and drive it with your own uniforms rather than replacing it.branch-springs.ts (tested) and the bend pass in wind.ts.Written for the library. Fully custom code.
Adam Runions, Brendan Lane and Przemyslaw Prusinkiewicz, “Modeling Trees with a Space Colonization Algorithm” (2007): The broadleaf’s and the bush’s growth: attraction points, influence and kill distances, one segment a step. Here on the GPU, with a spatial hash and integer atomics.
Jason Weber and Joseph Penn, “Creation and Rendering of Realistic Trees” (SIGGRAPH 1995): The spruce’s whorls of branches by rule along a leader, shorter up the cone, drooping and turning up at the tips.
Kichiro Shinozaki et al., the pipe model theory (1964); Leonardo da Vinci’s rule of branching: A node’s radius from the tips it carries (radius ∝ tips^(1/n)).
Masami Monsi and Toshiro Saeki, light extinction in plant canopies (1953): Light through the crown falls off as exp(−G × leaf area along the ray), G = 0.5 for leaves facing every way.
Owner’s HaTac branch springs (2026): A spring per node pulled toward the analytic sway’s own bend, so springs and sway agree at rest; gust fronts as solved fronts rolling downwind; semi-implicit Euler in two substeps a frame.
Tiago Sousa, “Vegetation Procedural Animation and Shading in Crysis”, GPU Gems 3, ch. 16 (2007): Wind as main bending, branch detail and leaf flutter with phases per branch. Here per joint of a real skeleton, summed down each limb.
Robert L. Cook, John Halstead, Maxwell Planck and David Ryu, “Stochastic Simplification of Aggregate Detail” (SIGGRAPH 2007): Far leaves: a share kept, enlarged so the crown keeps its cover.
Helmut Vogel, “A better way to construct the sunflower head” (1979): The golden angle (137.5°) between successive leaves round a twig.
Mark Jarzynski and Marc Olano, “Hash Functions for GPU Rendering” (JCGT 2020): The PCG hash: written from the paper for the CPU side; the GPU side uses three’s own `hash` node (imported, MIT).
Tomas Möller and Ben Trumbore, fast ray–triangle intersection (1997): envelopeFromMesh counts crossings to sample a mesh’s volume.
Zina Cigolle et al., “A Survey of Efficient Representations for Independent Unit Vectors” (JCGT 2014): The octahedral encoding that packs a crown normal into one float.
Edwin Catmull and Raphael Rom, “A Class of Local Interpolating Splines” (1974): The baked wood’s tubes run along a uniform Catmull–Rom curve through each limb’s nodes.
Ken Perlin, improved noise (2002): The bark’s lichen and the demo’s meadow read three’s MaterialX noise node (mx_noise_float): imported, not copied.