R3f Materials logo

R3f Materials

Community
EnzeD
r3f-materials

Choose and configure React Three Fiber surface materials, PBR, transparency, and transmission. Use for mesh appearance and material cost; use shader guidance for custom GLSL or TSL code.

Overview

PublisherEnzeD
Repositoryr3f-skills
Skill namer3f-materials
Stars
116
Forks
7
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the R3f 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.
  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/EnzeD/r3f-skills.git /tmp/r3f-skills
mkdir -p .claude/skills
cp -r /tmp/r3f-skills/skills/r3f-materials .claude/skills/r3f-materials
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

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

React Three Fiber materials

Inspect the installed renderer, Three.js, Fiber, and Drei versions first. Examples use Fiber 9 / React 19 with WebGL. Do not assume Drei shader-based materials work unchanged with WebGPU.

Choose the least complex material that fits

NeedStarting pointConstraint
Unlit artwork or UI surfacemeshBasicMaterialStill participates in output color/tone-mapping policy
Ordinary PBR surfacemeshStandardMaterialMetals especially need an environment or suitable lights
Clearcoat, transmission, sheenmeshPhysicalMaterialEnable only needed features; more shader work
Stylized lightingmeshToonMaterialNeeds lights; gradient maps need appropriate filtering
Normal debuggingmeshNormalMaterialUseful for geometry/normal inspection
Custom shadingShaderMaterial or node materialMatch WebGL/GLSL versus WebGPU/TSL

PBR surface with environment lighting

Mount below Canvas. This small procedural environment avoids a remote preset dependency.

tsx
import { Environment, Lightformer } from '@react-three/drei'

export default function Example() {
  return (
    <>
      <Environment resolution={64} frames={1}>
        <Lightformer position={[0, 3, 2]} scale={[5, 5, 1]} intensity={3} />
      </Environment>
      <mesh>
        <sphereGeometry args={[1, 32, 24]} />
        <meshStandardMaterial color="goldenrod" metalness={1} roughness={0.3} />
      </mesh>
    </>
  )
}

PBR and color decisions

  • Use metalness near 0 for dielectrics and near 1 for bare metals; intermediate values usually describe mixtures or texture filtering. Roughness controls microsurface response, not opacity.
  • Color/albedo and emissive textures use sRGB; roughness, metalness, normal, AO, and masks use NoColorSpace. Preserve correctly loaded glTF texture metadata.
  • Maps multiply scalar settings: a metalness map with metalness={0} has no effect; an emissive map needs a nonblack emissive color.
  • A normal map alters shading; a displacement map alters vertices and needs enough geometry subdivisions. Normal maps do not alter the silhouette.
  • An emissive surface does not illuminate nearby geometry or automatically produce a halo. Add appropriate lighting and a bloom pipeline when those effects are required.
  • PBR appearance changed across recent Three.js releases. Validate with controlled lighting/exposure; do not blindly compensate for an upgrade with extra lights or color conversion.

Transparency and glass

  • opacity < 1 needs transparent for ordinary alpha blending. For cutout foliage or decals, consider alphaTest to avoid sorting artifacts; choose soft transparency only when required.
  • depthWrite={false} can help some transparent layers but is not a universal fix. Test overlap order, backfaces, and intersection with opaque objects.
  • Use physical transmission for glass, generally with opacity 1 and a meaningful thickness/IOR. Transmission is not equivalent to ordinary transparency.
  • Drei MeshTransmissionMaterial and MeshReflectorMaterial add scene renders. Start with low resolution/samples, and measure before enabling backside passes or one independent buffer per object.
  • A shared transmission sampler is cheaper in some scenes but cannot reproduce all visibility between transparent/transmissive objects. Read the helper's documentation before choosing it.
  • Do not enable DoubleSide everywhere: it changes rendering cost and may hide incorrect winding or normals.

Lifetime and updates

  • Share materials when objects should share appearance. Clone before changing one instance's color, maps, or uniforms; a cached glTF material may be used elsewhere.
  • R3F owns declarative material children. Externally allocated/shared materials need explicit lifecycle ownership. Disposing a material does not dispose its textures.
  • Animate ordinary material properties through typed refs. Value changes such as roughness or color do not require needsUpdate; shader feature changes such as adding/removing a map can require recompilation.
  • Material arrays require matching geometry groups. An array alone does not assign arbitrary materials to faces.

Verify

Render under the intended lighting and output pipeline, then test transparent overlaps, shadows, and repeated mount/unmount. Compare GPU cost before adding transmission or reflection passes.

Sources

Frequently asked questions

What does the R3f Materials AI skill do?

Choose and configure React Three Fiber surface materials, PBR, transparency, and transmission. Use for mesh appearance and material cost; use shader guidance for custom GLSL or TSL code.

Why use R3f Materials on TypingMind?

Because you install it once and use it with any model. R3f 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 R3f Materials in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/EnzeD/r3f-skills/tree/main/skills/r3f-materials. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use R3f 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 R3f Materials?

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

Is the R3f Materials AI skill free?

It is published on GitHub by EnzeD. Check the repository for licensing terms. 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 👇