About light-scene
A skill for lighting and rendering scenes in Engine. It guides developers through tuning illumination, tone mapping, shadows, and post-processing by inspecting screenshots and changing one class of values at a time.
Key features
- 01Tune ambient and environment lighting
- 02Configure tone mapping and exposure
- 03Enable and size shadows
- 04Use CameraFrame post-processing
- 05Diagnose lighting and color issues
Use cases
- 01Brighten unlit sides of a scene
- 02Balance exposure with light intensity
- 03Ground subjects with shadows or a sky
- 04Debug clipped whites or crushed blacks
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ playcanvas/ skills --skill light-sceneAfter installing, type/light-scenein Claude Code to confirm it loaded.
Details
From the project READMELight and render a scene
Engine defaults give a flat, dark image; change them deliberately. Tune against inspected screenshots, one class of value at a time.
Defaults to change
scene.ambientLightis black, so unlit sides render pure black. Light ambient and reflections from an environment atlas or skybox, or set an ambient colour.- Cameras default to
TONEMAP_LINEAR. ChooseTONEMAP_NEUTRAL,TONEMAP_ACES2, orTONEMAP_FILMIC(oncameraFrame.rendering.toneMappingwhen usingCameraFrame), set exposure, then balance light intensities to it. - Shadows are off. Enable
castShadowson the key light. DirectionalshadowDistanceis 40 m, so use cascades for large scenes, andSHADOWUPDATE_THISFRAMEfor static shadows. Size resolution to the framed subject. - Lights shine along local -Y (
apply-conventions).
Use what ships
CameraFramehandles tone mapping, bloom, SSAO, DOF, vignette, and grading. Callupdate()after changes and destroy it with the app. Keep bloom intensity within the documented 0 to 0.1.scene.sky.type(SKYTYPE_DOME,SKYTYPE_BOX,SKYTYPE_INFINITE) grounds an environment sky.- The
ProceduralSkyscript owns a linked sun light: set the light's base intensity, then tune elevation and azimuth on the sky, not the light. - The
ShadowCatcherscript grounds subjects that have no lit floor. - Clustered lighting is on by default, so many point and spot lights are cheap.
- Bake static lights with
bake-lighting; stylize shading withoverride-shader-chunks.
Find each integration's example with find-examples.
Warning signs
- Albedo washing toward white: reduce exposure, sky, and light intensity before darkening materials.
- Large areas clipped white or crushed black: rebalance exposure and lights before adding post.
- A fog colour that differs from the sky horizon breaks the horizon line.
Comments
Markdown supported