# Threejs materials lighting

> Threejs materials lighting is an open-source agent skill for developer tools. Guides three.js materials, lights, shadows and HDR environment lighting for r187 scenes. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/shinyobjectz/raea-skills/tree/main/skills/threejs/pack/threejs-materials-lighting
- **Repository:** https://github.com/shinyobjectz/raea-skills
- **GitHub stars:** 38
- **License:** Apache-2.0
- **Skill name:** threejs-materials-lighting
- **Collection:** https://github.com/shinyobjectz/raea-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

This skill helps an agent fix or build the look of a three.js scene: choosing between standard, physical and unlit materials, placing a light rig, enabling shadows, and setting up image-based lighting from an HDR file or a room environment. It targets three.js r187 and notes which older patterns changed, such as physically based intensities since r155.

The workflow starts by swapping in a normal material to rule out geometry or camera problems, then walks through a key and fill setup, the three switches that must all be on for shadows, sRGB tagging for colour maps, and a tone mapping choice that is finished with an output pass when post-processing is used. A verification section gives a browser snippet that reports lights, environment, shadow casters and colour space problems so the agent can check the live page or hand the snippet to the user.

The agent should expect a three.js project in JavaScript or TypeScript with the three package installed. An optional HDR file can be used for environment lighting, and a Playwright setup or browser console is needed only for the runtime check. A reference file covers material and light tables.

## When your agent uses it

> 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`).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/threejs/pack/threejs-materials-lighting)
- [License: Apache-2.0](https://github.com/shinyobjectz/raea-skills/tree/HEAD/skills/threejs/pack/threejs-materials-lighting)

## Features

- **Material selection guidance:** Explains when to use standard, physical, or unlit materials and what each responds to.
- **Light rig setup:** Covers hemisphere fill, directional key light intensity and placement.
- **Shadow configuration:** Describes enabling shadow maps, fitting the shadow camera and fixing acne or cut-off shadows.
- **HDR image-based lighting:** Shows loading an HDR environment map for reflections and scene lighting.
- **Colour space and tone mapping:** Explains sRGB tagging of colour textures and choosing a tone mapping curve.
- **Runtime lighting check:** Provides a page-side snippet that reports lights, shadows and colour space issues.

## Good for

- My mesh renders black, what lighting do I need?
- Add soft shadows to my directional light in three.js
- Set up an HDR environment map for reflections
- Fix shadow acne on my ground plane
- Make my textures look washed out less
- Choose a tone mapping setting after adding post-processing

## Install

### Claude Code

This skill ships in the `raea` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add shinyobjectz/raea-skills
/plugin install raea@raea
```

Or copy only this skill to `~/.claude/skills/threejs-materials-lighting`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/threejs-materials-lighting &&
cp -R "$tmp/skills/threejs/pack/threejs-materials-lighting" ~/.claude/skills/threejs-materials-lighting &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/threejs-materials-lighting` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/threejs-materials-lighting` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/threejs-materials-lighting &&
cp -R "$tmp/skills/threejs/pack/threejs-materials-lighting" ~/.agents/skills/threejs-materials-lighting &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/threejs-materials-lighting` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/threejs-materials-lighting` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/threejs-materials-lighting &&
cp -R "$tmp/skills/threejs/pack/threejs-materials-lighting" ~/.cursor/skills/threejs-materials-lighting &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/threejs-materials-lighting` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/shinyobjectz/raea-skills.git --path skills/threejs/pack/threejs-materials-lighting
```

Or copy the folder to `~/.gemini/skills/threejs-materials-lighting` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/threejs-materials-lighting`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/threejs-materials-lighting &&
cp -R "$tmp/skills/threejs/pack/threejs-materials-lighting" ~/.copilot/skills/threejs-materials-lighting &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/threejs-materials-lighting` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/shinyobjectz/raea-skills.git
```

Then copy `raea-skills/skills/threejs/pack/threejs-materials-lighting` into your agent's skills folder as `threejs-materials-lighting`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does Threejs materials lighting need to run?

It targets three.js r187 scenes and is meant to be used alongside a project that already uses three. The verification section uses npm or npx tsc and optionally Playwright or the browser console.

### When does Threejs materials lighting trigger?

It is meant for cases where a mesh renders black or washed out, shadows are missing or show acne, or EffectComposer darkens the image.

### Does Threejs materials lighting cover renderer setup or model loading?

No. Renderer, camera and loop setup belongs to threejs-scene-setup, model loading to threejs-gltf-loading, and custom shaders to shader-programming.

### Does Threejs materials lighting include scripts?

No scripts are bundled with the skill. It provides code patterns and a browser snippet in its instructions.

### How do I install Threejs materials lighting in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/threejs-materials-lighting to use it in all your projects, or to .claude/skills/threejs-materials-lighting in one project. Or install the raea plugin, which includes it: /plugin marketplace add shinyobjectz/raea-skills, then /plugin install raea@raea.

### Does Threejs materials lighting run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Threejs materials lighting?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Threejs materials lighting?

The closest alternatives to Threejs materials lighting are Threejs, Threejs scene setup, Threejs gltf loading, Blender pbr materials and Bevy pbr materials.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Threejs](https://ai-powered.com/skills/threejs): Threejs is an open-source agent skill for design and media.
- [Threejs scene setup](https://ai-powered.com/skills/threejs-scene-setup): Threejs scene setup is an open-source agent skill for developer tools.
- [Threejs gltf loading](https://ai-powered.com/skills/threejs-gltf-loading): Threejs gltf loading is an open-source agent skill for developer tools.
- [Blender pbr materials](https://ai-powered.com/skills/blender-pbr-materials): Blender pbr materials is an open-source agent skill for design and media.
- [Bevy pbr materials](https://ai-powered.com/skills/bevy-pbr-materials): Bevy pbr materials is an open-source agent skill for developer tools.
- [Game engine](https://ai-powered.com/skills/game-engine): Game engine is an open-source agent skill for design and media.
- [Vue](https://ai-powered.com/skills/vue): Vue is an open-source agent skill for developer tools.
- [Angular developer](https://ai-powered.com/skills/angular-developer): Angular developer is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/threejs-materials-lighting
