Three.js Lighting and Shadows
Fixes black or washed out three.js scenes with the right materials, lights, shadows and environment lighting.
Claude's review
7/10 Useful three.js r187 lighting checklist with shadow camera fitting, sRGB tagging, OutputPass and a page probe; much is standard three.js knowledge.
We asked Claude the question you would ask: would I be glad I installed this? We only sell skills it rates 7 or higher.
In detail
Lights and shades three.js r187 scenes: standard, physical and unlit materials, lights, shadows, HDR environment lighting and tone mapping. Use when a mesh renders black or washed out, shadows are missing or full of acne, or EffectComposer darkens the image. Not for renderer setup (`threejs-scene-setup`), model loading (`threejs-gltf-loading`) or custom shaders (`shader-programming`).
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: threejs-materials-lighting
description: >
Lights and shades three.js r187 scenes: standard, physical and unlit materials, lights, shadows,
HDR environment lighting and tone mapping. Use when a mesh renders black or washed out, shadows
are missing or full of acne, or EffectComposer darkens the image. Not for renderer setup
(`threejs-scene-setup`), model loading (`threejs-gltf-loading`) or custom shaders
(`shader-programming`).
---
# three.js materials and lighting
Makes three.js surfaces read correctly: the right material, a light rig, working shadows and
image-based lighting (IBL). Patterns target **r187**. Lighting has been physically based
since r155, so intensities from older tutorials look far too dark.
## When to use
- A mesh renders black or flat, a material choice is needed, lights or shadows are being
added, or environment reflections (IBL) are being set up.
- Code constructs `MeshStandardMaterial`, `DirectionalLight` and similar, or sets
`renderer.shadowMap.enabled`, `scene.environment` or `renderer.toneMapping`.
- Not for the renderer, camera and loop (`threejs-scene-setup`), loading models
(`threejs-gltf-loading`), or custom GLSL and node shaders (`shader-programming` for the
technique).
## Workflow
1. **Rule out geometry first.** Swap the material for `MeshNormalMaterial`. If the mesh is
still missing, the problem is the camera, scale or loading, not lighting.
2. **Default to `MeshStandardMaterial`.** It reacts to lights and `scene.environment` and
matches glTF's PBR model. Use `MeshPhysicalMaterial` only for clearcoat, transmission or
sheen, and `MeshBasicMaterial` for unlit UI, sprites and flat colour.
3. **Light the scene**: an environment map or a hemisphere fill, plus one directional key
light. Start the key at about 2 to 3.
4. **Turn on shadows in three places**: the renderer, the light, and each mesh's
`castShadow` / `receiveShadow`. Then fit the light's shadow camera to the play area.
5. **Tag colour textures sRGB** and leave data maps (normal, roughness, metalness) linear.
6. **Choose a tone mapping curve** once, and finish any post-processing chain with
`OutputPass`.
...From gamedev-skills's repository, Apache-2.0 licence.
Related skills
-
Checked
TinyBase app builder
Scaffolds and extends local first JavaScript apps with TinyBase, including schemas, persistence and sync.
7/101 credit -
Checked
ComfyUI custom node UI
Adds widgets, sidebar tabs, commands and dialogs to ComfyUI custom nodes, so your node feels built in.
8/101 credit -
Checked
Scrolling menu upgrade
Finds outdated react-horizontal-scrolling-menu code and rewrites it for version 8 so the menu works again.
7/101 credit -
Checked
Scroll Menu Testing and SSR
Gets react-horizontal-scrolling-menu working in Next.js and tested in Jest and Playwright without flicker.
7/101 credit -
Checked
Screenshot to React code
Rebuilds a screenshot or mockup as React, TypeScript and Tailwind code that closely matches the design.
7/101 credit -
Checked
Next.js 16 App Builder
Builds Next.js 16 apps the current way, with Server Components, Server Actions, caching and the new proxy file.
7/101 credit