-
Notifications
You must be signed in to change notification settings - Fork 127
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
More Mountain Levels #188
base: master
Are you sure you want to change the base?
More Mountain Levels #188
Conversation
hl = find_threshold_f(e, 0.35, ocean=ocean) # the highest 35% are declared hills | ||
ml = find_threshold_f(e, 0.10, ocean=ocean) # the highest 10% are declared low mountains | ||
mml = find_threshold_f(e, 0.06, ocean=ocean) # the highest 10% are declared medium mountains | ||
hml = find_threshold_f(e, 0.02, ocean=ocean) # the highest 10% are declared high mountains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added in values for the different mountain-levels. The percentages, however, are merely guessed so far. I could use some better suggestions on those ( @ftomassetti maybe? Also, @esampson seems to know things like these).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a note: Neither these values nor the corresponding functions in World.py
have really been used before (maybe in one or two places). So this shouldn't cause terribly broken code and might offer some opportunities for future improvements to some of the generation-algorithms.
87aef2a
to
8180b2e
Compare
required double heightMapTh_hill = 9; | ||
required double heightMapTh_low_mountain = 10; | ||
required double heightMapTh_med_mountain = 11; | ||
required double heightMapTh_high_mountain = 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it problematic to add the new variables in the "middle" instead of the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, that breaks compatibility but in this case I would say it is intended
…amic. Updated World.proto and World_pb2.py.
8180b2e
to
5b9b83b
Compare
hl = find_threshold_f(e, 0.50, ocean=ocean) # the highest x% are declared hills | ||
ml = find_threshold_f(e, 0.25, ocean=ocean) # the highest x% are declared low mountains | ||
mml = find_threshold_f(e, 0.12, ocean=ocean) # the highest x% are declared medium mountains | ||
hml = find_threshold_f(e, 0.06, ocean=ocean) # the highest x% are declared high mountains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I picked these values after inspecting the results of #203 and Earths hypsographic curve. The real world seems to follow something like 2^x according to that graph.
I updated this one to make it use values that are close to Earth's. I am now satisfied with the results, the satellite-output looks almost like it did before - but everything is tied to the worlds mountain-thresholds (and could be globally changed) instead of fixed in the code. :) |
Restarting tests |
# values chosen to emulate the exponential behavior seen here: | ||
# http://www.ngdc.noaa.gov/mgg/global/etopo1_surface_histogram.html | ||
pl = find_threshold_f(e, 0.95, ocean=ocean) # the highest x% of land are declared plains; save some for beaches (?) | ||
hl = find_threshold_f(e, 0.50, ocean=ocean) # the highest x% are declared hills |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
50% isn't a lot? It is based on real data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could use the definition of hill as 300m of elevation. I am not sure if it is w.r.t. to the surrounding terrain or to the level of the sea. I am looking for more precise data. to understand better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the two images above, the scale of the platec-world to Earth seems to be roughly 1000:1. So hills right now are at roughly 1000m (wrt. sea-level) - the value would be lower if the first part of the graph wasn't as steep as it is.
You said 50% seemed like a lot. Moving hills down will increase that number even further - to maybe 75%.
The graphs can probably be used to find reasonable values. Although the definitions of hills, mountains etc. are kind of arbitrary at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hill used to represent the top 10% of all the world, if land is 1/3 of the world it means they used to ~33% of land, right? So that mean we are getting 50% more hills than before. Mountains should roughly stay the same instead (if I am not wrong)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually my former comment in the code was off: Plains used to be the top 10% of the world (total), hills only the top 3% (total). The current value pushes that to 15% (total). So if we wanted less, we should pick a base other than 2...so more like 10^x? That sounds very drastic to me. The values would be [0.95, 0.10, 0.01, 0.001, 0.0001].
Don't forget, though, that hills were the highest portion of the world before the new levels were added. From that point of view it might be perfectly fine to have 50% (of land) be hills and maybe equate the new medium mountains with the former hills. (Or something along those lines.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first two plots in #203 show the difference of the values pretty nicely (old levels first, then new levels). The new hills are below the old plains. The old hills are roughly where the new medium mountains are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just checked something: Look at the first image in swipe-mode.
Doesn't really tell anything about the quality of the chosen values, only that I should check if the ancient maps need a little tweak to make use of the new levels.
(Also, check the biome-map in swipe-mode - there is quite a bit of fine detail added due to the height-levels! It's caused by the temperature-map, which does include an altitude-factor.)
The values themselves seem pretty good to me; the old ones seem much more sketchy, with hills being the substitute for a proper mountain-level. Once we agree on good values, I will check the three places that actually make use of them (river-generation, temperature-generation and ancient map-generation). I think there is some detail to be gained in those. :)
Also: There is data that comes with this, Mindwerks/worldengine-data#17. EDIT: Right, the world-file cannot even be loaded due to the new variables. |
7f4cd4f
to
a230771
Compare
Altitude-factor for temperature-calculation makes use of the new levels. River-generation makes use of the new levels. Ancient map-generation makes use of the new levels.
a230771
to
4b4a258
Compare
hl = find_threshold_f(e, 0.40, ocean=ocean) # the highest x% are declared hills | ||
ml = find_threshold_f(e, 0.20, ocean=ocean) # the highest x% are declared low mountains | ||
mml = find_threshold_f(e, 0.10, ocean=ocean) # the highest x% are declared medium mountains | ||
hml = find_threshold_f(e, 0.05, ocean=ocean) # the highest x% are declared high mountains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the values a bit, created new plots and want to collect all the important points in a single post:
The former "hills"-level was assigned to the highest 3% of the world, the following 7% (for a total of 10%) was declared plains.
The new values declare the following values, in relation to total land (in the code the values are relative to non-submerged land):
plains ~28%, hills 14%, low mountains 7%, medium mountains 3.5% and high mountains 1.8%.
So the former "hills" roughly correspond to "medium mountains" now. Thus the changes to river-, temperature- and ancient map-generation. The choices in there made sense, but the hill-level was very high.
The following two plots show the old and new height-levels:
The plains are set to 80% (of non-submerged land) since due to possible depressions in the land 100% would end up below sea-level. 80% leaves a little wiggle-room.
Everything else is chosen to follow a rough 2^x shape, as I estimated it from here (supposedly real data):
If anybody has more accurate data, please point me to it (other criticism is welcome, too). For now the values seem reasonable and the results of world-generation look good to me.
While I was at it I thought I might make the new satellite-map use the proper mountain-heights instead of the ones defined in draw.py - that way the output should coincide better with the other maps.
I then noticed that the mountain-thresholds were kind of improperly used. Hills were used as mountains and the higher mountainous areas probably never existed in any world because the values were too high.
Data for this PR can be found here.