-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resurrect region based terrain flattening #6086
base: master
Are you sure you want to change the base?
Resurrect region based terrain flattening #6086
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 |
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