top of page

Light in a Voxel World: Real Lights or Flood Fill?

Writer: Marcel Dütscher
Marcel Dütscher
Jun 27
1 min read

Updated: Jul 10

A player places a glow lamp in their base. What happens technically? This innocent question triggered a fundamental decision for us — and the answer is a nice example of how the "more modern" solution isn't always the better one.


Option A: real Unity lights. Every glowing block becomes a point light source, the engine computes everything. Looks great — but doesn't scale. A voxel world can have hundreds of glowing blocks in view; real-time point lights in that quantity make any GPU sweat, all the more so in the browser build.


Option B: flood-fill light. The classic of the genre: light is a numeric value per block that spreads from the source and decreases with each step. Dirt cheap, any number of sources — but the result looks flat, because the light has no direction. A wall next to the lamp is just as bright as the surface below it.


Our choice: flood fill with direction. We stuck with the flood-fill approach, but taught it directional information: the light knows which direction it's coming from, and surfaces are lit differently accordingly. The result is baked into the chunk mesh during meshing — at runtime it costs practically nothing, but looks noticeably more three-dimensional than classic block light.


We've carried the lesson from this everywhere since: first ask what the genre's problem really is (here: very many sources, static geometry), then choose the technology. Real lights solved a problem we didn't have — and would have created one we can't solve.

Recent Posts

See All

Comments


bottom of page