Sparse very large virtual world geometry

I am wondering if anyone has any experience with sparse world geometry in Panda3D.

The motivation basically would be in a multiplayer world where world building is part of the game and the world thus may get bigger throughout the lifetime of the game or existing or modified, i.e. “dirty” parts of the world might be downloaded or updated (not as sporadic patches but as a regular consequence of ongoing game play).

I want to maximize seamlessness and minimize huge patching downtimes by utilizing a sparse mesh where the contents are filled in by prediction logic determining that currently unloaded (or dirty) parts of the mesh will come into range of the view frustum (based on velocity of player travel, direction, viewing distance, estimates about latency conditions, current bandwidth availability, and time needed to download, etc., I’m sure I’m missing some measurements or predictions that may improve the logic here).

I’m wrestling with how I might structure such a beast in a Panda3D client program and how best to update it when the world changes (thus the mesh) at the server. Maybe Panda3D already has some internal structure or file format that can accomodate a large spare map like this?

I tried using regular triangle surfaces which would form a terrain by adjusting vertex Z levels but the intricacies of runtime geomnodes left me stumbling because I was not able to reliably control the texturing after flattening the geomnode after creating (attempting to alter the textures had problems such as the old textures still being there and trying to mix with the replacement texture rather than replacing it I spent many headached nights messing with render states and anything I could find in the docs trying to correct this) it and it would not display at all unless it was flattened. I’m thinking it might be easier to just download compressed eggs and bamify them in the background (or an independent thread) then just loads the bams from disk when those areas come into view (ahh now we add disk latency, egg2bam conversion time and loading time to the parenthetized prediction logic above where I said I was sure I missed something important). If I store egg IDs in a database on the server along with SHA1 hash and bounding volume the prediction logic can form queries to get modified (or nonexistent) meshes coming in range by adding distance testing to the query against the bounding volumes and the SHA1s in the result rows don’t jive to locally stashed eggs (or the eggs are not locally stored at all). I can see the server needing to do those queries and keeping a list of all eggs the client will need to see. The client and server will first sync to jive this list (as deltas since it will get rather large to send the entire list every [latent, bandwidth-limited, sporadic, non-uniform] network frame) then the client compares all the SHA1s known locally and only downloads the eggs in the list that have changed or are not yet stored locally.

Has anyone else dealt with this problem and maybe has some (python) code I could start with on this?

I don’t have suggestions for the main of your problem, I fear, but want to mention that one of the terrain systems mentioned in the manual may be of service for your terrain elements.

I am not sure GeoMipTerrain can handle sparse geometry.