Bake PlayCanvas lighting with AI
Move steady lighting off the frame-by-frame rendering path and check how static surfaces and moving objects look together on the target device.
Bake PlayCanvas lighting with AI for a room whose walls, floor and lamps never move. The bake-lighting skill helps an agent decide which lights and meshes can take part, then investigate a surface that stays dark or skips the bake. The renderer needs a second set of texture coordinates on every mesh instance in a node.
A faster frame does not tell the whole story. Baking on the device adds work at startup, while shipping precomputed textures increases the download. The skill asks for measurements on the intended hardware and a visual check of moving objects passing through baked shadows.
What it does
- Identify the static geometry lit by a lamp before removing its dynamic contribution.
- Check a model imported from a GLB for missing lightmap coordinates.
- Choose between storing diffuse colour and keeping light direction for materials that need it.
- Compare a moving object inside and outside a baked shadow to judge its contact with the floor.
- Measure the startup cost and consider offline textures if the device takes too long to bake.
Install and use
- Provide a PlayCanvas project, a representative scene and a preview on the target device. Imported meshes need suitable secondary texture coordinates.
- Ask, “Bake the room lighting and find out why the floor disappears into darkness when the dynamic light is turned off.”
- Compare the same view before and after, including the first frame and an object moving through the room.
FAQ
Source
Made by PlayCanvas. Original skill: bake-lighting, published on GitHub under the MIT licence.
View on GitHub