Guides choosing and configuring React Three Fiber materials: PBR, transparency, transmission, and environment lighting. Helps with mesh appearance, material cost, and color decisions.
Ships in enzed-r3f-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
| Need | Starting point | Constraint |
|---|---|---|
| Unlit artwork or UI surface | meshBasicMaterial | Still participates in output color/tone-mapping policy |
| Ordinary PBR surface | meshStandardMaterial | Metals especially need an environment or suitable lights |
| Clearcoat, transmission, sheen | meshPhysicalMaterial | Enable only needed features; more shader work |
| Stylized lighting | meshToonMaterial | Needs lights; gradient maps need appropriate filtering |
| Normal debugging | meshNormalMaterial | Useful for geometry/normal inspection |
| Custom shading | ShaderMaterial or node material | Match WebGL/GLSL versus WebGPU/TSL |
Mount below Canvas. This small procedural environment avoids a remote preset dependency.
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>
</>
)
}
NoColorSpace. Preserve correctly loaded glTF texture metadata.metalness={0} has no effect; an emissive map needs a nonblack emissive color.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.thickness/IOR. Transmission is not equivalent to ordinary transparency.MeshTransmissionMaterial and MeshReflectorMaterial add scene renders. Start with low resolution/samples, and measure before enabling backside passes or one independent buffer per object.DoubleSide everywhere: it changes rendering cost and may hide incorrect winding or normals.needsUpdate; shader feature changes such as adding/removing a map can require recompilation.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.
What SKILL.md sets; muted values are Claude Code's defaults
/enzed-r3f-skills:r3f-materialsfrom enzed-r3f-skills
enzed-r3f-skills@cascade-code-languages-misc-1 is listed by joshuarweaver/cascade-code-languages-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin enzed-r3f-skills11 skills in this plugin
/r3f-animationAnimate React Three Fiber objects with useFrame, damping, and GLTF clips. Use for procedural motion, animation transitions, or demand-loop animation; use physics guidance for collision-driven movement./r3f-fundamentalsSet up React Three Fiber scenes, Canvas, typed JSX, hooks, and resource ownership. Use for scene architecture and render-loop setup, rather than detailed materials or effects./r3f-geometryBuild React Three Fiber geometry, custom buffers, instanced meshes, points, and lines. Use for shape construction and geometry draw-call optimization, rather than material appearance.Other plugins' skills for the same job