threejs-materials

Configure Three.js mesh materials for PBR shading and shader effects.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/gyalamanch001a/pur-new --skill threejs-materials-gyalamanch001a
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-materials
Source: https://github.com/gyalamanch001a/pur-new/tree/main/.agents/skills/threejs-materials
Command: npx skills add https://github.com/gyalamanch001a/pur-new --skill threejs-materials-gyalamanch001a

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you choose, configure, and optimize Three.js materials so meshes look correct, perform well, and match the intended visual style.

Core Features & Use Cases

  • Material Selection: Compare Basic, Lambert, Phong, Standard, Physical, Toon, Normal, Depth, Points, Line, ShaderMaterial, and RawShaderMaterial options.
  • Texture and Lighting Setup: Apply maps, environment reflections, transparency, emissive effects, normal details, and physically based shading controls.
  • Advanced Rendering Workflows: Build glass, car paint, custom GLSL shaders, multi-material geometry, and performance-conscious material reuse.
  • Use Case: Use this Skill when a scene needs realistic PBR surfaces, stylized cel shading, custom vertex or fragment shader effects, or faster render performance.

Quick Start

Ask for the best Three.js material setup for your mesh, then apply the recommended material type, texture maps, and lighting properties to match the target look.

Frequently Asked Questions about threejs-materials

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What's the best way to choose a Three.js material for realistic PBR rendering?

The best way to choose a Three.js material for realistic PBR rendering is comparing Standard and Physical material types to configure texture maps, environment reflections, and lighting interactions. Standard material suits general PBR surfaces, while Physical adds advanced controls like glass and car paint effects.

How do I configure custom GLSL shaders in a Three.js ShaderMaterial?

To configure custom GLSL shaders in a Three.js ShaderMaterial, define custom vertex and fragment shaders and manage shader uniforms for performant rendering. This workflow enables shader-driven visual effects by directly controlling the WebGL pipeline beyond the built-in material properties.

What is the difference between Lambert, Phong, and Toon materials in Three.js?

The difference between Lambert, Phong, and Toon materials in Three.js is their shading model: Lambert provides simple diffuse lighting, Phong adds specular highlights, and Toon applies stylized cel shading. Selecting the right type ensures your mesh matches the intended visual style.

How do I set up transparency and environment maps for meshes in Three.js?

To set up transparency and environment maps for meshes in Three.js, apply the appropriate texture maps and tune per-material properties within a Standard or Physical material. Correct handling of these PBR parameters and lighting interactions yields accurate reflective and see-through surfaces.

Can I assign multiple materials to a single geometry in Three.js?

Yes, you can assign multiple materials to a single geometry in Three.js using multi-material geometry workflows. This approach lets different mesh groups display distinct shading, textures, or stylized rendering effects within the same interactive 3D scene.

Why does my Three.js material render incorrectly when reused across multiple meshes?

A Three.js material renders incorrectly when reused across multiple meshes if per-material property tuning and cloning are not handled correctly. Proper material cloning and shader uniform management ensure performant rendering without visual conflicts across interactive 3D scenes.