Procedural Vegetation
Represent a plant as a growth hierarchy plus rendering adaptations. Do not model it as randomly scattered cylinders.
Build sequence
- Define a per-level species table: length, radius, taper, child count, emergence range, angle, twist, gnarliness, sections, radial segments.
- Grow branches iteratively from a queue so recursion depth and budgets remain inspectable.
- Emit each branch as oriented rings with an intentional UV seam.
- Update section orientation from:
- inherited direction;
- stochastic curvature;
- tropism or external force;
- optional attraction constraints.
- Spawn children with stratified longitudinal slots and independently permuted angular slots.
- Generate leaves only after branch topology is stable.
- Build foliage normals from both card orientation and local crown volume.
- Choose wind scope explicitly. Leaf-root deformation, branch hierarchy deformation, and whole-tree sway are separate systems.
Read references/structured-ash-growth-system.md and preserve its preset, continuation, child-placement, leaf, material, wind, and composition contracts before tuning.
Read the Ash Growth System implementation
with its authored preset for a
contract-accurate implementation and its diagnostic attributes.
Read the
stylized meadow grass implementation
for authored blade-cluster geometry with a procedural fallback, image-driven
path masking, per-instance origin/facing attributes, circular-arc rooted wind,
gust fronts, tip flutter, color clumps, macro variation, translucency, and rim
diagnostics.
Visual failure conditions
- branches form visible helices;
- every child emerges at the same relative height;
- bark texture scale changes with branch radius;
- leaves reveal flat card normals under rotation;
- leaf wind moves card roots instead of remaining anchored;
- branch wind is claimed to match a reference whose branches are static;
- different seeds change species identity rather than controlled variation;
- geometry cost grows without a per-level budget.
Routing boundary
Use $threejs-procedural-geometry for generic branch-ring emission without a
growth model. This skill owns species tables, topology, child placement,
foliage, grass fields, roots, and hierarchical/rooted wind.
1---2name: threejs-procedural-vegetation3description: Generate authored procedural trees, grass, and vegetation in Three.js. Use for stylized meadow grass, trunks, recursive branches, roots, canopies, leaf cards, species presets, growth forces, trellises, deterministic variation, rooted blade/leaf wind, and wind deformation.4---56# Procedural Vegetation78Represent a plant as a growth hierarchy plus rendering adaptations. Do not model it as randomly scattered cylinders.910## Build sequence11121. Define a per-level species table: length, radius, taper, child count, emergence range, angle, twist, gnarliness, sections, radial segments.132. Grow branches iteratively from a queue so recursion depth and budgets remain inspectable.143. Emit each branch as oriented rings with an intentional UV seam.154. Update section orientation from:16 - inherited direction;17 - stochastic curvature;18 - tropism or external force;19 - optional attraction constraints.205. Spawn children with stratified longitudinal slots and independently permuted angular slots.216. Generate leaves only after branch topology is stable.227. Build foliage normals from both card orientation and local crown volume.238. Choose wind scope explicitly. Leaf-root deformation, branch hierarchy deformation, and whole-tree sway are separate systems.2425Read [references/structured-ash-growth-system.md](references/structured-ash-growth-system.md) and preserve its preset, continuation, child-placement, leaf, material, wind, and composition contracts before tuning.2627Read the [Ash Growth System implementation](examples/structured-ash-growth/tree-system.js)28with its [authored preset](examples/structured-ash-growth/ash-preset.js) for a29contract-accurate implementation and its diagnostic attributes.3031Read the32[stylized meadow grass implementation](examples/stylized-meadow-grass/grass-system.js)33for authored blade-cluster geometry with a procedural fallback, image-driven34path masking, per-instance origin/facing attributes, circular-arc rooted wind,35gust fronts, tip flutter, color clumps, macro variation, translucency, and rim36diagnostics.3738## Visual failure conditions3940- branches form visible helices;41- every child emerges at the same relative height;42- bark texture scale changes with branch radius;43- leaves reveal flat card normals under rotation;44- leaf wind moves card roots instead of remaining anchored;45- branch wind is claimed to match a reference whose branches are static;46- different seeds change species identity rather than controlled variation;47- geometry cost grows without a per-level budget.4849## Routing boundary5051Use `$threejs-procedural-geometry` for generic branch-ring emission without a52growth model. This skill owns species tables, topology, child placement,53foliage, grass fields, roots, and hierarchical/rooted wind.