Graphics › Light
Baked and live light: lightmaps and Lumen
Know first: Direct and indirect light, UV: how a picture gets onto a model, Shadows: maps, cascades and soft edges
Indirect light can be computed ahead of time, taking as long as it needs, and stored in textures. Or it can be computed again in every frame. The first is almost free in the game, but nothing can move. The second is live, but expensive and noisy. This lesson shows how a lightmap and its second unwrap work. It explains where blotches, stair-steps and leaks across seams come from, and how a static light differs from a stationary and a movable one. It also shows how Lumen computes light on the fly and why it lags, and how to pick a method for your own game. This is the ninth lesson of the course “How an engine draws a frame.”
Why this matters
The lesson on direct and indirect light showed that a corner behind a wardrobe is lit by bounces, and that computing them properly is expensive. Engines solve this in two ways, and the choice shapes an artist’s work. Without this lesson, four things stay puzzling:
- why a model needs a second unwrap, and why you cannot reuse the first one;
- where the blotches on walls and the bright stripes along edges come from after baking;
- why a character in a baked room is lit differently from the walls around it;
- why the baked light disappeared when Lumen was switched on, and why a room does not go dark at once when a lamp goes out.