Threejs Procedural Materials logo

Threejs Procedural Materials

Community
scottstts
threejs-procedural-materials

Author production procedural materials in Three.js. Use for hybrid texture-backed PBR soil and moss with procedural displacement and masks, upward-facing model moss accumulation, atlas filtering, specular AA, planet-space fields, terrain wetness, deformable granular sand with mass-coupled grain shading, woven cloth with GPU XPBD mechanics and yarn microstructure, simulated fur with interactive grooming and strand shading, lava and emissive surfaces, reflective wave-optical diffraction gratings, air-film-air soap bubbles with Airy interference, raytraced diamond and gem refraction with internal reflection and dispersion, image-space glass transmission with spectral dispersion and volume absorption, deforming softbody jelly materials with XPBD mechanics and refractive caustics, per-instance dissolve, authored PBR identities, derivative normals, and custom direct-light shadow modulation.

Overview

Publisherscottstts
RepositoryThreejs-Awesome-Graphics-Agent-Skills
Skill namethreejs-procedural-materials
Stars
894
Forks
98
Bundled files
58
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 58 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by scottstts on GitHub. Read the source before you install it.

Installation

Install the Threejs Procedural Materials AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/scottstts/Threejs-Awesome-Graphics-Agent-Skills/tree/main/skills/threejs-procedural-materials
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/scottstts/Threejs-Awesome-Graphics-Agent-Skills.git /tmp/Threejs-Awesome-Graphics-Agent-Skills
mkdir -p .claude/skills
cp -r /tmp/Threejs-Awesome-Graphics-Agent-Skills/skills/threejs-procedural-materials .claude/skills/threejs-procedural-materials
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Threejs Procedural Materials in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Threejs Procedural Materials on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Threejs Procedural Materials is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Procedural Materials

Build a material from surface identity and causes. Color, roughness, metalness, normal, transmission, and emission should describe the same surface—not unrelated noise textures.

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.

Material graph order

text
stable coordinates
  → structural fields
  → material identity weights
  → causal modifiers
  → filtered microstructure
  → PBR channels
  → lighting/shadow extensions

Read references/procedural-pbr-system.md for atlas filtering, specular AA, planetary coordinates, world-height wetness, per-instance dissolve, and authored PBR response bundles.

Read the sculpted gallery frame geometry for walnut, antique-gold, and ebony texture/roughness/metalness/clearcoat bundles under a grazing-light setup.

Read the procedural planet surface for shared geological, climate, water, biome, roughness, and derivative-normal causes on a procedural planetary surface.

Read the lava flow surface material for raymarched procedural height fields whose normals, rock/lava identity, emission, glow, embers, fog, and grain are coupled to one material cause stack.

Read the raytraced diamond material for a gem whose mesh is its own optical volume: camera-ray entry refraction, a GPU BVH first-hit loop with bounded total-internal-reflection bounces, per-channel IOR dispersion, mip-correct environment exit sampling, and live camera-matrix uniforms.

Read the spectral dispersive glass material for a transmissive body solved in image space: a double-sided back-face data pass with inverted depth, an iterative interior exit search, bounded total internal reflection, Beer-Lambert absorption over the true path length, and a per-wavelength Cauchy index recombined through CIE 1931. Its reusable optical primitives — exact unpolarised Fresnel, Cauchy coefficients, spectral weights, the rotatable environment probe, and the buffer projection — live in glass optics, and references/dielectric-glass-optics.md carries the two-pass contract, buffer format, search bounds, and transmission diagnostics.

Pick between the two transmissive paths by geometry, not by quality. A closed faceted gem whose exit facet must be exact even when it faces away from the camera takes the BVH path. A scanned, assembled, open-sheet, or multi-shell body takes the image-space path, which tolerates inconsistent winding and authored normals pointing either way but cannot see a surface outside the frame.

Read references/physical-diffraction-grating.md for the exact embossed-field, CIE/blackbody spectral, phase-grating, Bessel order-efficiency, coherence-broadening, strip-emitter, additive-layer, stable object-frame, limitation, and diagnostic contracts.

Read the physical diffraction-grating implementation for a printed substrate plus additive HDR foil response whose star and stripe masks select local groove angle, pitch, and relief while wavelength alone owns spectral colour. Its complete optical model is expressed as a pure TSL graph with Fn, If, and Loop, without embedded native shader source.

Read references/thin-film-soap-bubble-system.md for the air-film-air Airy equation, representative RGB spectral bands, two-membrane blending, bounded secondary reflection, capillary mechanics, camera-aware inflow, puncture retraction, limits, and diagnostics.

Read the thin-film soap bubble system when soap-film interference must drive the image: it provides wavelength- dependent aqueous index, front and rear membrane passes, analytic nearby- bubble reflection, volume-preserving capillary modes, buoyancy and drag, Taylor-Culick rupture, visible-drop aftermath, and deterministic physics gates.

