Original Post
I'm currently making a multiplayer game set in a to-scale solar system. I'm building an Octree system where objects of varying sizes (players, people, asteroids, space stations) are placed into the octree based on their size, this means that a planet could end up at depth 7 but a character end up at depth 27, for example. If it helps to explain scale, Level 0 is 5 billion km wide in my tests, with the smallest node being 4656m at level 30. Yes, this results in an obscenely high number of nodes, but solar systems are 90% empty. The reason for the octree is so that I can deal with dense areas (asteroid fields, large battles) efficiently.
What I want, is for a player at any position within the octree to always be able to see large far away objects (planets), medium objects when closer (space stations, asteroid rings), and small objects when very close (other players, pickups etc), but do so efficiently.
Traversing the octree to the players depth, and collecting a list of potentially visible octree nodes along the way, doesn't satisfy my above requirement as very far away objects (planets) will not necessarily be in that traversal path (if they're in a different depth=0 octree node for example), but still should be visible. I also tried a typical LOD approach, testing each octree node based on a sort of screen-space error metric, but this failed in my tests as it wasn't traversing all the way to the lowest depth (eg 27) before failing the visibility tests.
The more I think about approaches, the more I confuse myself. Can anyone offer some sane insight into what method I would use to get my desired outcome? Maybe some sort of "always traverse" flag on nodes down to a certain depth where planets reside? not sure.
Any input would be appreciated.
What I want, is for a player at any position within the octree to always be able to see large far away objects (planets), medium objects when closer (space stations, asteroid rings), and small objects when very close (other players, pickups etc), but do so efficiently.
Traversing the octree to the players depth, and collecting a list of potentially visible octree nodes along the way, doesn't satisfy my above requirement as very far away objects (planets) will not necessarily be in that traversal path (if they're in a different depth=0 octree node for example), but still should be visible. I also tried a typical LOD approach, testing each octree node based on a sort of screen-space error metric, but this failed in my tests as it wasn't traversing all the way to the lowest depth (eg 27) before failing the visibility tests.
The more I think about approaches, the more I confuse myself. Can anyone offer some sane insight into what method I would use to get my desired outcome? Maybe some sort of "always traverse" flag on nodes down to a certain depth where planets reside? not sure.
Any input would be appreciated.