threejs-materials

Guide Three.js material types and properties for 3D rendering.

Updated May 31, 2026
One-click install
npx skills add https://github.com/fanguyun/SkillManager --skill threejs-materials-fanguyun
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-materials
Source: https://github.com/fanguyun/SkillManager/tree/main/threejs-materials
Command: npx skills add https://github.com/fanguyun/SkillManager --skill threejs-materials-fanguyun

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill unit provides a comprehensive guide to the various materials available in Three.js for creating realistic 3D models.

Core Features & Use Cases

  • Material Overview: Learn about different material types such as MeshBasicMaterial, MeshLambertMaterial, MeshPhongMaterial, and more.
  • Quick Start Guide: Get started with a simple example of creating a PBR material.
  • Material Properties: Understand the properties and parameters of each material type, including color, roughness, metalness, and lighting interactions.

Quick Start

Import the necessary modules and create a MeshStandardMaterial with a color, roughness, and metalness value. Assign this material to a mesh in your Three.js scene.

Frequently Asked Questions about threejs-materials

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

FAQPage Schema
What are the differences between Three.js material types like MeshBasicMaterial, MeshLambertMaterial, and MeshPhongMaterial?

Three.js materials range from MeshBasicMaterial, which requires no lighting, to MeshLambertMaterial for diffuse shading, and MeshPhongMaterial for specular highlights. Each type offers different lighting interactions and performance characteristics for 3D rendering.

How do I create a PBR material in Three.js using MeshStandardMaterial?

To create a PBR material in Three.js, import the necessary modules and instantiate MeshStandardMaterial. Assign properties like color, roughness, and metalness, then apply this material to a mesh in your Three.js scene for realistic rendering.

What properties control realistic lighting interactions in Three.js materials?

Realistic lighting in Three.js materials is controlled by properties such as color, roughness, and metalness. These parameters define how a MeshStandardMaterial interacts with scene lighting to achieve physically based rendering effects.

When should I use PBR materials over basic materials in Three.js?

Use PBR materials like MeshStandardMaterial when you need realistic visual effects with accurate light reflection and metalness. Choose MeshBasicMaterial for simple, unlit geometry or when performance is prioritized over visual fidelity in 3D rendering.

Can I use Three.js materials without setting up complex lighting in my scene?

Yes, you can use MeshBasicMaterial without any lighting setup since it renders a solid color unaffected by scene lights. However, other Three.js materials like MeshStandardMaterial require light sources to display their PBR properties correctly.

Why does my Three.js mesh appear completely black after applying a material?

A Three.js mesh appears black when using materials like MeshStandardMaterial or MeshLambertMaterial without adding light sources to the scene. These materials require ambient and directional lights to calculate lighting interactions and render correctly.