threejs-materials

Guide Three.js material selection and configuration for 3D rendering.

Updated Feb 17, 2026
One-click install
npx skills add https://github.com/Gatsbyhateyou/gatsby-website --skill threejs-materials-gatsbyhateyou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-materials
Source: https://github.com/Gatsbyhateyou/gatsby-website/tree/main/style-gallery-draft/material
Command: npx skills add https://github.com/Gatsbyhateyou/gatsby-website --skill threejs-materials-gatsbyhateyou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you understand and implement various Three.js materials to control the appearance, lighting, and realism of 3D objects in your scenes.

Core Features & Use Cases

  • Material Variety: Covers Basic, Lambert, Phong, Standard (PBR), Physical, Toon, Normal, Depth, Points, and Line materials.
  • Custom Shaders: Supports ShaderMaterial and RawShaderMaterial for advanced customization with GLSL.
  • Texture Application: Demonstrates how to use textures for color, roughness, metalness, normals, and more.
  • Environment Mapping: Explains how to use environment maps for realistic reflections and lighting.
  • Use Case: Apply a realistic car paint material to a 3D model, or create a glass effect for a window, or visualize surface normals for debugging.

Quick Start

Use the threejs-materials skill to create a PBR material with a green color, 0.5 roughness, and 0.5 metalness.

Frequently Asked Questions about threejs-materials

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

FAQPage Schema
How do I create a PBR material in Three.js with specific roughness and metalness?

To create a PBR material in Three.js, use the MeshStandardMaterial and set its color, roughness, and metalness properties. This approach allows you to define realistic surface lighting and reflections for your 3D rendering applications.

What is the difference between Phong and Standard materials in Three.js?

Standard materials in Three.js utilize PBR for accurate real-world lighting, whereas Phong materials use a simpler specular model for stylized visuals. Standard materials support metalness and roughness, while Phong relies on specular highlights.

Can I use custom GLSL shaders with Three.js materials?

Yes, Three.js allows custom GLSL shaders through ShaderMaterial and RawShaderMaterial. These provide advanced customization options for developers who need granular control over the WebGL rendering pipeline beyond the built-in material properties.

How do I apply texture maps and environment maps for realistic Three.js reflections?

Apply textures for color, roughness, and normals to define surface details, and use environment maps to simulate realistic reflections and lighting. This combination creates highly realistic 3D graphics by accurately capturing surrounding lighting interactions.

What are the best Three.js materials for performance optimization in WebGL?

Basic, Lambert, and Depth materials are highly efficient for WebGL performance optimization because they avoid complex lighting calculations. Choose these over PBR or Physical materials when rendering large scenes or targeting low-performance devices.

Does Three.js support specialized materials like glass or toon shading?

Yes, Three.js supports specialized materials including Physical materials for glass effects with transmission, and Toon materials for cartoonish stylized shading. These provide tailored rendering pipelines for specific visual aesthetics.