Resurrect region based terrain flattening#6086
Resurrect region based terrain flattening#6086fluffyfreak wants to merge 4 commits intopioneerspacesim:masterfrom
Conversation
|
However, for the purpose of getting something in, I'd personally envision the API as passing a span of valid flatten-region structs into the The logic for that can be made pretty simple; each patch maintains a EDIT: this also means that we're not paying the height region cost at all for patches containing no flattening regions, i.e. 99% of the planet's surface. Regardless of how it's implemented, this does potentially run the risk of making terrain height values inconsistent based on the source that's querying terrain height (e.g. collision, rendering, etc.). I'd want to make sure we're presenting a consistent model of terrain, as future graphical features (e.g. surface-scattered objects like grass, etc.) depend on queried terrain height matching the graphical model of terrain. I'm not sure there's an elegant solution to that problem though, outside of stuffing significantly more logic into the physics engine to generate collision representation meshes "on demand" based on nearby potential-colliders rather than doing arbitrary terrain generation queries every single collision check. |
|
Great feedback! I'll have a think about resolving both of those issues |
958dcf5 to
f59616e
Compare
|
Tracking further development of this in https://github.com/fluffyfreak/pioneer/tree/regions-branch
When something queries the height via GetHeight that is done on the BaseSphere -> GeoSphere which holds the terrain, so it can all be unified through that 👍 should be consistent. Hard part right now is making sure that it's consistent with the GeoPatchJobs system. Finding the appropriate region(s) to pass through to those jobs because at high levels of the quadtree there could be many regions involved. |
f59616e to
a5ea9f0
Compare
Changing seed for Impression to avoid too bumpy terrain, reported in pioneerspacesim#6086
Changing seed for Impression to avoid too bumpy terrain, reported in #6086
This was originally done by @Ae-2222 many (13/14) years ago in this branch and I've resurrected it here because issue #5154 is still a problem.
Fixes #5154
This works by querying for starports on a planet, adding them to a list, then checking that list whenever a height sample is requested... this has some performance implications but on my high end machine it runs very well. I've not yet tried it on a Raspberry Pi...
Putting this up as a draft to started discussion.
I have:
Things I think it needs:
Issues:
- inconsistent results across machines!
- I don't think that it currently covers all starports on a planet!
- somtimes flattens terrain away from a starport whilst not flattening the starport
Image taken at (0, -2, -2)

Gliese 1