Procedural plants for games, written in Rust on the Bevy engine.
Verdant generates grass, flowers, bushes, trees, conifers, palms and ferns from a handful
of parameters and a seed. Each plant comes with generated colour and normal textures,
PBR materials, and per-vertex wind weights, so it can sway in a vertex shader. Any part
can glow and take colours and surfaces no Earth plant
has: gradients, iridescence, leaves like stained glass, skins that are not bark. Trees
and bushes can carry organs: lanterns and pods at their twig ends, strings of
beads, hanging moss, thorns, bristles, bottle trunks and trunks of twisting strands.
A recipe describes a plant as data: rules for how its stems grow and what
grows on them. Plants are edited in a viewer and exported as .glb files.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Run from this folder, because the wind shaders are loaded from assets/.
cargo run --release
cargo run --release -- --kind tree --preset willow --seed 7
cargo run --release -- export --all --out exports
cargo run --release -- list
cargo run --release -- describe --kind tree --preset oak
cargo run -- --help lists every option. The first build compiles Bevy and takes a few
minutes.
Drag to orbit, right-drag to pan, scroll to zoom. The panel on the left has:
- Kind, preset, seed, mesh detail. Detail changes how finely the plant is built (and with it some of its shape); for lighter versions of the same plant see Levels of detail.
- Parameters of the kind: sizes, counts, angles, colours, leaf and bark types, and the optional parts (flowers, fruits, berries, cones, coconuts).
- Wood properties (trees, bushes, conifers, palms): density, flexibility, strength, and the bark thickness at the ground and at the top with the gradient between them.
- Glow: for the wood, leaves, flowers and fruits the plant has, a pattern, colour and strength, where along the plant it is strongest, and the pulse. See Glow.
- Look: for the same groups, a gradient to a second colour, iridescence, how much light leaves and petals let through, cells between the veins, and the shape of leaves (twist, rolled tip, wavy edge). See Colour and surface.
- Wind: direction, strength and gusts.
- View: the scene (day, dusk, night, black light), how strongly glow is shown, ground, a patch of 25 plants, the wind weights as colours, texture size.
- Export: writes the current plant to
exports/with the chosen number of levels of detail, with or without branch cards on the last two or voxels on the last (and shows any one of them), and saves or loads the plant's parameters as a file.
The panel also shows the plant's triangle count, size and estimated weight.
--screenshot file.png saves a 1600×900 picture of the view and quits; add
--headless to render it with no window at all, on a machine without a desktop or
from a script whose window would never be shown. The picture is the same either way.
cargo run --release -- --kind tree --preset oak --headless --screenshot oak.png
The forest example grows 1000 trees, each with its own seed, preset, turn and size,
and draws them with the levels of detail switching as a game would. Each plant is
grown with every level it can have: plain meshes, branch cards and voxels. All of them
stay loaded, so switching between them shows the same plants from the same place.
cargo run --release --example forest
Growing 1000 trees takes about 40 seconds on all cores; the plants appear as they are
ready. Keeping all three kinds of levels loaded needs about 3 GB of meshes and 2.5 GB
of textures. --count, --kinds bushes or --kinds woody, --lods and --spacing
change the forest; --help lists every option.
Up to 2000 trees each grow from their own seed. A bigger forest grows 128 of them and
plants turned and scaled copies everywhere, sharing meshes and materials
(--archetypes N sets how many), so 500 000 trees grow in about 9 seconds. Plants are
streamed in as the camera moves, each with only the levels it can show from there.
The sun's shadows are off unless --shadows is given: they double the frame time.
Right-drag looks around, WASD and Q/E move, Shift moves faster and the wheel changes
the speed. Tab cycles through full detail, plain levels, cards and voxels. 1 to 6 show
only that level and 0 goes back to switching by distance. T tints each plant by the
level it is drawn with (green, blue, yellow, red, from the nearest). Holding Space
shows full detail. K turns off the culling past the last level, F the far forest's
columns, and [ and ] scale every switch distance. The panel shows the frame time, the plants drawn at each level
and the triangles in view against full detail.
Two runs print numbers and quit:
--compare DIRrenders full detail, plain, cards, voxels and the level tint from the same place with no window. It saves each picture, plus a heat map of where it differs from full detail, and prints how far each is off: the brightness against full detail, the mean difference of 8×8-pixel blocks, and the share of blocks more than 16 levels off.--profileflies the same path into the forest (at most 600 m) once for each way of drawing and prints the frames per second, the 50th, 95th and 99th percentile frame times, the triangles and meshes in view, the far forest's memory, and the plants and triangles in view at each level. Add--headlessfor no window,--stillto stop the wind,--modes plain,voxelsto fly only some ways of drawing and--secondsto change the length of a flight.
--scene taiga grows a dense conifer forest instead: about 1000 Norway spruces and
Scots pines (a quarter of them pines), 4.5 m apart with ferns, shrubs and boulders under them, haze, a sky, and forested
hills that carry the canopy to the horizon. It starts above the treetops looking over
the hills; --at 0,2,100 --look-at 0,24,55 looks up the trunks from the ground.
Conifers draw their branches as cards and voxels too; ferns and shrubs keep their plain
levels. Plants are drawn as far as the haze lets anything show (1800 m). Past 600 m
(--far, 0 turns it off) the forest is drawn tile by tile as columns, each 2 m across
(4 m past 1200 m), as high as the trees standing in it and coloured like their
crowns; near the horizon they match the voxel trees they replace to within a few
levels of brightness.
On an M5 MacBook Air (24 GB) at 1920×1080, with no shadows:
| Forest | plain | cards | voxels | Peak memory |
|---|---|---|---|---|
| Taiga, 20 000 trees | 10.8 fps | 14.8 fps | 17.5 fps | 7.4 GB |
| Taiga, 500 000 trees | 10.6 fps | 13.3 fps | 13.8 fps | 10.0 GB |
| Clearing, 500 000 trees | 31.2 fps | 33.5 fps | 33.9 fps | 7.2 GB |
Before the far forest, 500 000 taiga trees ran at 1.5 to 1.9 fps and peaked at 13.6
GB. About 3.5 GB of the memory is fixed graphics memory that appears once the forest
has more than about 800 plants. The near trees are most of the time left:
alpha-tested needles drawn up close. NANITE_PLAN.md says how to close the gap.
| Kind | Presets | Optional parts |
|---|---|---|
| grass | Meadow grass, Tall dry grass, Lawn tuft, Reeds, Wheat, Wild oats, Pampas grass, Flowering meadow, Clover lawn, Bluebell grass, Glow grass, Aurora grass | seed heads (six types), flowers (four types) |
| flower | Daisy, Tulip, Poppy, Sunflower, Bluebell cluster, Neon orchid, Opal lily | stem and ground leaves |
| bush | Round shrub, Berry bush, Flowering bush, Rose bush, Bare thicket, Lantern-berry bush, Scarab bush | leaves, flowers, berries, organs |
| tree | Oak, Birch, Apple tree, Cherry blossom, Maple (autumn), Willow, Moon willow, Glassleaf tree, Lantern tree, Finger tree, Thorn-moss tree | leaves, flowers, fruits, organs |
| conifer | Spruce, Pine, Cypress, Crystal spruce, Scots pine, Norway spruce | cones, lost branches, hanging shoots, dead stubs, single needles up close |
| palm | Coconut palm, Date palm, Young palm, Sunset palm | coconuts or dates |
| fern | Forest fern, Bracken, Ember fern, Flame fern | |
| recipe | Glowcap mushrooms, Orb stalks, Pod plant, Tendril berry, Giant rose trunk, Flame bush, Feather plume, Tipped stalks | whatever its rules grow |
A conifer's crown is either rings of branches (every preset before the Scots pine) or pine limbs and tufts. The Scots pine uses the second: a long, slightly crooked bare trunk, grey-brown low down and orange higher up (a gradient along the wood), and a few limbs in loose rings that rise and then spread, fork into shoots and end in tufts of needles, with sky between the clumps.
Three options make any conifer look like one grown in a crowded forest:
- Lost and dead branches (
gaps, 0 to 1): branches missing from the rings, and dead ones that keep their wood and lose their needles, most of them low down in the shade. Branches are also of more uneven length. - Hanging (
hang, 0 to 1): side shoots fall from the branches in curtains, more of them lower down, as on an old Norway spruce. - Stubs on the trunk (
stubs): short dead branch stubs on the bare trunk below the crown.
The needle picture is one of three textures: the old fan of needles, a fine shoot (a bottlebrush of side twigs, used by the Norway spruce) or a needle tuft (a pine's bundle of long needles). All of these are off in the old presets, which grow what they always did.
Single needles up close (real_needles, pines only, on for the Scots pine) draws
the full level of detail the way virtual geometry does it: every needle is a blade of
its own, set round the last two years' growth of each shoot as a bottle brush, leaning
forward and curving up, longest in the middle of the shoot and drawn to a point at its
tip. The older wood below is bare. Each year's growth sets off a little askew from the
last, and forks into a candelabra of grey twigs with needles of their own; the shoots
and twigs are grey-brown and scaly where the limbs and trunk are orange. No two
neighbouring needles need be the same green: each takes one of six shades (fresh,
silvery, pale, dark, yellowing, dead), with the yellowing and dead ones mostly on the
older wood. The lower levels keep the tufts. The Scots pine's full level is then about
200 000 triangles (9 100 at the next level), shown only while the tree fills half the
screen or more. The needles are a blue-green sage, lighter than a spruce's. The
forest example switches them off: a few hundred pines at that size would take minutes
to build.
Any share of the blades of a tuft can be a stalk with a seed head or a flower instead.
The viewer has both under Seed heads and Flowers; on the command line
--seed-head <type>, --seed-heads <share>, --grass-flower <type> and
--flowers <share> change the preset.
| Seed head | Looks like |
|---|---|
spike |
one dense, smooth spike (timothy, plantain) |
bearded |
a nodding ear of grains with long bristles (wheat, barley, foxtail) |
panicle |
an open spray of fine branches, a spikelet on each (meadow grasses) |
oat |
a few large spikelets hanging from arching stalks (oats, brome) |
cattail |
a thick cylinder with the tip of the stalk above it |
plume |
a big feathery plume (pampas grass, common reed) |
| Flower | Looks like |
|---|---|
daisy |
a flat ring of narrow petals around a round centre |
buttercup |
five broad petals in a shallow cup |
bell |
a hanging bell on a stalk that nods over |
clover |
a round head of many small petals |
Size and colours of both are parameters. Seed heads count as fruits and the flowers as flowers in the weight of the plant.
cargo run --release -- --kind grass --preset meadow --seed-head plume
cargo run --release -- --kind grass --preset lawn --grass-flower buttercup --flowers 0.3
![]() |
![]() |
![]() |
![]() |
One .glb holds one plant:
- One mesh with a primitive per part (
bark,leaves,flowers,fruits, ...), each with its own material. A tree is two to four draw calls. - Attributes
POSITION,NORMAL,TEXCOORD_0, the wind weights in_WIND(--wind-as-colorwrites them toCOLOR_0for engines that only read standard attributes) and the limb matrix in_LIMB_DIAGONAL(xx, yy, zz) and_LIMB_ACROSS(xy, xz, yz), see Wind. An engine that ignores the limb matrix still gets plants that move; their limbs only stretch more. - A base-colour and a normal texture per material, embedded as PNGs. Leaves, petals and
blossoms use alpha
MASKwith a 0.5 cutoff and are double sided. - For a part that glows: the glow colour as
emissiveFactor, its strength asKHR_materials_emissive_strength, the glow map asemissiveTexture, and, where the glow changes along the plant, one float per vertex in_GLOW. See Glow. - For a part with a look of its own: iridescence as
KHR_materials_iridescence, a translucency other than a plain leaf's asKHR_materials_diffuse_transmission, and, where a gradient runs along the plant, one float per vertex in_TINTwith its colour in the material'sextras.verdant.tint. Gradients along each leaf and the cells of membrane leaves are in the colour texture. See Colour and surface. - The plant's height, radius, estimated weight (
mass:wood,leaves,flowers,fruits, in kg), wind response and full parameters in the node'sextras.verdant, so a file can be regenerated or re-edited.
Units are metres, Y is up, and the plant stands on the origin.
Tangents are not exported; engines derive them from the UVs (Bevy:
Mesh::generate_tangents).
An export holds four levels of detail by default (--lods <n>, 1 to 6; 1 writes the
full plant only). They are made the way SpeedTree makes its mesh levels: every level is
the same plant with the same trunk and limbs, and a lower one has
- fewer leaves, needles, blades and blossoms, each of them bigger, so the crown covers as much as before,
- fewer twigs (with everything on them), fruits and stalks of grass,
- fewer faces around trunks, branches and fruits and fewer segments along leaves,
- a simplified mesh: triangles are taken out of the wood where that moves its surface by less than half a pixel at the size the level is first shown.
| LOD0 | LOD1 | LOD2 | LOD3 | |
|---|---|---|---|---|
| leaves kept | 100% | 49% | 24% | 12% |
| shown while the plant is taller than (share of the screen height) | 50% | 20% | 8% | 1% |
| oak, triangles | 8470 | 5885 | 4306 | 3376 |
| spruce | 7621 | 4573 | 2591 | 1716 |
| berry bush | 27523 | 14541 | 9176 | 5619 |
| wheat | 5398 | 3762 | 2651 | 1864 |
| meadow grass | 480 | 180 | 60 | 16 |
Nothing comes off the plant at any level, in still air or in wind, and every level has the wind weights, size and weight of the full plant, so levels can be swapped while the plant moves.
In the file, the levels are the nodes and meshes name_LOD0, name_LOD1, ... and share
their materials and textures. Only name_LOD0 is in the scene; it lists the others in
the MSFT_lod
extension, with MSFT_screencoverage in its extras, and extras.verdant.lods gives
each level's node, triangle count and screen_height. For engines that don't read the
extension, --lod-files writes a file per level instead: name.glb, name_lod1.glb, ...
How two programs read a six-level file:
- Babylon.js 9 reads the extension and loads the levels one after another, lowest
first, ending on the full plant (or on a lower level when
MSFT_lod.maxLODsToLoadsays so). It does not switch by distance; the coverage values arrive in the node's metadata for the application to use. - Blender 5.2 ignores the extension. It shows
name_LOD0and puts the other levels in a collection named "Orphan Nodes" that is not part of the scene. The wind and limb attributes and theextrassurvive the import.
cargo run --release -- export --kind tree --preset oak --lods 4 --lod-files
The viewer shows any level (--lod <n>, or "level on show" in the panel).
The simplifier (MeshData::simplify, Lod::simplify) works on trunks, branches and
stems only; leaves and petals are a few triangles under a picture each, and fruits are
small. It knows every point where something is fixed to the plant (the foot of a leaf,
both ends of a branch, the poles of a fruit) and keeps the rings of the branch around
each of them, so nothing comes off. Between those points a thin branch loses whole
rings, and a limb thick enough for it also loses single vertices to meshoptimizer's
simplifier, which is held to the wind weights, normals and texture coordinates of the
full mesh. That takes about a tenth of the triangles out of the last level of a tree
or bush (oak 3774 to 3376, spruce 2052 to 1716) and nothing out of grass and flowers,
where every joint carries something.
Every level, the full plant included, then goes through
meshoptimizer (the
meshopt crate, MeshData::optimize): equal
vertices become one, and triangles and vertices are put in the order that suits the
graphics card's vertex cache, overdraw and vertex fetch. This changes no triangle, so a
level looks exactly as before. The generator already builds its meshes strip by strip,
so the gain is small: over all presets about 0.3% fewer vertices and 2% fewer vertex
cache misses (0.90 to 0.88 per triangle).
Trees and bushes can draw their small branches as cards at the last two levels (the
last one only, with two levels)
(--cards, the "cards" box in the panel, or Lod::levels_with(n, true)): the idea of
Nanite's clusters, done once at export time. Every branch of a chosen order is a
cluster. The level draws a few flat cards in its place (a billboard cloud, up to six
per cluster), each showing a picture of the part of the subtree (twigs, leaves,
flowers, fruits) that lies close to it, drawn into a texture atlas. The second-to-last level cards the branches one order above
the twigs, the last level the order above that, so clusters get coarser with
distance, as Nanite's do. Trunk and limbs stay meshes.
| triangles, LOD2 / LOD3 | without cards | with cards |
|---|---|---|
| oak | 4233 / 3279 | 2702 / 524 |
| birch | 5642 / 4637 | 3334 / 616 |
| willow | 5456 / 4148 | 2894 / 524 |
| berry bush | 9404 / 5933 | 3491 / 2380 |
| thorn-moss tree | 5663 / 3508 | 3838 / 1173 |
- Cards are chosen per cluster the way a billboard cloud is (Décoret et al., 2003): planes through the branch's joints, facing one of 43 directions, are tried, and the one that takes the most leaf area (counted by how much of each leaf it shows) is laid first; each leaf goes to one card only, so nothing is drawn twice. A leaf that stands across its card is turned towards it until the card shows at least 60% of it, instead of being pressed into a streak.
- In the viewer a card fades out as it turns edge-on to the eye, where it would be a thin line of leaves; the other cards of its cluster face other ways and show it there. A glTF file has no way to say this, so an engine drawing the cards should fade them by view angle too.
- Each card is fixed at the branch joint it goes through and that point takes the joint's wind weights, so it sways with its branch; each corner takes the wind of the joint nearest to it and flutters a little. Cards let light through as the leaves do. Nothing comes off at any level, as before.
- The atlas is drawn on the processor (
src/plant/cards.rs): the full plant is grown a second time, recording which triangles belong to which cluster, and each cluster is rasterized with a depth test into its tile, with a normal map in the card's own space and its colours bled into the empty pixels around it so mipmaps keep no dark rims. Each tile is drawn at twice its size and averaged down, from the plant's textures at 512 pixels; the atlas is four times the texture size (2048 pixels for the default 512). An export with cards takes about three times as long (0.7 s for the oak). - In the file, the cards are one more part and material per carded level (
cards, alpha-masked and double-sided, with its own atlas), andextras.verdant.lodsgives each level'scardsorder (0 for none). - Cards are off by default, so files written without
--cardsare unchanged.
cargo run --release -- export --kind tree --preset oak --cards
The last level can draw the same clusters as solid voxels instead (--voxels, the
"voxels" box in the panel, or Lod::levels_for(n, cards, true)): opaque cubes on a
grid, with no alpha test, no picture to fade edge-on and no overdraw from layers of
cut-out leaves. It is the coarsest stage of the voxel levels Nanite's foliage goes to
at a distance. With --cards as well, the level before the last keeps its cards.
| triangles, LOD3 | without | cards | voxels |
|---|---|---|---|
| oak | 3279 | 524 | 1440 |
| birch | 4637 | 616 | 800 |
| willow | 4148 | 524 | 2856 |
| berry bush | 5933 | 2380 | 4172 |
| thorn-moss tree | 3508 | 1173 | 1393 |
- The clusters' twigs, leaves, flowers and fruits are sampled into a grid of 28 cells up the plant, each cell keeping the area of leaves in it and their colour as drawn (the leaf picture where it isn't cut out, and the gradient). The densest cells are filled first, until the cubes hide about 60% of what the leaves did, so the crown keeps its gaps.
- Every group of touching cubes hangs on the plant: on a cube that a branch still drawn at that level runs well inside, or through a chain of cells its bark runs through (those take the colour of the leaves around them). A group nothing leads to is left out. Each cube sways with the drawn bark around it, every corner as a blend of the nearest bark, so nothing comes off in the wind.
- Cubes of branches that sway in step share their corners and bend as one piece. Branches that swing apart, such as the stems of a bush, are each a shell of their own that may pass through the next, as their leaves do; shared cubes were drawn out to more than twice their size.
- Only the faces between a filled cell and an empty one (or one of another shell) are drawn, and corners are shared, so a cube costs well under twelve triangles. Their normals lean away from the middle of the crown, so it is shaded as one round mass and not as flat blocks.
- The voxels are given at most three quarters of the triangles the clusters take at that level. Where 28 cells up take more, a coarser grid is tried (down to 8); a plant where even that saves nothing, or without leaves, keeps the plain level.
- In the file the voxels are one more part (
voxels), opaque and single-sided, with a small texture of colour squares;extras.verdant.lodsgives each level'svoxels(true or false). - The viewer draws the voxels without shadows falling on them; they still cast theirs.
A cube's far side lies in the shadow of its near side, so with shadows the crown
loses the light that shines through leaves and comes out a third darker on the side
away from the sun. Without them a crown is within a few per cent of the full plant
for the oak, thorn-moss tree and berry bush (mean brightness against the sky, from
both sides), and 14% and 26% brighter for the birch and the willow, whose open
crowns show dark wood and shade between their leaves where the cubes are solid. A
glTF file cannot say this, so an engine should leave the
voxelspart out of receiving shadows itself.
cargo run --release -- export --kind tree --preset oak --voxels
A plant's parameters (kind, seed, detail and every slider) can be kept as a JSON file and loaded again:
cargo run --release -- export --kind tree --preset oak --seed 7 --save-params
cargo run --release -- export --params exports/tree_oak_7.json
cargo run --release -- --params exports/tree_oak_7.json
--save-params writes name.json next to name.glb; --params <file> builds that plant
instead of a preset, in the viewer as well. The viewer's Export section has "Save
parameters" and "Load parameters" for the file named there. Files are plain JSON, made
to be edited by hand: a parameter that is left out keeps its default value.
{ "seed": 7, "detail": 1.0, "params": { "Fern": { "fronds": 14, "frond_length": 0.9 } } }
A name the plant does not have is an error that says where it is and what was likely
meant (unknown parameter 'params.Fern.frond' (did you mean 'fronds'?)), so a misspelt
file does not quietly grow the default plant.
describe prints what a file can hold, as JSON, for a preset (--kind, --preset) or
a file (--params): spec, the complete parameter file of that plant, and fields,
one entry for every value in it:
{
"path": "params.Tree.branch_start",
"type": "f32",
"value": 0.3,
"doc": "Fraction of the trunk that stays bare.",
"label": "bare trunk",
"min": 0.02,
"max": 0.8
}
doc is the note above the field in the source; label, min and max are those of
its slider in the viewer, in the unit of the file; an enum has options, the names it
can take. Values beyond a slider's ends are not refused, but nobody has looked at the
plants they give. This is the way in for a script or an AI agent that writes plants:
describe, change values of spec, then export --params file.json --json, which
prints the files written, the height, the weight and the triangles of every level, and
--params file.json --screenshot file.png to look at the result. list --json gives
the kinds and presets.
In code:
use verdant::plant::{Lod, PlantSpec, generate};
let spec = PlantSpec::load("exports/tree_oak_7.json".as_ref())?;
let plant = generate(&spec);
let far = plant.at_lod(&Lod::levels(4)[3]);
spec.save("exports/copy.json".as_ref())?;
The generator weighs what it builds. Trunks, branches, fruits and cones are weighed by volume, leaves and petals by area:
| Part | Weight |
|---|---|
| wood with its bark | volume × the wood's density |
| leaves, fern fronds, blades | 0.12 kg per m² of leaf card |
| needle sprays of conifers | 0.5 kg per m² of card |
| palm fronds | 0.6 kg per m² of card |
| petals and blossoms | 0.06 kg per m² |
| fruits and berries | 950 kg/m³ |
| cones | 450 kg/m³ |
Plant::mass holds the totals; verdant export prints them.
Trees and bushes also use the weights while they grow. The plant is grown several times
from the same random numbers. Two passes find where its leaves are and how much light
each twig gets (see Competition for light); the next finds how
it forks, which sets how thick every branch is (see Branch thickness);
the next weighs every branch together with the branches, leaves, blossoms and fruits it
carries, and measures how far the wind moves it (see Wind); and the last shapes
the branches for that load, using the properties of the wood (Wood in the parameters):
| Property | Effect |
|---|---|
| density (kg/m³) | weight of the wood, and so the load on every branch below it |
| flexibility | how far a branch sags under its load. The stiffness is 9 GPa ÷ flexibility; each stretch of a branch curves down by M / (E·I), with I = π r⁴ / 4. Trees and bushes bend in wind by the same stiffness; the other kinds move further by √flexibility. |
| strength (MPa) | how thick a branch must be at least. The bending stress at its foot, 4M / (π r³), stays below a quarter of the strength; a branch that its share of the cross-section leaves too thin grows thicker, up to nine tenths of the limb it grows from. |
| reaction (MPa) | how hard a branch holds itself up against its load (see Posture control). |
Conifers and palms follow the same rules with a simpler load. A conifer branch carries its sprigs of needles, its cones and its own wood; it is as thick as its share of the trunk's cross-section, or thicker if that load needs it, and sags under it. Needle sprays weigh 0.5 kg and palm fronds 0.6 kg per m² of card. Palms are described below.
With ordinary values thick limbs hardly move and twigs with fruit hang a little; a flexibility of 5 to 10 gives hanging crowns, and a low strength gives stout branches.
A living branch does not simply hang from its foot like a beam. As it thickens it lays
down reaction wood, which pulls (in broadleaved trees) or pushes (in conifers) and
cancels part of the bending its weight causes. Wood::reaction is the stress that wood
can hold, in MPa. A branch of radius r takes a moment of π r³ σ / 4 off its load before
it sags, so thick limbs stay where they grew and only thin, heavily loaded twigs hang.
The default is 2 MPa; the willow has 0, which is why it weeps. Files written before this
property existed load with 0 and keep their shape.
| Reaction 0 | Reaction 30 MPa |
|---|---|
![]() |
![]() |
Both are the apple tree with a flexibility of 4.
A palm is not built like a tree. It has one growing point, makes one leaf at a time, and its trunk never thickens: it is as wide near the top as near the ground, and gets stiffer with age from the ground up (Rich). The generator follows that:
- Fronds by age. The crown holds every age at once. The youngest frond is a spear, folded shut and standing straight up; it opens while the next two appear. Older fronds are pushed outwards and down by the younger ones. The oldest tenth are yellowing. A coconut palm, for scale, makes 12 to 14 leaves a year, holds 25 or so, and drops each after two to two and a half years.
- Dead fronds. A coconut palm sheds them cleanly, which leaves the ring scars on its
trunk. Other palms keep them hanging as a skirt for years:
dead_frondssets how many stay (0 by default, 7 on the date palm). - Frond sag. A frond hangs from a midrib sized for its weight and curves down under
it, on top of the droop set in the parameters. Palms make no reaction wood, so
reactionis 0 for them. - Trunk.
trunk_curveis how the palm grew. Its own weight and the crown's then bend a leaning trunk further over, stretch by stretch, by M / (E·I); the top of the trunk is taken to be 0.4 times as stiff as its base. For the coconut preset that adds about 7 cm at the top; a straight trunk does not bend at all. - Wind. As for trees: the crown's drag at the top and the trunk's along its length bend the trunk as a beam, which gives the lean (4 cm for the coconut preset at wind strength 1), and each frond bends on its midrib under the wind on its own area, up to a quarter of its length.
Trees and bushes are grown twice before anything else is decided, to find out where the light is. The crown is cut into cells, each holding the leaf area inside it. Light comes from the whole sky, so what shades a place is the foliage in a cone above it, and what is left after passing a leaf area index L is exp(−0.5 L) (Monsi and Saeki's form of the Beer–Lambert law). A crown never counts as denser than a leaf area index of 5, the density of a closed broadleaved stand.
Three things follow from the light each twig gets, all scaled by the light parameter
(0 switches them off, 0.7 is the default):
- Vigour. A twig in full light grows up to 1.2 times its length, one in deep shade down to 0.6 (after Borchert and Honda, and the self-organising trees of Palubicki et al.).
- Shedding. A twig that gets less than
shedof the open sky's light is dropped with everything it carries, the darkest first and never more than 40% of the twigs. The light is then worked out again without them. A branch falls with its twigs only when all of them fell; one that never had a twig stays. - Turning. Branches bend towards the brighter side as they grow.
| Light 0 | Light 0.7 (default) |
|---|---|
![]() |
![]() |
The plant only competes with itself: it does not know about its neighbours. Conifers and palms don't use this: a conifer's shape comes from its parameters, and a palm sheds its leaves by age, not by shade.
Only the trunk's radius at the ground is a parameter. Every other radius follows from three rules taken from measurements of real trees:
- Leonardo's rule. Where a branch forks, the cross-sections of what leaves the fork add up to the cross-section that enters it (r₀² = Σ rᵢ²). A trunk therefore thins in steps, by what each limb takes away, and two equal limbs are each 71% as thick as the stem below them.
- The pipe model. A fork hands out the cross-section in proportion to the foliage each side feeds, measured as the length of leafy twig. A limb that carries a third of the crown gets a third of the cross-section.
- Even strength (Metzger). Below its first fork a trunk or branch is bent by everything it carries. The bending stress stays the same along it if r³ grows in step with the distance to where that load pulls, so the bare bole of a pine is nearly a cylinder, and a short bole under a deep crown widens quickly towards the ground.
Twigs lose their cross-section evenly along the part that carries leaves, and conifers follow the same rules with one fork per ring of branches. The strength of the wood is a lower limit on top: a twig heavy with fruit is thicker than its share.
Wood::buckling_height(radius) gives the height at which a column of that wood buckles
under its own weight (Greenhill: (7.8373 E I / (ρ g A))^⅓). Every tree, bush, conifer
and palm preset stands at least three times below it, as real trees do; a test keeps it
that way.
Trees and bushes have an arrangement parameter (phyllotaxis) for how branches leave a
limb and leaves leave a twig:
| Arrangement | Examples | |
|---|---|---|
Spiral |
one at a time, each turned by the golden angle (137.5°) | oak, birch, apple, cherry, willow |
Opposite |
pairs facing each other, each pair turned by 90° | maple, ash |
TwoRanked |
alternating left and right in one level plane, which makes flat sprays | elm, beech |
The maple preset uses Opposite; the others are spirals. Parameter files written before
this parameter existed load as Spiral.
Bark is added on top of the wood. Its thickness runs from bark_base at the ground to
bark_top at the top of the plant; bark_falloff shapes the gradient (1 thins evenly,
more keeps the thick bark near the ground). Thick bark widens the trunk and furrows its
surface; on a thin twig it is never more than 40% of the wood's radius. The loads are
worked out for the wood alone, so bark adds weight but no strength.
| Flexibility 0.3 | Flexibility 10 | No bark | 10 cm of bark at the ground |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The command line can override a preset's wood:
cargo run --release -- --kind tree --preset apple --flexibility 8 --bark 6
--reaction, --light and --shed do the same for posture control and the competition
for light.
Every vertex has four weights:
| Component | Name | Meaning |
|---|---|---|
| x | bend | height above the ground as a fraction of the plant's height |
| y | sway | how far the vertex follows the swinging of its branch |
| z | flutter | trembling of leaf and petal edges |
| w | phase | random per limb, and shared by everything that grows from it, so limbs don't move in step and nothing comes off its twig |
Each plant also has a wind response (extras.verdant.wind):
| Field | Meaning |
|---|---|
bend |
how far the top leans at wind strength 1, as a fraction of the plant's height |
sway |
how far the part that swings widest moves, as a fraction of the height; a vertex moves by its sway weight times this |
flutter |
how far leaf edges tremble, in metres |
rate |
how fast the plant swings, 1 being the shader's own pace |
limbs |
true for plants whose branches swing about a lean of the whole plant (trees and bushes) |
For trees, bushes and palms none of this is set by hand. Wind strength 1 is a fresh breeze of about 10 m/s, a pressure of ½ρv² ≈ 60 N/m². While a plant is weighed, every branch also adds up the area it holds into the wind: 0.7 of the side of its wood, 0.5 of its fruits, and 0.1 of its leaf area, since leaves turn out of the wind and shelter one another. That force acts where the area sits, and the branch bends under it as a beam fixed at its foot: each stretch curves by M / (E·I), the same rule as for sagging. A branch carries the swing of the limb it grows from, and no stretch of a branch turns by more than a quarter: one turned that far lies along the wind and is not pushed much further.
So a stout oak hardly leans and only its twigs and leaves move, a birch leans a few
centimetres, a willow's whips swing by half a metre, and the stems of a bush lean
together while their branches swing. The trunk's deflection (for a bush, its stems'
on average) becomes bend; the widest swing becomes sway, and the
sway weights are each vertex's own swing as a share of it. rate comes from the
stem's natural frequency, √(k/m) / 2π with k the force per metre of deflection: at
0.3 Hz or more the plant keeps the shader's pace, a slower stem swings slower, down to
0.3 of it.
For palms the trunk gives the lean and each frond its own swing. Conifers, grass, flowers and ferns still have a response set per kind.
Parts stay joined in the wind because of two rules in the generators: a leaf, flower or fruit shares the phase of the stem it sits on, and it is attached at a joint of that stem, not between two joints.
assets/shaders/wind.wesl turns these into a world-space
offset: the plant leans with the wind, branches swing, leaves tremble, and gusts travel
over the ground so neighbouring plants bow one after another. A stem that leans also
gets lower, so that it turns and does not stretch: it bends in an arc that keeps its
length, to about 57° from upright at most, so that a storm lays grass over without
pressing it into the ground. For plants with limbs only the lean of the whole plant
counts for that, not the swing of a branch.
Branches turn about their feet. Each vertex also carries a limb matrix: the sum of
a·aᵀ·Δw over every stretch of limb between it and the ground, where a is the stretch's
direction and Δw how much the sway weight grows along it. The vertex sways by
w·o − L·o for a swing o, so each stretch passes on only the part of the swing across
it, and a limb pushed along itself does not get longer. What grows from a limb starts
with the limb's matrix where it is fixed, so it moves with it. A small turn made this way
still lengthens a limb by the square of the turn, so on plants with limbs the swing
grows only a little past wind of strength 1, to at most 1.6 times as far. In wind of
strength 2.5, 95% of the edges of a part stay within 7% of their length, 11% for old
palm fronds (before the limb matrix: 10% for bark, 17% for palm fronds). The function is about seventy lines and ports directly to
other shading languages.
Verdant is also a library. WindPlugin registers the material and updates it from the
Wind resource:
use bevy::prelude::*;
use verdant::{
plant::{PlantKind, PlantSpec, generate},
render, texture,
wind::{PlantMaterial, Wind, WindExtension, WindPlugin},
};
fn spawn_tree(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut images: ResMut<Assets<Image>>,
mut materials: ResMut<Assets<PlantMaterial>>,
) {
let plant = generate(&PlantSpec::preset(PlantKind::Tree, 0, 42));
for part in &plant.parts {
let spec = &part.material;
let (color, normal) = render::images(&texture::render(&spec.texture, 512));
// The glow map of a part that glows in a pattern; `None` for the others.
let glow = texture::render_glow(&spec.texture, spec.glow.pattern, 512)
.map(|map| images.add(render::glow_image(&map, 512, spec.texture.tiles())));
let material = materials.add(PlantMaterial {
base: render::standard_material(spec, images.add(color), images.add(normal), glow),
extension: WindExtension::new(plant.wind, plant.height)
.with_pulse(plant.spec.params.glow().pulse),
});
commands.spawn((Mesh3d(meshes.add(render::mesh(&part.mesh))), MeshMaterial3d(material)));
}
}
Add WindPlugin, copy assets/shaders/ into the game's assets, and change
Res<Wind> (direction, strength, gusts) at run time. Shadows move with the plants.
For glowing plants give the camera Hdr and Bloom (the viewer's settings are bloom
in src/main.rs); without them the glow is drawn but has no halo. Res<GlowView> scales
all glow at run time.
The generator modules (plant, meshdata, texture, export) don't touch the GPU, so
they also run in build scripts and asset pipelines.
Any part of any plant can give off light. Glow is set for four groups of parts: wood and
stems, leaves (blades, fronds, needles), flowers, and fruits and seeds. A plant without
glow is built, drawn and exported exactly as before; the test that compares every
preset with a stored hash (presets_are_what_they_were) holds that.
![]() |
![]() |
![]() |
The ember fern in the day, dusk and night scenes.
Each group has:
- A pattern, which says where on the surface the light is: the whole surface, the veins or the edges of a leaf or petal, spots, the cracks of bark, or a fade towards the tip of each leaf. The pattern is a grey glow map drawn from the same texture as the colours, so veins of light lie on the veins that are painted.
- A colour and a strength. Strength 1 is about as bright as a white surface in daylight; brighter than that, the bloom of the viewer gives it a halo.
- Where it is strongest: evenly, towards the base of the plant, towards its top, or towards the tips of whatever swings (twigs, blade tips), and over what share of the plant it fades. Bark textures repeat along a trunk, so "the roots glow" cannot come from the texture: it is one value per vertex.
- The pulse (one per plant): breaths per second, how far the light dims, bands travelling up the plant, and how far limbs are out of step. Limbs take their step from the wind phase their vertices already carry, so a twig pulses as one.
Five presets use it: Moon willow, Neon orchid, Lantern-berry bush, Ember fern and Glow grass. Glow is the first step of FANTASY_PLAN.md, the plan for sci-fi and fantasy plants; new shapes come later in it.
The viewer renders in HDR with bloom and has four scenes, because glow cannot be judged in daylight and shape cannot be judged at night:
cargo run --release -- --kind tree --preset moon --scene night
cargo run --release -- --kind flower --preset neon --scene blacklight --glow 1.5
--scene is day, dusk, night or blacklight; --glow scales the glow shown (the
"glow shown ×" slider) without changing the plant.
In an exported file the glow is standard glTF emission, so Blender or any glTF viewer
shows it as a steady light with its pattern. Two things need a shader of the engine's
own, as the wind does: the fade along the plant (multiply the emission by _GLOW where
a primitive has it) and the pulse (its numbers are in extras.verdant.glow.pulse;
assets/shaders/wind.wesl has the formula as glow_now).
The same four groups of parts (wood and stems, leaves, flowers, fruits and seeds) each have a look. A plant with no look set is built, drawn and exported exactly as before, and the stored hashes hold that here too.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The Glassleaf tree by day and at night; the Scarab bush, Aurora grass and the trunk of the Crystal spruce.
- Gradient. A second colour, how much of it, and where the part turns to it: along each leaf, blade, petal or fruit from its base to its tip, up the plant, down to the ground, or towards the tips that swing. A gradient along each part is painted into its texture. One along the plant is a value per vertex, as the fade of the glow is, because bark textures repeat along a trunk: the Sunset palm's trunk turns orange towards its crown that way.
- Iridescence. A sheen that changes colour with the angle it is seen from, as a
beetle's wing or oil on water does.
filmis the thickness of the film in nanometres and sets which colours show: about 260 is teal with gold (Scarab bush), 320 violet (Aurora grass), 400 pink and blue on a pale petal (Opal lily). - Light through. How much light a leaf or petal lets through from behind. 0.3 is an ordinary leaf, which is what every plant had before; the Glassleaf tree has 0.85.
- Cells between veins. A leaf texture of cells walled off by fine veins, each cell a little lighter or darker than the next. With glowing veins the walls glow white and every cell is lit in its own colour, so at night the leaf is stained glass.
- Leaf shape. Twist about the midrib, a tip rolled up or under, and waves along the
edges, for leaves, petals, fronds, blades and needles. A shaped leaf is built from
more strips (
columnssets how many across), so a leaf a metre wide stays round. Where a leaf stands on the plant does not change, so nothing comes off. - Skins. Five bark types that are not bark: smooth, scales, stripes, crystal facets and spiral ridges. Each has its own relief and its own cracks for the glow.
The five skins: for each, colour, normal map and the cracks that light up.
Seven presets use these: Glassleaf tree, Flame fern, Opal lily, Scarab bush, Aurora grass, Crystal spruce and Sunset palm.
cargo run --release -- --kind tree --preset glassleaf --scene night
cargo run --release -- --kind bush --preset scarab
In an exported file, gradients along each leaf and the cells are in the textures, so
every viewer shows them. Iridescence is the standard glTF extension, which tints
reflections only: the viewer here also shifts the colour of the surface, so a plant is
more colourful in Verdant than in a plain glTF viewer. Blender 5.2 reads the
iridescence and the _TINT attribute and ignores diffuse transmission. The gradient
along the plant needs a shader of the engine's own: mix the base colour towards
extras.verdant.tint.color by amount × _TINT.
This is the second step of FANTASY_PLAN.md.
Trees and bushes can carry shapes that are not branches, leaves or fruits, and their wood can be drawn as something other than one tube. All of it is off by default, and a plant without any is built, drawn and exported exactly as before; the stored hashes hold that here as well.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
The Lantern tree at dusk, the Finger tree at night and the Thorn-moss tree by day; under each, its trunk from close by.
- At the twig ends. A share of the twigs end in one of eight shapes. Six are turned shapes, an outline spun about an axis: orb, bulb, pod, cap, bell and club. Each can have ribs with creases between them, a bent axis, and a stalk to hang from; without a stalk it sits on the end of its twig and points the way the twig does. The other two are a curl (the twig runs on as a tendril that rolls up) and a blossom, which is the flower kind's head of petals on a tree.
- Beards. Strings that hang from the underside of the branches, never lower than the ground, with beads along them, tufts of moss at their joints, or both. A string swings further than the branch it hangs from, the more the longer it is.
- Fringe. Bristles standing out of the wood: on the stems alone, or out to a branch order you choose.
- Thorns. Cones along the wood, out to a branch order you choose. Thin wood carries shorter thorns.
- Flesh. The wood is drawn thicker than it is: a swollen foot, a belly at a chosen height, twigs with club ends. The wood inside carries the plant as before; the flesh around it has a density of its own (lighter than wood by default) and weighs on it.
- Strands. A stem is drawn as a core with strands winding around it. They close into the stem towards its top and run out over the ground as roots at its foot.
Orb, bulb, pod, cap, bell and blossom at the twig ends of the Finger tree, which has clubs.
Every organ adds its weight to the branch it sits on and its area to what the wind gets hold of there, so a tree hung with pods has thicker limbs that sag further, as one laden with fruit does. An organ moves with the place it is fixed to, and what is left out at a lower level of detail is whole organs: pods, thorns and strings go one by one, bristles and moss get fewer and wider as grass does.
Organs glow and take a look with the group they belong to: stalks, curls, thorns and
strings with the wood; bristles and moss with the leaves; pods and beads with the
fruits; the petals of a blossom with the flowers. In an exported file they are parts
with materials of their own (pods, beads, beards, thorns, hairs, moss; a
blossom's are petals and centres), with the same wind attributes as everything else.
Three presets use them: the Lantern tree (a trunk of strands lit from its roots, strings of lit beads, ribbed lanterns), the Finger tree (a bristly swollen trunk whose bare limbs end in glowing clubs) and the Thorn-moss tree (a bottle trunk with thorns, hanging moss and twigs that end in curls).
cargo run --release -- --kind tree --preset lantern --scene dusk
cargo run --release -- --kind tree --preset finger --scene night
The viewer has two sections for them on trees and bushes: "Organs" (twig ends, beard, fringe, thorns) and "Trunk shape" (flesh and strands).
This is the third step of FANTASY_PLAN.md.
The recipe kind has no shape of its own. Its plant is a short list of axis rules:
- An axis rule says how one stem grows: length, how much lengths vary, radius at the foot and the tip, joints, how it turns towards the sky, curves, spirals and wanders, its bark and colour, and the flesh, strands, thorns, fringe and beard the organs of trees have.
- Each axis rule has attachment rules for what grows on it: a further axis (by the number of its rule), a leaf or an organ (orb, bulb, pod, cap, bell, club, curl, blossom); where (spread along it, at its tip, at its foot, or in rings); how many; at what angle; how large; and the chance that each one grows.
The first rule is that of the stems, stems of which rise from a patch of ground. A
rule may name itself, so a recipe can describe a fractal. The axes are grown like the
branches of a tree: joint by joint, sagging under what they carry and swinging in the
wind about what they grow from, with levels of detail that leave parts out and never
move one. What a tree adds on top (light, the pipe model, posture) is not used: a recipe
sets its thicknesses itself.
A recipe is a parameter file like any other:
{ "seed": 1, "params": { "Recipe": {
"stems": 3,
"rules": [
{ "length": 1.2, "grows": [
{ "grows": { "Axis": 0 }, "place": "Along", "count": 4, "scale": 0.7 },
{ "grows": { "Leaf": { "size": 0.1 } }, "place": "Rings", "count": 3 },
{ "grows": { "Organ": { "kind": "Orb", "size": 0.08 } }, "place": "Tip" }
] }
]
} } }
cargo run --release -- view --params recipe.json
cargo run --release -- --kind recipe --preset glowcap --scene night
Anything left out takes its default. In the viewer the Recipe section edits the rules: add and remove axis rules and what grows on them, and "random recipe" makes a new one from the panel's ranges.
Limits keep any recipe buildable: 12 rules, 8 attachments on a rule, 6 orders of axes, 64 stems, 400 axes in all, and one budget of about 80,000 triangles at full detail that axes, leaves, organs and skins draw on in the order they grow. What comes after the budget is spent is left out.
This is the fourth step of FANTASY_PLAN.md.
| Path | Contents |
|---|---|
src/plant/ |
parameters, presets and the generators for each kind; light.rs is the light inside a crown, organs.rs what a woody plant carries besides leaves and fruits, recipe.rs plants from recipes |
src/meshdata.rs |
mesh building blocks: tubes, leaves, cards, ellipsoids, turned shapes; the simplifier and mesh optimizer passes |
src/texture.rs |
procedural bark, skin, leaf, petal, blossom and fruit textures, their gradients and cells, and their glow maps |
src/export.rs |
the .glb writer |
src/wind.rs, assets/shaders/ |
the wind material and its shaders, which also scale and pulse the glow and draw gradients and iridescence |
src/render.rs |
conversion to Bevy meshes, images and materials |
src/main.rs |
the viewer and the command line |
tests/generate.rs |
checks every preset: sound meshes, bounds, determinism, glTF round trip, parameter files, levels of detail, the simplifier and optimizer passes, glow, looks, organs, recipes (the presets and random ones), that no part comes off the plant, in still air or in wind, and that every preset is still the plant stored in tests/presets.snapshot |
The rules above come from these works:
- Leonardo's rule and why trees follow it: C. Eloy, Leonardo's rule, self-similarity and wind-induced stresses in trees (2011).
- The pipe model and area-preserving branching: Sperry et al., review in Tree Physiology (2005).
- Even strength of stems: Metzger (1893), as summarised in the ANU forest mensuration notes on stem form and taper.
- Buckling height: Greenhill (1881), see Self-buckling; T. McMahon, Size and shape in biology (1973).
- Phyllotaxis: classification of patterns, Smith College.
- Procedural trees: Weber and Penn, Creation and rendering of realistic trees (1995); Runions et al., Modeling trees with a space colonization algorithm (2007); Palubicki et al., Self-organizing tree models for image synthesis (2009).
- Light inside a crown: Monsi and Saeki (1953), in English as On the factor light in plant communities (2005). Growth and shedding by light: Borchert and Honda, Control of development in the bifurcating branch system of Tabebuia rosea (1984), and Palubicki et al. above.
- Reaction wood and posture: Alméras and Fournier, Biomechanical design and long-term stability of trees (2009).
- Palms: Rich, Mechanical structure of the stem of arborescent palms (1987); leaf counts of coconut from the Japanese Journal of Tropical Agriculture; dead leaves kept as a skirt from the University of Florida's notes on Washingtonia robusta.
- Wind on trees: Mayhead, Some drag coefficients for British forest trees derived from wind tunnel studies (1973); Vogel, Drag and reconfiguration of broad leaves in high winds (1989); Moore and Maguire, Natural sway frequencies and damping ratios of trees (2004).
- Weights are estimates from the generated shapes and typical densities, not measurements, and sagging is worked out once, in still air. Bark is drawn on the trunks of conifers and palms only.
- A palm frond here is lighter than a real one of its length (it is one card, weighed by area), so its notional midrib is thin: in wind every frond reaches the limit of a quarter of its length, and the trunk's bend under the crown is on the low side. Fronds do not fold downwind in a storm, leaflets do not move on their own, and the leaf bases a date palm keeps on its trunk are not drawn.
- Where branches start is still drawn from parameters (how many, at what angle). Light then decides how long each grows, which are shed and where they turn, but only the plant's own shade counts: it knows nothing of its neighbours, and no branch avoids another. Conifers and palms don't compete for light at all.
- A tree has three or four orders of branches where a real one has six or more, so a twig here stands for a small branch with its side shoots, and is as thick as one.
- Cards and voxels (
--cards,--voxels) don't glow, shimmer or pulse: a glowing plant's far levels drawn with them are dark at night, so keep its plain levels to a greater distance there. A glTF file can't ask for the cards' edge-on fade either. - Sagging is the bending of a finished branch under its whole weight, less what its reaction wood holds. A real branch corrects its posture year by year as it grows; here that is one stress for the whole plant.
- Sway from size covers trees, bushes and palms; the other kinds keep a response set
per kind. The drag shares (0.1 of leaf area, 0.7 of wood) are single numbers for what in
nature changes with wind speed and species, a branch swings about its rest shape
without a steady push downwind, and the whole plant swings at one rate: every preset
is stout enough to keep the shader's pace, so
rateonly slows very thin, tall stems. - Branches turn about their feet by a shift across each stretch of limb, not by a true rotation, so a limb that swings far still gets a little longer: in wind of strength 2.5, most edges by under 7%, old palm fronds by up to 11%, the most by 15%.
- The wind is a vertex shader effect; plants don't collide with anything or react to characters walking through them.
- The shaders read the wind's clock from Bevy's
globals.time, so materials only change when a wind setting does. That clock wraps after an hour, and the wind jumps then. - The levels of detail are meshes, with optional branch cards on the last two (trees and bushes only); the billboard (impostor) of the whole plant that SpeedTree puts behind its last mesh level is not generated. Cards show no glow, iridescence or pulse: the atlas holds the plant's colours with their gradient, lit by nothing. Limbs keep every joint that a twig, leaf or fruit is fixed to, at every level, so wood-heavy plants thin out less than leafy ones: the simplifier removes only the joints nothing is fixed to.
- Glow is light the plant shows, not light it casts: a glowing plant does not light the ground or its neighbours. A part glows in one colour, and the pattern is one of six. The fade along the plant and the pulse are in the viewer's shader and in the exported data, but a plain glTF viewer shows the steady glow only.
- A part has one gradient, to one colour. Iridescence in the viewer is a thin-film formula laid over the surface colour, not a measured material, and is stronger than what the glTF extension gives in other viewers. Shaped leaves cost triangles: a shaped leaf has more than twice the vertices of a plain one. The woody blossom cards are not shaped. At a lower level of detail a tree's leaf grows to a quarter of the tree's height at most, so a crown of very large leaves thins out more than one of small leaves.
- Organs are for trees and bushes; conifers, palms, ferns, flowers and grass carry none. A plant has one kind of organ at its twig ends, one beard, one fringe and one kind of thorn. Pods have a colour that fades to a second one along them and no texture pattern of their own. The strands of a trunk are tubes that overlap the core and one another, so from afar a strand trunk reads as a deeply ridged trunk with roots more than as separate stems. A string hangs straight down and swings; it does not drape over what is under it.
- A recipe's axes are not shaded by one another and do not avoid one another, and their thickness is what the rule says, not what they carry. A recipe that asks for more than the budget is cut off where the budget runs out, which can leave one side of a plant fuller than the other.
- Textures are stylised and generated per plant, not shared in an atlas.
- The viewer loads parameter files, not
.glbfiles; the parameters in a.glb(extras.verdant.spec) are the same data.
Verdant is licensed under either of
- the Apache License, Version 2.0 (LICENSE-APACHE), or
- the MIT licence (LICENSE-MIT),
at your option. Unless you state otherwise, any contribution you submit for inclusion in Verdant is dual licensed as above, without additional terms.














































