What is the Relight Painted Surfaces skill?
Relight Painted Surfaces is a images & art skill by MengTo for Claude Code, Cursor, Codex and other AI coding agents. Add pointer-driven lighting to a 2D painting, sprite, or holographic card using separate depth, normal, and roughness maps. Use for moving highlights on illustrated metal, skin, cloth, or paper while the painted silhouette stays registered.
Steer one directional light across the entire illustration. A pointer over empty space should turn the reflection on a distant knuckle. The normal at the knuckle chooses which way it reflects, and its roughness determines how wide that reflection looks.
When to use it
Use for moving highlights on illustrated metal, skin, cloth, or paper while the painted silhouette stays registered.
What the SKILL.md covers
- Prepare the surface
- Wire the light
- Verify the effect
- Author
- MengTo
- Pack
- MengTo/Skills (30 skills)
- Category
- Images & art, #46 of 290
- Alyn Score
- 80 / 99
- Files
- 14, includes scripts, includes references
- License
- MIT
- Last updated
- 21 min ago
- Works with
- Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot
Relight Painted Surfaces compared to similar skills
| Skill | Alyn Score | GitHub stars | Updated |
|---|---|---|---|
| Relight Painted Surfaces · MengTo | 80 | 7.8k | 21 min ago |
| Paper Comic · zsyggg | 45 | 1.5k | 6 months ago |
| Scenario Game Assets · scenario-labs | 77 | 3.9k | 3 days ago |
| Blender Texture Baking · EL4CTEO | 76 | 2.3k | 2 days ago |
Install Relight Painted Surfaces
Pick your agent. Every command is ready to paste.
npx alyn-cli add relight-painted-surfacesDetects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
npx skills add MengTo/Skills --skill relight-painted-surfacesOr use the open skills CLI directly.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads relight-painted-surfaces when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the relight-painted-surfaces skill”. In Codex, type $relight-painted-surfaces.
Relight painted surfaces
Steer one directional light across the entire illustration. A pointer over empty space should turn the reflection on a distant knuckle. The normal at the knuckle chooses which way it reflects, and its roughness determines how wide that reflection looks.
This technique works on a flat painted layer with an existing light baked into its colour. For a modeled object with geometry and a material under scene lighting, use the 3D Metal Material skill. For texel density, UVs and filtering of an existing PBR texture set, see 3D High-Resolution Textures.
Extracted from the articulated steel hand in Folvra’s Commission hero, with the pointer-controlled studio light from Meng To’s Dark Souls Holo Card. The local demo runs Three.js r187, WebGL 2 and a custom GLSL shader. Select Depth, Normals or Roughness to inspect the inputs under the hand.
Prepare the surface
Use matching crops, orientation and aspect ratios for all four textures. Their resolutions may differ. Keep the original paint and alpha for the resting image.
| Texture | Interpretation | Detail to check |
|---|---|---|
| Paint | sRGB colour and a straight-alpha silhouette | Keep the wrist and gaps between fingers transparent where the illustration is cut out. |
| Depth | Linear grayscale, white nearer the viewer | Shape large forms first. A painted black joint can be close to the viewer. |
| Normal | Linear tangent-space RGB, +Y up, neutral around (128,128,255) | Round the raised plates. Fine seams perturb the reflection without carving deep trenches. |
| Roughness | Linear grayscale, white matte | Separate glass, polished metal, tarnish, skin and cloth. Bright paint alone cannot distinguish these materials. |
Use existing authored maps when available. To bake a set from a painting, install Pillow, NumPy and OpenCV in the working Python environment. Give the helper an aligned relative-depth image and, when available, a painted roughness mask.
python scripts/bake_maps.py palm.webp --depth palm-depth.png \
--roughness palm-roughness.png --material metal --out maps/
For a painting without depth, install ONNX Runtime and pass --model path/to/model.onnx in place of --depth. The helper accepts the dynamic-input Depth Anything V2 Small ONNX model. Its output is an estimate from the image. Inspect fingers, overlapping parts and holes before using it. The helper writes three lossless WebPs with separate 8-bit channels and leaves the painting intact. Use a distinct output directory when the inputs share those filenames.
Wire the light
Copy the three modules from assets into a project with Three.js. Set the stage to the whole interaction area. Give each paint image a positioned wrapper of its own, with the image displayed as a block that fills it. Keep any rotation, scale or scroll transform on that wrapper so the overlay and its coordinate probes follow together. For a cropped portrait, crop the wrapper around a proportionally sized image so the four textures use identical image coordinates.
import { createPaintLighting } from "./paint-light.js";
const lighting = createPaintLighting(stage, [
{ image: steelImage, normal: steelNormal, depth: steelDepth, roughness: steelRoughness, metal: 1 },
{ image: clothImage, normal: clothNormal, depth: clothDepth, roughness: clothRoughness, metal: 0 }
]);
// Optional keyboard, touch or fixed-camera inspection pose, with x and y in [-1, 1].
lighting.setLight(-0.65, 0.35);
// On teardown, call lighting.dispose().
Reference the fragment shader when porting to another renderer and the studio light when tuning the finish. The Folvra starting values are:
- Map the horizontal and inverted vertical pointer coordinates to
[-1, 1]once per stage. Aim the key alongnormalize(vec3(1.15*x, .48+.85*y, .9)). Project the diagonal reflection band in stage coordinates so it crosses adjacent layers continuously. - Decode paint through sRGB once, read all three data textures as linear values, and normalize the sampled normal. Use the depth to offset only interior samples by up to 4.2 CSS pixels. Anchor transparent boundaries and sample five points towards the light for shallow self-shadowing.
- Use reflected view direction for steel, a broad studio reflector and a warm bounce. Let roughness broaden the specular lobe. Attenuate reflection in dark tarnished recesses to preserve the separation between plates. Use
metal: 0for skin and cloth. A mixed object benefits from an authored material mask. - Composite the signed colour difference over the original painting. This can darken one side of a joint as the other side catches light. A low-resolution replacement blurs brushwork, and an additive-only pass makes the whole hand brighter.
- Reuse one renderer for visible layers. The included controller redraws on input or resize, caps its buffer at 1.25× DPR and 1280 × 960 per layer, and releases GPU resources on disposal. Call
refresh()if an external animation moves layers beneath a stationary light. Touch and reduced-motion views keep the painted composition, with an optional explicit direction control.
Verify the effect
Park the pointer over empty paper at opposite sides of the stage. Capture the same fixed crop of a plate in both positions. Look for a highlight traveling from one bevel to another while the exterior edge stays in place. At one fixed pointer pose, separately substitute neutral normals, constant depth, and constant roughness. Inspect the bevel, contact shadow and reflection width after each substitution. If the images look identical, trace the sampled texture and colour-space settings.
Test with a coarse pointer, keyboard input, reduced motion and WebGL disabled. The base paint should remain readable in all four cases. The demo prompt also gives a different subject for testing reuse.
Tips for Relight Painted Surfaces
- • Start a fresh session after installing so your agent picks up the new skill.
- • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
- • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
- • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Relight Painted Surfaces
What does the Relight Painted Surfaces skill do?
Add pointer-driven lighting to a 2D painting, sprite, or holographic card using separate depth, normal, and roughness maps. Use for moving highlights on illustrated metal, skin, cloth, or paper while the painted silhouette stays registered.
How do I install Relight Painted Surfaces?
Run "npx alyn-cli add relight-painted-surfaces" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Relight Painted Surfaces work in Cursor and Codex?
Yes. Relight Painted Surfaces uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
When should I use the Relight Painted Surfaces skill?
Use for moving highlights on illustrated metal, skin, cloth, or paper while the painted silhouette stays registered.
What is inside the Relight Painted Surfaces skill?
The SKILL.md covers Prepare the surface, Wire the light, Verify the effect, and the skill folder has 14 files including scripts.
What is a good alternative to Relight Painted Surfaces?
Paper Comic by zsyggg is the highest-ranked similar skill from another creator, with an Alyn Score of 45 compared to 80 for Relight Painted Surfaces.
Is Relight Painted Surfaces free?
Relight Painted Surfaces is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.
Who made Relight Painted Surfaces?
Relight Painted Surfaces is published by MengTo in the MengTo/Skills repository, together with 29 other skills.







