Index of every page on this site: llms.txt
All skills
scottstts avatar

/threejs-procedural-vegetation

@53eb5a2
Run it yourself

Generate authored procedural trees, grass, ivy, flowers, and vegetation in Three.js or raw WebGPU. Use for surface-following vines, painted ivy paths, stylized or GPU grass, GPU-culled virtual flower fields, trunks, recursive branches, roots, canopies, leaf cards, species presets, deterministic growth, distance-tiered plant geometry, and rooted blade, stem, or petiole-hinge wind.

Use this Skill: https://skilld.dev/gh/scottstts/threejs-awesome-graphics-agent-skills/threejs-procedural-vegetation

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈103 tokens for metadata: the name and description. ≈1.2k when used: this file. ≈4.6k more on demand in 5 files.

Description uses 5.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈414 characters, or 5.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Procedural Vegetation

Represent a plant as a growth hierarchy plus rendering adaptations. Do not model it as randomly scattered cylinders.

This skill contains exemplary examples and assets beyond descriptive guidance, they're worth studying, referencing, or even copying. Use them sufficiently when relevant and do NOT blindly skip them.

Build sequence

  1. Define a per-level species table: length, radius, taper, child count, emergence range, angle, twist, gnarliness, sections, radial segments.
  2. Grow branches iteratively from a queue so recursion depth and budgets remain inspectable.
  3. Emit each branch as oriented rings with an intentional UV seam.
  4. Update section orientation from:
    • inherited direction;
    • stochastic curvature;
    • tropism or external force;
    • optional attraction constraints.
  5. Spawn children with stratified longitudinal slots and independently permuted angular slots.
  6. Generate leaves only after branch topology is stable.
  7. Build foliage normals from both card orientation and local crown volume.
  8. 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.

Read the GPU-computed grass implementation for MRT blade-parameter generation, deterministic terrain-conforming placement, Voronoi clumps, Bezier blade folding, wind-facing yaw, distance LOD/culling, normal/color fading, translucency, and field diagnostics.

Read references/gpu-culled-flower-field.md for the exact virtual-address, ecology, hierarchical-compaction, indirect-draw, distance-tier, atlas, wind, contact, resource, and diagnostic contracts.

Read the GPU-culled flower-field entry and its complete raw WebGPU implementation for zero-record integer candidate reconstruction, 32 by 32 tile culling, three visible-ID streams, indirect near/middle/far draws, curved textured petals, identity-preserving horizon heads, and rooted moving-contact response.

Read the procedural surface ivy entry and its complete TypeScript implementation for seeded spline-following stems, repeated mesh reprojection, tangent-plane creep and droop, parallel-transport tube rings, growth reveal, instanced leaves and umbels, and rigid petiole-hinge wind. Treat the TypeScript modules as the only implementation; the entry file only re-exports them.

Visual failure conditions

  • branches form visible helices;
  • dense grass ignores terrain height or clump-level variation;
  • 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;
  • surface-following stems are offset from the host or flip normals across seams;
  • ivy branches ignore the tangent plane while attached;
  • leaf wind rotates around the card center instead of the petiole.
  • a million-flower field allocates CPU transforms or per-candidate records;
  • distant flower LOD replaces species identity with one generic sprite;
  • compaction and direct rendering reconstruct different roots or acceptance;
  • flower heads stay world-up after their stems bend.

Routing boundary

Use $threejs-procedural-geometry for generic branch-ring emission without a growth model. This skill owns species tables, vine and branch topology, surface-following growth, foliage, grass fields, roots, and rooted wind.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides a comprehensive library for procedural vegetation in Three.js and WebGPU, including trees, grass, and flower fields. The implementation uses standard graphics programming techniques and local assets with no security risks detected.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 53eb5a2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 3 months ago

README badge

README badge for scottstts/threejs-awesome-graphics-agent-skills/threejs-procedural-vegetation