Carved Light guide
Overview
Carved Light reads the depth of your picture, works out which way every part of it faces, and lights it again with lights you can move.
A picture has no depth of its own. A vision transformer trained on millions of pictures guesses it from this one alone: monocular depth. Here it runs on your graphics card with WebGPU, from a model in the ONNX format that downloads once: Depth Anything V2 Small, under the Apache License 2.0.
The picture is read twice: once whole, for the big shapes, and once in close overlapping squares for the fine detail (tiled inference). The two are joined by frequency separation, and a guided filter snaps the depth to the edges you can see. The result is a depth map.
From the depth comes a normal map: the way every pixel faces. Each light then shades every pixel by how squarely it faces it, adds a highlight and a rim, and walks toward the light through the height field to find what is in the way (ray marching). That is where the soft shadows and contact shadows come from.
Before the new light falls, the light already painted into the picture is taken out (delighting), so what is left is closer to its albedo and the new light reads true.
In this guide
- StartWhat you need and your first relit picture in four steps.
- Every controlEvery control in the panel, one line each.
- Three looksThree looks and the settings behind them.
- Keep your workThe PNG, the reel, and the maps under the picture.
- KeysEvery shortcut, and what each one does.
- HelpWhat to do when something goes wrong.