Turn any layer into a tangent-space normal map for games without leaving Photon Studio. The plugin reads the selected layer, builds a height field, filters it and encodes surface normals; Apply normal map adds the result as a new layer in one undo step. Inspired by NormalMap-Online.
| Panel | Lit preview | 3D preview |
|---|---|---|
![]() |
![]() |
![]() |
The footer's Logs action opens a copyable overlay; errors open it automatically.
- Smart height — perceptual luminance with auto-levels, or Red/Green/Blue/Alpha, plus grain-aware Auto tune.
- Full control — Strength 0–400 %, Blur 0–16 px, Detail 0–100 %, Invert, Tileable.
- Engine formats — OpenGL (Y+) and DirectX (Y−) green-channel conventions.
- Live preview — Source, Normal, Lit and a rotatable 3D sphere/box viewer.
- Live lighting — draggable sun pad and 0–200 % light strength (preview-only).
- Safe apply — new layer at the source bounds in one undo step, with a transactional fallback; Save PNG… for export.
- Watches the live document — switching layers or documents refreshes the panel every 1.5 s.
- Optional local worker — offload full-resolution Applies to a loopback Node service; the panel works standalone if you do not install it.
- Standard footer — version left, Logs + Check service right; logs open on errors.
- Photon Studio → Preferences → Plug-ins → Install plugin → select this repository's
plugin/folder. - Select a pixel layer → Plugins → Normal Map… (
Ctrl+Shift+M).
The plugin is fully offline and needs no service. For large layers you can install the optional local worker (Section below).
The worker runs the same normal.js pipeline on 127.0.0.1:8766. When it is connected, Apply
sends the layer there (PNG in/out, ≤16 MP) and falls back to the in-panel worker on any error.
node tools/service.cjs install # Windows: tools\install-service.cmd
node tools/service.cjs status
node tools/service.cjs removemacOS/Linux use ./tools/install-service.sh (or node tools/service.cjs install). Install adds
sign-in autostart: a systemd --user unit on Linux, a launchd LaunchAgent on macOS, or an
HKCU Run entry + hidden VBS launcher on Windows. No admin rights, localhost only. After installing,
click Check service once in the panel footer to approve/connect it; the panel logs
service: ready v1.0.0 and later Applies use it.
Pick a layer, choose Height from and Format, then tune Strength / Blur / Detail (or press
Auto tune). Apply normal map adds Normal Map — <layer name> above the source layer without
modifying it. The preview is capped at 640 px; Apply and Save PNG use the full layer.
- 3D — Sphere/Box, drag to rotate, double-click to reset. The light pad and light strength only affect the preview.
- Limits — selected layer only (a Photon selection is ignored), 8-bit pixels, 64 MP; export is capped at 16 MP / 8192 px. The optional service path is limited to 16 MP / 8192 px and falls back to the in-panel worker above that.
- Watch — switching layers or documents refreshes the panel automatically.
node tools/normal-test.cjs # 28 checks
node tools/render3d-test.cjs # 13 checks
node tools/session-test.cjs # 17 checks with a fake Photon SDK
node tools/service-test.cjs # 4 checks: PNG codec + HTTP worker
node tools/service-client-test.cjs # 6 checks: request contract + guards
node tools/ui-check.cjs
node ../design-system/check-design-system.cjsVerified in live Photon Studio 0.1.71 as an installed development plugin: the applied normal map matches the headless pipeline (mean absolute difference 0.59/255, correlation 0.9998 on an 896×1249 height map), and two consecutive Apply layers landed at the source bounds. All suites pass; the design-system checker reports 6/6 PASS.
Panel styling follows ../design-system: 24 px controls, 7 px control
radius, canonical select.js, shared header/footer contract, host tokens only.
MIT — see LICENSE.
See CHANGELOG.md.




