threejs-materials

Configure Three.js material properties and PBR workflows for web rendering.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill resolves the complexity of choosing and configuring the correct Three.js material for specific performance and visual requirements, preventing common issues like over-draw, incorrect lighting, or inefficient shader usage.

Core Features & Use Cases

  • Material Selection: Provides a clear hierarchy of materials from basic to advanced PBR, helping you choose the right balance between cost and visual fidelity.
  • PBR Configuration: Offers detailed guidance on setting up complex surfaces like glass, car paint, and cloth using MeshPhysicalMaterial.
  • Performance Optimization: Includes best practices for material instancing, transparency handling, and shader disposal to keep your web-based game running smoothly.

Quick Start

Use the threejs-materials skill to configure a MeshStandardMaterial for a character model with albedo, normal, and roughness maps.

Frequently Asked Questions about threejs-materials

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

FAQPage Schema
How do I configure Three.js materials for PBR rendering in a web project?

Configuring Three.js materials for PBR rendering involves selecting the correct material hierarchy and mapping PBR parameters like albedo, normal, and roughness to ensure optimal performance and visual accuracy for 3D assets.

What is the best way to choose between basic and PBR materials in Three.js?

Choosing between basic and PBR materials in Three.js requires evaluating the balance between shader cost and visual fidelity. You select from a hierarchy of materials, progressing to advanced PBR only when complex surface details are necessary.

How do I set up complex surfaces like glass or car paint using MeshPhysicalMaterial?

Setting up complex surfaces like glass or car paint using MeshPhysicalMaterial involves configuring specific PBR parameters to achieve the desired visual effects. This process provides detailed guidance for implementing advanced material properties in web rendering.

Do I need to know WebGL material hierarchies to optimize Three.js shader performance?

Yes, you need knowledge of WebGL material hierarchies and PBR parameter mapping to optimize Three.js shader performance. This understanding is required to ensure proper material instancing, transparency handling, and shader disposal.

Why does my Three.js web rendering project have poor performance with multiple materials?

Poor performance in Three.js web rendering often stems from inefficient shader usage and incorrect material configuration. Resolving this requires applying best practices for material instancing and proper shader disposal to prevent over-draw.