mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-04-26 17:29:17 -04:00
Adds disk persistence for compressed HeightFields to speed up navmesh loading. Since we serialize the HeightField (not the final PolyMesh), loading still requires PolyMesh generation at runtime. This is intentional, HeightFields are needed for dynamic obstacles and areas. Small/medium maps: Baking and loading both near-instant, storage ~few MBs Very large maps (e.g. 4km × 4km): ~10s bake, ~8s load ~500mb **Baking** Serializes existing in-memory HeightField cache to disk with layered compression. **Loading** Eliminates geometry collection and HeightField generation on scene load. PolyMesh generation still runs at runtime (allows dynamic areas/links).