mcpField
T
threejs-procedural-fields

threejs-procedural-fields

github.com/scottsttsCreative & media94893 installsUpdated 1w ago
Repository

About threejs-procedural-fields

A skill for procedural field design in Three.js, guiding developers to define the fields an object needs before building materials. It covers coordinates, scale, derived fields, debugging, and detail filtering, and clarifies its scope relative to material assembly and complete planets.

Key features

  1. 01Defining fields from coordinates to materials
  2. 02Reusing fields across material channels
  3. 03Adding debug views for named fields
  4. 04Filtering detail by derivatives, mesh, or distance
  5. 05Separating field models from material assembly

Use cases

  1. 01Designing fields shared by terrain and material causes
  2. 02Debugging individual fields on procedural objects
  3. 03Filtering high-frequency detail beyond mesh resolution

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/scottstts/threejs-awesome-graphics-agent-skills --skill threejs-procedural-fields

After installing, type/threejs-procedural-fieldsin Claude Code to confirm it loaded.

Bundled filesreferences/field-stack-recipes.mdagents/openai.yaml

Details

From the project README

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

  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 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.

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.

Comments

Markdown supported