Agent skill

Threejs Materials Lighting

by corosolto in corosolto/client

Light and shade a three.js scene: choose materials (MeshStandardMaterial PBR vs unlit MeshBasicMaterial), add ambient/hemisphere/directional/point/spot lights, turn on shadow maps, and use an…

Apache-2.0Auto-check passedGame Development

Install Threejs Materials Lighting

skills CLI
$ npx skills add corosolto/client --skill threejs-materials-lighting -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install corosolto/client threejs-materials-lighting --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/corosolto/client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/threejs-materials-lighting .claude/skills/threejs-materials-lighting && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
threejs-materials-lighting
GitHub stars
257
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
481 words
Files
2 (incl. references)
Skills in repo
20
Repo updated
First seen
Licence
Apache-2.0

At a glance

Light and shade a three.js scene: choose materials (MeshStandardMaterial PBR vs unlit MeshBasicMaterial), add ambient/hemisphere/directional/point/spot lights, turn on shadow maps, and use an…

  • Works in 5 steps: PBR material under a 3-light rig → Unlit material (no light needed) → Shadows (the three required switches +… → …
  • A three.js model looks black
  • SKILL.md covers When to use, Core workflow, Patterns and Pitfalls, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Threejs Materials Lighting is an agent skill from corosolto/client. Light and shade a three.js scene: choose materials (MeshStandardMaterial PBR vs unlit MeshBasicMaterial), add ambient/hemisphere/directional/point/spot lights, turn on shadow maps, and use an environment map (IBL) for realistic reflections. Use when a three.js model looks black, flat, or wrong — when the user mentions three.js materials, MeshStandardMaterial, lights, shadows, envMap, or PBR. For renderer/loop setup use threejs-scene-setup; for loading models use threejs-gltf-loading.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/materials-lights-table.md`). Compatibility notes: three.js r165+ (verified against r184; physically based lighting)

It sits in Game Development, covering 3D graphics and WebGL. It works with Three.js. The repository describes itself as: FPS satírico de navegador: 5 facções brasileiras caricatas, 44 personagens, 5 mapas e 26 armas — rounds e Capture the Flag contra bots, direto na aba, sem instalar nada. Three.js… The licence is Apache-2.0.

When your agent uses it

  • A three.js model looks black
  • Wrong — when the user mentions three.js materials
  • MeshStandardMaterial

Example prompts

  • “/threejs-materials-lighting”

Requirements

  • Compatibility (from SKILL.md): three.js r165+ (verified against r184; physically based lighting)

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. PBR material under a 3-light rig
  2. Unlit material (no light needed)
  3. Shadows (the three required switches + camera fit)
  4. PBR textures on a material
  5. Image-based lighting from an HDR environment

What it can do on your machine

Read from SKILL.md and the folder at commit 0d37b27. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    three.js r165+ (verified against r184; physically based lighting)

    From compatibility in the SKILL.md frontmatter.

Context cost

Threejs Materials Lighting loads about 1.8k tokens when it runs, and up to ~3.1k if it reads all its reference files. Until then it costs about 129 tokens; SKILL.md has 481 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~129
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from corosolto/client at commit 0d37b27, republished under its Apache-2.0 licence (© corosolto). 481 words, ~1,849 tokens.

Download SKILL.mdSave it as .claude/skills/threejs-materials-lighting/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
threejs-materials-lighting
description
Light and shade a three.js scene: choose materials (MeshStandardMaterial PBR vs unlit MeshBasicMaterial), add ambient/hemisphere/directional/point/spot lights, turn on shadow maps, and use an environment map (IBL) for realistic reflections. Use when a three.js model looks black, flat, or wrong — when the user mentions three.js materials, MeshStandardMaterial, lights, shadows, envMap, or PBR. For renderer/loop setup use threejs-scene-setup; for loading models use threejs-gltf-loading.
compatibility
three.js r165+ (verified against r184; physically based lighting)
license
Apache-2.0
metadata.engine
threejs
metadata.category
web-engines
metadata.difficulty
intermediate

three.js Materials & Lighting

Make three.js surfaces look right: pick the correct material, light the scene, enable shadows, and add image-based lighting. Patterns target r165+, verified against r184 (lighting is physically based by default since r155).

When to use

  • Use when a mesh renders black or flat, when choosing a material, adding lights, enabling shadows, or setting up environment-map reflections (IBL).
  • Use when code constructs MeshStandardMaterial, DirectionalLight, etc., or sets renderer.shadowMap.enabled or scene.environment.

When not to use: the renderer/camera/loop → threejs-scene-setup. Loading models (whose PBR materials this complements) → threejs-gltf-loading. Custom GLSL/ShaderMaterial is its own topic; for the portable concept see shader-programming.

Core workflow

  1. Pick a material by need. MeshStandardMaterial (PBR: roughness, metalness, reacts to lights/IBL) for realism; MeshPhysicalMaterial for clearcoat/transmission; MeshBasicMaterial (unlit, ignores lights) for UI/flat; MeshNormalMaterial/MeshDepthMaterial for debugging.
  2. Add light, or nothing shows. Lit materials need a light source and/or scene.environment. Combine a soft fill (AmbientLight/HemisphereLight) with a key DirectionalLight.
  3. Mind light intensity. Since r155, lighting is physically based; modern intensities are higher than old tutorials (a key DirectionalLight ≈ 1–3).
  4. Enable shadows in three places. renderer.shadowMap.enabled = true, the light's castShadow = true, and each mesh's castShadow/receiveShadow. Then fit the light's shadow camera to the scene.
  5. Use an environment map for grounded reflections. Assign an equirectangular or PMREM-processed texture to scene.environment; PBR materials pick it up automatically.
  6. Verify under real lighting — confirm the surface responds to the key light (highlights move), shadows land where expected, and reflections look plausible.

Patterns

1. PBR material under a 3-light rig
js
import * as THREE from 'three';

const material = new THREE.MeshStandardMaterial({
  color: 0xcc4444,
  roughness: 0.5,     // 0 = mirror, 1 = fully matte
  metalness: 0.0,     // 0 = dielectric (plastic/wood), 1 = metal
});
const mesh = new THREE.Mesh(new THREE.SphereGeometry(1, 32, 16), material);
scene.add(mesh);

// Soft sky/ground fill + a directional key light.
scene.add(new THREE.HemisphereLight(0xbbddff, 0x443322, 1.0)); // sky, ground, intensity
const key = new THREE.DirectionalLight(0xffffff, 2.5);
key.position.set(5, 10, 7);
scene.add(key);
2. Unlit material (no light needed)
js
// MeshBasicMaterial ignores lights — for flat color, UI, or sprites/labels.
const flat = new THREE.MeshBasicMaterial({ color: 0x44aa88 });
// A textured color map should be tagged sRGB so colors aren't washed out:
const tex = new THREE.TextureLoader().load('assets/logo.png');
tex.colorSpace = THREE.SRGBColorSpace;
const logo = new THREE.MeshBasicMaterial({ map: tex, transparent: true });
3. Shadows (the three required switches + camera fit)
js
renderer.shadowMap.enabled = true;
renderer.shadowMap.type = THREE.PCFSoftShadowMap;     // softer edges

const sun = new THREE.DirectionalLight(0xffffff, 3);
sun.position.set(8, 12, 6);
sun.castShadow = true;
sun.shadow.mapSize.set(2048, 2048);                   // default 512; raise for crisp
// DirectionalLight uses an OrthographicCamera — fit it tightly to the scene:
const cam = sun.shadow.camera;
cam.near = 1; cam.far = 40;
cam.left = -15; cam.right = 15; cam.top = 15; cam.bottom = -15;
scene.add(sun);

mesh.castShadow = true;
ground.receiveShadow = true;                          // a plane to catch the shadow
4. PBR textures on a material
js
const loader = new THREE.TextureLoader();
const colorMap = loader.load('assets/brick_color.jpg');
colorMap.colorSpace = THREE.SRGBColorSpace;           // color maps are sRGB
const normalMap = loader.load('assets/brick_normal.jpg'); // data maps stay linear
const roughMap  = loader.load('assets/brick_rough.jpg');

const brick = new THREE.MeshStandardMaterial({
  map: colorMap,
  normalMap,
  roughnessMap: roughMap,
  metalness: 0,
});
5. Image-based lighting from an HDR environment
js
import { RGBELoader } from 'three/addons/loaders/RGBELoader.js';

new RGBELoader().load('assets/studio.hdr', (hdr) => {
  hdr.mapping = THREE.EquirectangularReflectionMapping;
  scene.environment = hdr;     // lights + reflects all PBR materials
  scene.background = hdr;       // optional: show it as the backdrop
});
// Optional cinematic tone curve:
renderer.toneMapping = THREE.ACESFilmicToneMapping;
renderer.toneMappingExposure = 1.0;
Show full SKILL.md (204 more words)Show less

Pitfalls

  • Mesh is pure black → a lit material with no light and no scene.environment. Add a light or an environment map; to confirm geometry, temporarily swap to MeshBasicMaterial/MeshNormalMaterial.
  • Scene too dark even with lights → old tutorial intensities. r155+ is physically based; raise intensities (key light ≈ 2–3) or add an environment map.
  • Shadows don't appear → you missed one of the three switches (renderer.shadowMap.enabled, light.castShadow, mesh castShadow/ receiveShadow).
  • Shadows are cut off or blocky → the DirectionalLight's orthographic shadow.camera frustum is too big/small or doesn't cover the scene; tighten left/right/top/bottom/near/far and raise shadow.mapSize. Visualise it with new THREE.CameraHelper(light.shadow.camera).
  • Shadow acne / peter-panning → adjust light.shadow.bias (small negative) and light.shadow.normalBias.
  • Colors look washed out / too bright → color (albedo) textures need texture.colorSpace = THREE.SRGBColorSpace; normal/roughness/metalness maps must stay linear (leave them as NoColorSpace).
  • PointLight shadows tank performance → a point light renders the scene 6 times (cube map). Prefer one shadow-casting DirectionalLight; use cheaper fakes elsewhere.

References

  • For the material cheat-sheet (which Mesh*Material for which look), light types and their parameters/units, transparency vs alphaTest ordering, and the PMREMGenerator/RoomEnvironment route to IBL without an HDR file, read references/materials-lights-table.md.
  • threejs-scene-setup — renderer, camera, and loop (set shadowMap, tone mapping).
  • threejs-gltf-loading — models arrive with PBR materials this skill tunes.
  • shader-programming — custom shader effects (engine-agnostic concept).

© corosolto, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/threejs-materials-lighting of corosolto/client.

  • SKILL.md
  • references/materials-lights-table.md

Open the folder on GitHubat commit 0d37b27

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in corosolto/client, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Threejs Materials Lighting next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Threejs Materials Lighting compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Threejs Materials Lighting this skillcorosolto/client2571 repos~1.8kAutomated safety check: PassApache-2.0
Image to Three.js Modelimg2threejs/img2threejs18k1 repos~8.2kAutomated safety check: PassApache-2.0
Web CloneJane-xiaoer/claude-skill-web-clone1k2 repos~2.7kAutomated safety check: PassMIT
Threejs Game Directormajidmanzarpour/threejs-game-skills2.4k—~2.2kAutomated safety check: PassMIT
Threejs Gameplay Systemsvalkor-ai/loom1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Threejs World Generationcalesthio/OpenMontage65k—~2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Image to Three.js Model

    img2threejs/img2threejs

    Rebuilds the object in a reference image as a procedural, animation-ready Three.js model written entirely in code, using staged sculpting with quality checks.

    18k GitHub starsUsed in 1 repo~8.2k tokens
    Game DevelopmentAuto-check passed
  • Web Clone

    Jane-xiaoer/claude-skill-web-clone

    网站复刻 / 克隆方法论。USE WHEN 用户说 复刻网站、克隆网站、clone website、抄个站、仿站、 照着这个站做一个、reproduce site、还原某个网页效果、把这个站搬下来改成我的、 复刻某个交互/WebGL/Canvas/Three.js 效果。提供「先拿真源码 → 判路径 → 逆向拆解 → 搭工程 → 替换内容」的可移植决策树,覆盖静态站 /…

    1k GitHub starsUsed in 2 repos~2.7k tokens
    Game DevelopmentAuto-check passed
  • Threejs Game Director

    majidmanzarpour/threejs-game-skills

    Entrypoint for building, upgrading, and finishing Three.js browser games.

    2.4k GitHub stars~2.2k tokensUpdated 11 days ago
    Game DevelopmentAuto-check passed
  • Build and iterate playable Three.js game systems: starter scaffold, architecture, design briefs, core loops, level and encounter design, entities, input, camera, collision and physics, scoring…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    Game DevelopmentAuto-check passed
  • Threejs World Generation

    calesthio/OpenMontage

    Build deterministic, editable, free-viewpoint Three.js worlds from text or structured briefs.

    65k GitHub stars~2k tokensUpdated 5 days ago
    Game DevelopmentAuto-check passed
  • 3Dviz Pro Max Scene Builder

    viettranx/3dviz-pro-max

    Guides building an expressive 3D scene in Three.js or Blender by reasoning through intent, object construction and scientific grounding before using a catalog of recipes and kits.

    683 GitHub stars~2.8k tokensUpdated 28 days ago
    Game DevelopmentAuto-check passed

More from corosolto/client

All 20 skills in this repo
  • Threejs Gameplay Systems

    corosolto/client

    Build and iterate playable Three.js game systems. An agent skill from corosolto/client.

    257 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Threejs Gltf Loading

    corosolto/client

    Load glTF/GLB models in three.js with GLTFLoader and play their skinned animations with AnimationMixer, including DRACO/Meshopt-compressed meshes and KTX2 textures.

    257 GitHub starsUsed in 1 repo~1.8k tokens
    Auto-check passed
  • Threejs 3D Generator

    corosolto/client

    Generate, texture, rig, animate, stylize, convert, and download 3D assets for Three.js games using the Tripo API.

    257 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Threejs Scene Setup

    corosolto/client

    Stand up a three.js scene: import maps and the three/addons path, the Scene/PerspectiveCamera/WebGLRenderer trio, the setAnimationLoop render loop, responsive resize, and OrbitControls.

    257 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Threejs Game Director

    corosolto/client

    Primary entrypoint for complete Three.js browser game creation and premium iteration.

    257 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Gauntlet Fps

    corosolto/client

    Roda o Gauntlet Loop do CS BRASIL / CORO SOLTO — o ciclo crítico-adversarial → builders em paralelo → captura medida → verificação A/B → caçador de regressões que melhora gráficos, mapas, armas, UI…

    257 GitHub stars~2.6k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Threejs Materials Lighting

What does Threejs Materials Lighting do?

Light and shade a three.js scene: choose materials (MeshStandardMaterial PBR vs unlit MeshBasicMaterial), add ambient/hemisphere/directional/point/spot lights, turn on shadow maps, and use an…. Threejs Materials Lighting is an agent skill from corosolto/client.js scene: choose materials (MeshStandardMaterial PBR vs unlit MeshBasicMaterial), add ambient/hemisphere/directional/point/spot lights, turn on shadow maps, and use an environment map (IBL) for realistic reflections.

When should I use Threejs Materials Lighting?

Threejs Materials Lighting fits situations like: A three.js model looks black; wrong — when the user mentions three.js materials; meshStandardMaterial.

How do I install Threejs Materials Lighting in Claude Code?

Run `npx skills add corosolto/client --skill threejs-materials-lighting -a claude-code`. Or copy the skill folder (.agents/skills/threejs-materials-lighting in corosolto/client) into .claude/skills/threejs-materials-lighting in your project. Claude Code loads it when a task matches its description.

How do I install Threejs Materials Lighting in Codex?

Run `npx skills add corosolto/client --skill threejs-materials-lighting -a codex`. Or copy the skill folder (.agents/skills/threejs-materials-lighting in corosolto/client) into .agents/skills/threejs-materials-lighting in your project. Codex loads it when a task matches its description.

Can I use Threejs Materials Lighting in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add corosolto/client --skill threejs-materials-lighting -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/threejs-materials-lighting, .gemini/skills/threejs-materials-lighting, .github/skills/threejs-materials-lighting and .opencode/skills/threejs-materials-lighting in your project.

What does Threejs Materials Lighting need to run?

SKILL.md names no scripts, command-line tools or credentials: Threejs Materials Lighting is instructions for the agent only. Compatibility (from SKILL.md): three.js r165+ (verified against r184; physically based lighting).

Does Threejs Materials Lighting access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Threejs Materials Lighting safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Threejs Materials Lighting use?

Threejs Materials Lighting is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Threejs Materials Lighting use?

About 1.8k tokens (SKILL.md is roughly 7.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.2k tokens, read only when the agent opens those files.

What are the alternatives to Threejs Materials Lighting?

Skills that share tags, products or a category with Threejs Materials Lighting: Image to Three.js Model (img2threejs/img2threejs, 18k stars), Web Clone (Jane-xiaoer/claude-skill-web-clone, 1k stars), Threejs Game Director (majidmanzarpour/threejs-game-skills, 2.4k stars) and Threejs Gameplay Systems (valkor-ai/loom, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Threejs Materials Lighting?

corosolto (a GitHub organization) maintains it in corosolto/client, which has 257 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 7, 2026.

Source: corosolto/client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.