I am working on a streaming terrain system. The engine will dynamically load height and color textures as the camera moves around, in order to simulate terrains that are much larger than would otherwise be possible in memory. The game "Fuel" is a good example of what I am planning:
For physics I plan to dynamically stream in patches of the heightmap in the area of any moving physics body. Most of the terrain will not have objects rolling around on it, so we can simulate physics everywhere with a small amount of memory. (A 64-bit build can be used to prevent floating point precision problems.)
If terrain data is being downloaded from an online database there may be delays before the height data becomes available. I am not sure how to "pause" physics in an area to prevent objects from falling through the terrain before it is loaded. I plan on supporting round terrains (planets) as well as general static object collision, so simply checking the Y position of a falling object once terrain is loaded is not sufficient.
There is an unlimited plane collision in the SDK demos. You can check that out. Basically you make an empty polygonal mesh with a very large aabb, The for each object touching the aabb you get a callback that you use to populate the polygon of the terrain. People has used it for game like the block octree that was popular few years back. Is not difficult to implement.
You can use the large aabb to partitionn your map for streaming stuff however you like.
Yes, I understand that. The problem I am trying to solve it what to do if the terrain height data for a section does not load immediately, and the object falls through the terrain because it has not been loaded yet. Is it possible to somehow pause the physics of a single object? The data will be downloaded from the web asynchronously.
I suppose I could also set the body's mass to zero and then when the loading is complete, set it back to what it was and restore the velocity to the previous value.
Additionally it might be little work to add hight map mips? So lower LOD could be kept in memory, and after the details are loaded it could interpolate to get a smooth transition eventually. Though, ofc. bodies could start rolling, stacks might tumble, etc. Would need some work to compensate velocities caused from morphing terrain to deal with this.
I wonder if such things are done in some games? LOD seems not really a hot topic for physics for most.