Read the softbody jelly implementation for a deforming flower-shaped transmissive body whose tetrahedral XPBD state, smooth optical shell, view-ray thickness, BVH refraction, absorption, receiver shadow, and finite RGB caustic fields remain coupled.

Read the deformable sand implementation for a fixed-step granular heightfield whose conservative transport, impact particles, anisotropic mineral grains, horizon lighting, and optical-depth shadows share one mass-carrying state.

Read the simulated cloth implementation for an exact plain-weave linen material coupled to a GPU XPBD sheet with yarn stretch, shear locking, bending, rigid contact, self-collision, and pinching. The calibrated solver and cloth-map contracts are in references/simulated-cloth-system.md.

Read the simulated fur implementation for groomed GPU strands, tapered ribbon shading, and an articulated hand whose capsule contacts comb the strand field. The strand, groom, and interaction contracts are in references/simulated-fur-system.md.

Read references/softbody-jelly.md for the softbody coordinate contract, neo-Hookean XPBD split, damping and sleep rules, refractive receiver budget, material constants, limits, and diagnostics.

Required controls

  • real or perceptual texture scale;
  • material identity weights;
  • roughness range and micro-normal strength;
  • the causal fields required by the selected material pattern;
  • for a transmissive body, the physical constants that define it — index and Abbe pair, interior path budget, extinction depth — named rather than buried inside expressions;
  • for a soap film, the exterior and film indices, nanometre thickness range, wavelength bands, surface tension, and membrane ordering;
  • distance/derivative filtering;
  • specular antialiasing;
  • channel and mask debug modes.
  • emissive-material debug modes when the material owns glow or volumetric accumulation.

Read references/hybrid-soil-moss-surface.md and the hybrid soil and moss implementation for texture-backed soil and moss albedo, AO, roughness, and normal microdetail combined with procedural mound displacement, moisture, moss coverage/height, and warped cellular cracks. Do not describe its surface identity as fully procedurally synthesized. When moss must also settle onto a model, read the model moss implementation for model-locked coverage, upward-face accumulation, displaced thickness, and shared moss PBR identity.

Failure conditions

  • every PBR channel samples independent noise;
  • roughness is a scalar afterthought;
  • high-frequency normals survive below one pixel;
  • triplanar projection has visible orientation or scale seams;
  • atlas padding is ignored under mipmapping;
  • custom lighting removes energy conservation without an explicit stylized goal;
  • post-processing is used to hide unstable highlights.
  • diffraction hue is painted from UV instead of derived from wavelength;
  • a groove frame follows the camera or world axes instead of the object;
  • a narrowed diffraction lobe loses energy because its density lacks sigma normalization.
  • a soap bubble is treated as a solid glass sphere or painted with a rainbow instead of using air-film-air interference;
  • a deformed soap membrane retains the undeformed sphere normal;
  • a deforming transmissive body updates its render shell, optical BVH, and receiver field from different states;
  • a finite caustic receiver lets non-zero data reach its clamped texture edge;
  • a softbody solver uses variable integration steps or an uncoupled rest-stress split that injects energy after damping;
  • granular displacement, airborne grains, settled-bed shading, and shadow fields advance from different simulation clocks;
  • sand grain sparkle is an unfiltered high-frequency lookup that aliases under grazing motion;

Routing boundary

Use $threejs-procedural-fields when the main problem is designing shared scalar/vector causes. Use $threejs-procedural-planets for a complete orbit-to-close-approach body, not merely its material. Use $threejs-parallax-occlusion-mapping when a height field must own ray-marched intersection, silhouette coverage, or relief-aware shadows. Use $threejs-temporal-surfaces for view-aligned wet-glass optics and screen-space history; this skill owns the optical path through a transmissive body itself.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Threejs Procedural Materials AI skill do?

Author production procedural materials in Three.js. Use for hybrid texture-backed PBR soil and moss with procedural displacement and masks, upward-facing model moss accumulation, atlas filtering, specular AA, planet-space fields, terrain wetness, deformable granular sand with mass-coupled grain shading, woven cloth with GPU XPBD mechanics and yarn microstructure, simulated fur with interactive grooming and strand shading, lava and emissive surfaces, reflective wave-optical diffraction gratings, air-film-air soap bubbles with Airy interference, raytraced diamond and gem refraction with inter...

Why use Threejs Procedural Materials on TypingMind?

Because you install it once and use it with any model. Threejs Procedural Materials is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Threejs Procedural Materials in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/scottstts/Threejs-Awesome-Graphics-Agent-Skills/tree/main/skills/threejs-procedural-materials. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Threejs Procedural Materials?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Threejs Procedural Materials?

As many as you like. As long as a model supports skills, you can use Threejs Procedural Materials with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Threejs Procedural Materials AI skill free?

Yes. It is published on GitHub by scottstts under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