LumosLab-Innovation/3D-lab-skills / plugins/threejs-lab/skills/threejs-procedural-fields
threejs-procedural-fields
VerifiedBuild coherent procedural scalar and vector fields for Three.js materials and geometry. Use for terrain, planets, wear, biomes, clouds, water masks, displacement, roughness, normals, domain warping, and any visual where several channels must derive from shared causes.
| File | Kind | Size |
|---|---|---|
| LICENSE | other | 1.0 KB |
| SKILL.md | skill md | 2.9 KB |
| agents/openai.yaml | config | 241 B |
| references/field-stack-recipes.md | markdown | 6.4 KB |
SKILL.md
View on GitHub---
name: threejs-procedural-fields
description: Build coherent procedural scalar and vector fields for Three.js materials and geometry. Use for terrain, planets, wear, biomes, clouds, water masks, displacement, roughness, normals, domain warping, and any visual where several channels must derive from shared causes.
---
# Procedural Fields
Do not start by stacking noise. Start by defining the fields the object physically or stylistically needs.
## Field contract
Before shader code, write a field bundle:
```text
coordinates
→ macro form
→ meso structure
→ derived causes
→ material channels
```
Example:
```text
sphereDirection
→ warpedDirection
→ elevation + ridges + craterDepth
→ slope + cavity + latitude + moisture
→ biome + color + roughness + bump
```
## Required workflow
1. Choose coordinates that remain stable under camera and object motion.
2. Lock real or perceptual scale for each frequency band.
3. Create named primary fields. Never hide the whole look in one expression.
4. Derive secondary fields from causes: slope from normals, shore from sea-level distance, wear from exposure, dirt from cavity.
5. Reuse the same fields across color, roughness, normal, displacement, emission, and scattering.
6. Add debug output for every named field.
7. Filter high-frequency fields by derivatives, tessellation density, or camera distance.
Read [references/field-stack-recipes.md](references/field-stack-recipes.md)
before implementation. It records sphere, terrain, water, and
structured-placement field contracts plus common parity defects.
Read the
[procedural planet surface](https://github.com/scottstts/Threejs-Awesome-Graphics-Agent-Skills/blob/31bf12e7b76b76a2650735e02d554a04fb2d2f8b/skills/threejs-procedural-planets/examples/procedural-planet-surface/planet-system.js)
for a shared CPU/GLSL field bundle whose height, continents, climate, biomes,
roughness, and normals remain independently inspectable.
## Non-negotiable rules
- Independent noise per channel produces visual soup. Share structure.
- Domain warp the coordinates, not every result.
- Warp spherical coordinates tangentially, then renormalize.
- Use different frequency bands for silhouette, regions, surface breakup, and micro-normal.
- Do not displace geometry with frequencies the mesh cannot represent.
- Keep categorical masks broad enough to avoid isolated “bubble” regions.
- Parameter names must describe perception: `ridgeWidth`, `coastBlend`, `cavityDarkening`, not `noise3Amount`.
## Routing boundary
Use this skill when the shared field model is the task. Use
`$threejs-procedural-materials` when the task is channel assembly and material
response, and `$threejs-procedural-planets` when the deliverable is a complete
planetary body.
Source: Scott Sun, MIT. Adapted by LumosLab: example assets remain linked to pinned upstream source; skill instructions and references are bundled. See [LICENSE](LICENSE).
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |