(Yet another) Terrain Algorithm

No, sorry. The algorithm uses an array of internal index data structures stored in a file on disk. The “build” process (should be offline, since it takes some time) reads the elevation data and creates this binary terrain data, along with some other useful files like a gradient map.

At runtime the prepared terrain data is mapped into memory using, well, memory mapped files. This is fast, and the full terrain data does not have to be in memory.

By the way, Python has a mmap module too. A nice thing if you want to work with large data sets from Python.

Modifying the wrapper to support multiple terrain instances would be possible. So perhaps paging lager sectors of the terrain, each an instance of a soarx terrain object, could work. Cracks between the single sectors will be a problem though. I will think about it, and if I am successful I will post an update.

enn0x