threejs-lighting

Configure multiple light types, shadows, and IBL in Three.js.

1|Updated Apr 7, 2025
One-click install
npx skills add https://github.com/mmdonohue/zuzu --skill threejs-lighting-mmdonohue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: threejs-lighting
Source: https://github.com/mmdonohue/zuzu/tree/main/.claude/skills/threejs-lighting
Command: npx skills add https://github.com/mmdonohue/zuzu --skill threejs-lighting-mmdonohue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Three.js lighting is essential for realistic 3D scenes, but configuring multiple light types, shadows, and environment lighting can be error-prone and time-consuming.

Core Features & Use Cases

  • AmbientLight for baseline illumination and soft shadows without directional bias.
  • DirectionalLight, PointLight, SpotLight, HemisphereLight, and RectAreaLight with configurable shadows, bias, and camera frustum tuning.
  • Environment Lighting (IBL) setup using HDRIs or cube textures for accurate reflections and image-based lighting.
  • Common setups like Three-Point Lighting and outdoor/indoor scenarios to accelerate iteration and visual quality.

Quick Start

Install three.js in your project: npm install three Import THREE in your module and start with basic lights:

  • Create an ambient light with color and intensity
  • Add a directional light to simulate the sun and enable shadows
  • Optionally enable shadow maps and adjust shadow frustum for performance
  • Optionally configure environment lighting using an HDR environment map or cube texture

Frequently Asked Questions about threejs-lighting

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

FAQPage Schema
How do I set up multiple light types and shadows in Three.js?

To configure Three.js lighting, use AmbientLight for baseline illumination and add DirectionalLight or SpotLight to simulate the sun, then enable shadow maps and adjust shadow frustum for performance.

What is the best way to configure environment lighting (IBL) in Three.js?

Environment lighting (IBL) in Three.js is configured using HDR environment maps or cube textures, providing accurate reflections and image-based lighting for realistic 3D scenes.

Why do my Three.js shadows look wrong and how do I fix shadow bias?

Shadow bias and camera frustum tuning resolve incorrect shadow rendering in Three.js, requiring you to adjust shadow map settings and configure the light's shadow camera frustum.

Can I use Three-Point Lighting for realistic character rendering in Three.js?

Three-Point Lighting is a supported setup in Three.js for realistic character rendering, combining multiple light types with configurable shadows to accelerate visual quality iteration.

When do I need HemisphereLight or RectAreaLight in my WebGL scenes?

HemisphereLight provides gradient illumination for outdoor scenes in WebGL, while RectAreaLight simulates rectangular light sources like windows, both configurable with specific intensities for realistic environments.