
Threejs Procedural Fields
Build coherent procedural scalar and vector fields for Three.js materials and geometry.
Install
npx skills add scottstts/Threejs-Awesome-Graphics-Agent-Skills --skill threejs-procedural-fields -g -a claude-code -y- Repository
- scottstts/Threejs-Awesome-Graphics-Agent-Skills956
- Category
- Engineering
- Updated
- 13d ago
- License
- MIT
- Context cost
- Lightabout 582 tokens
- Runs scripts
- No, instructions only
What it does
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:
coordinates
→ macro form
→ meso structure
→ derived causes
→ material channels
Example:
sphereDirection
→ warpedDirection
→ elevation + ridges + craterDepth
→ slope + cavity + latitude + moisture
→ biome + color + roughness + bump
Required workflow
- Choose coordinates that remain stable under camera and object motion.
- Lock real or perceptual scale for each frequency band.
- Create named primary fields. Never hide the whole look in one expression.
- Derive secondary fields from causes: slope from normals, shore from sea-level distance, wear from exposure, dirt from cavity.
- Reuse the same fields across color, roughness, normal, displacement, emission, and scattering.
- Add debug output for every named field.
- Filter high-frequency fields by derivatives, tessellation density, or camera distance.
Read 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 for a shared CPU/GLSL field bundle whose height, continents, climate, biomes, roughness, and normals remain independently inspectable.
