Performance Issues with lots of TileMapLayers for Large 3D-Stacked Worlds

I tried GridMap — I liked the baseline FPS (~120) even with a tall tower of cubes. But the FPS dropped proportionally with tower height, which was disappointing. I realized I needed culling, but didn’t like the memory model: GridMap feels like a collection, and removing/hiding meshes doesn’t actually free or skip them — they’re still part of the internal structure. Rebuilding the entire thing seemed costly.

Next, I tried chunking (x^3) and manually building meshes — surprisingly solid results. Similar baseline FPS to GridMap, maybe lower memory usage (though I might be wrong there).

Then I moved to mesh instancing per chunk. This gave a noticeable boost. After that, I got an extra ~20% by doing zero-copy updates: mesh_instance.set_count(n^3) per chunk, then doing set_visible(actual_count).

Culling was still a bit tricky in this setup…

Eventually, I figured out a nice trick: I split the world into a grid of vertical columns, and assigned a MultiMesh to each column. Since it’s orthographic, I can scan top-down and call one set_instance_count(n^2) per column — and FPS became infinite. (I think this setup also goes well into thread pool)

(Using a pool allocator for chunks was also crucial.)

Later, I might add a bitwise compressed format for chunks to speed up traversal. And maybe explore extending the zero-copy approach via a custom Vulkan pipeline if I ever dig into that.

Hope this helps someone!