Eric Lengyel's Transvoxel Algorithm Seals the Cracks in Voxel Terrain
The Transvoxel Algorithm
Voxel terrain lets games build caves, overhangs, and arches, but rendering it at multiple resolutions leaves visible cracks and holes along block boundaries. Eric Lengyel's Transvoxel Algorithm, invented in 2009 and shipped in the C4 Engine, inserts special transition cells between full- and half-resolution data. Instead of roughly 1.2 million cases, it handles just 512, which collapse into 73 equivalence classes, and it needs only local voxel data, so dynamic terrain can be retriangulated in real time. The algorithm is patent-free, and its look-up tables are on GitHub.
Instead of considering all possible combinations of voxel state for both the full-resolution and half-resolution data at a transition boundary, which would require that approximately 1.2 million cases be handled, we consider only nine samples of the high-resolution data.