Decision
Terrain: a heightfield in the tools, meshes in the cells
The ground has to hold kerbs, embankments, underpasses, cuttings and river walls in the city, and hills twenty kilometres off in open country. A heightfield drawn at run time cannot hold the first list, and the renderer draws ordinary meshes through meshlets and a visibility buffer, not geometry displaced in a vertex shader.
So the decision is: the heightfield lives in the tools, and what ships is meshes in cells.
- Source, not shipped. A heightfield for the whole map, a road graph, and outlines of water and built lots.
- A bake, cell by cell. The heightfield is sampled, roads and lots are cut and flattened into it, kerbs and embankments are generated, and the result is ordinary meshes with materials. Hand-made pieces (tunnels, underpasses) replace generated ground where they are placed.
- Coarse levels from the same source. Far ground is the same heightfield sampled more coarsely, in cells that are exact unions of four finer ones. That is what the square grid is for. The bake closes the seams between levels.
- Collision from the bake: a heightfield shape where the cell's ground is a plain surface, a triangle mesh where it is not, with a surface material on each triangle.
- Open country by the same path: larger cells, coarser ground, the same files.
One answer for city and country means streaming, culling, lighting and collision have no second case.
Still to find out: how many ground layers a pixel may blend, and whether the fade between coarse and fine ground shimmers in motion. It has only been looked at held still.