Mindwerks / worldengine

World generator using simulation of plates, rain shadow, erosion, etc.
MIT License
981 stars 127 forks source link

temperature and precipitation does not wrap properly #77

Closed tibor95 closed 8 years ago

tibor95 commented 9 years ago

I am not sure because no artifacts are seen in generated png, but when creating the map I got something like this: broken_map

See how the ice does not wrap.

Also when I received raw data from program and comparing 0x0 vs 199x199 pixel (mapsize is 200x200) values differ too much: x y temperature precipitation 0 0 -0.0154863047591 -0.20062381937 199 199 0.110205019679 -0.291956405397

But perhaps the problem is on my side, I dont know...

psi29a commented 9 years ago

From what I remember of worldsynth[1], temperature does not wrap around (left to right on x-axis). Weather (wind and rain) precipitation also goes into one direction, which also does not wrap around. It was good enough for giving us seeds for river generation and biome information.

These are things that can be improved on.

[1] Lands and Worldsynth merged to form worldengine.

tibor95 commented 9 years ago

OK, then, at least it is not me who is mistaken :)

2015-06-17 14:11 GMT+02:00 Bret Curtis notifications@github.com:

From what I remember of worldsynth, temperature does not wrap around (left to right on x-axis). Weather (wind and rain) precipitation also goes into one direction, which also does not wrap around. It was good enough for giving us seeds for river generation and biome information.

These are things that can be improved on.

— Reply to this email directly or view it on GitHub https://github.com/Mindwerks/worldengine/issues/77#issuecomment-112776910 .

psi29a commented 9 years ago

I love the screenshot anyway. :)

tibor95 commented 9 years ago

I am still tinkering with it :) And I like it as well :) :)

ftomassetti commented 9 years ago

Me too, the screenshot looks great! Yes, we should support better wrapping worlds: lands used to have very deep oceans at the border of the map and it was not intended to be wrapped :)

Now the altitude wrap but we have other things to fix, hopefully it should not be that difficult.

psi29a commented 9 years ago

We can always "cheat" and do some fuzzing along the x-axis to try to blend/merge things as a stop-gap with the existing algorithms. The best solution I feel would, again, involve some noise. ;)

psi29a commented 9 years ago

I've always wanted to try to create "real" rain shadows and work backwards from the backsides of mountains, but that requires that we also do real wind simulations instead of just picking a direction and blowing for the entirety of the map.

I'm wondering if we could use the heatmap that is generated as a basis to create air-currents. That might help. As air travels over water, it picks up water vapour and as it 'hits' land... loses water (as rain) which higher the elevation the more rain that is lost. Obviously after very high peaks, there wouldn't be much water vapour and as such would be rain-shadows after mountains.

Now that I talk about it... I want to work on it. :P

ftomassetti commented 9 years ago

it sounds a great plan :D

psi29a commented 9 years ago

@tibor95 are you a widelands dev? If so, you planning on using WE for map generation? If so, how can we help? :)

Update: https://wl.widelands.org/wiki/Contribute/ <-- help wanted: maps... I think we got you covered there. https://wl.widelands.org/developers/ <-- oh, ook, I found you there. :)

What are your (widelands) intentions? A tool for use with your map editor, or something that can be integrated into widelands (and it's editor) itself?

psi29a commented 9 years ago

oh god, look at that... drool I want this: http://earth.nullschool.net/ <-- wind/weather currents https://github.com/cambecc/earth http://hint.fm/wind/

tibor95 commented 9 years ago

@psi29a

I work mostly on computer player logic, but also other things as we are short of C developers.

Also, I have created couple of maps for the game.

Widelands has a random map generator - but very primitive... If you are asking if I intend to incorporate your code into widelands - than the answer is: not. There is huge amount of work between output of your generator and playable / balanced / polished map. My experience is that by hand you can never never never never :) create realisticallly-looking map. This is why generator like this is usefull.

I am working on lua script that will be able to process output of your program, do 90% of work and then I will spend quite a lot of time polishing the map... Once the script will be good enough I want to create more maps - but definitely not incorporate the algorithm into widelands itself...

ftomassetti commented 9 years ago

well, maybe we can help incorporating some features in WorldEnginer that makes easier for use to create this adapter. Then I think WideLands could benefit from nicer maps (though they would be still not 100% automatically generated) and we can get a bit more users and improve our software in the mean time. It sounds like a win-win :)

ftomassetti commented 9 years ago

@psi29a those projects definitely looks cool :) We need to update our roadmap :)

tibor95 commented 9 years ago

coastal erosion would be nice - If I understand, entire simulation is done without water, and it is only filled afterwards... I have to manually decrease coasts (make the elevation less steep) to allow buildings there. Most coast on the earth have beaches and slow ascend (I mean in the distance like 5 - 20 km from coast or so), dont they?

When the map will be finished I will mention you and acknowledge the credit where credit is due, of course :)

ftomassetti commented 9 years ago

Water is present (it has a limited effect in the plate simulations) and we have hydraulic erosion (which carves up rivers) but we do not have coastal, thermal and wind erosions.

For us is very good to have feedback from someone using the map in a game because it is a different perspective.

There are so many things to simulate a perfect world, it is an endless list... but as far as I know there are no better open-source world generator out there, our goal is definitely to become and remain the best one :)

tibor95 commented 9 years ago

river erosions are usefull too. It should form less steep coast or even estuary/delta or so...

I must admit for now I ommited rivers from map, because there was some problem extracting the data, I dont remember what it was now... and I am on the other computer now...

psi29a commented 9 years ago

@tibor95 that is super of you for giving credit. We would like to help further. If you can give us a run-down of all the things your script does or even let us see it, we can help git rid of that 90% overhead. We want to improve WE to make it more useful and of course to create great maps.

tibor95 commented 9 years ago

I can send you the script - it is run inside editor in widelands, but these are things that cannot be on done your side, like

psi29a commented 9 years ago

Honestly.. some of those things are things we want. ;) So saying that it cannot be done on our side is a bit of a misnomer. ;) Things we would like to see in WE:

So if you are already doing some of these, well maybe we can re-use your techniques in WE. :)

tibor95 commented 9 years ago

Look at the screenshot - the random map generated in widelands. Under "border smoothing" I mean f.e. elimination of small patches of different terrain, or simply make different terrains more compact or so...

widelands_editor

Trees and rocks - this is pure random, no logic there. Only on my map I group them more then here on this screenshot

Metal (mines) - more-less they are random, above some elevation - But no logic, no 'geological context' here :) So if you introduce terrains like "fertile land", rocks/mountains, metal ore rocks - this could be used. Of course fertile land is usually on flat areas... but mountains with ores - this could be indicated by your map.... Or maybe coal beds have probably specific localities... Usually we make coal mines in mountains, but in real world it is not this way, or is? I am not sure... :)

psi29a commented 9 years ago

I know a guy... phd in geology, he has hooked us up with reading material. :)

SolarizedRed commented 9 years ago

A couple of hobbyist-level sources incoming: If I may suggest some reading material myself, Geoff's Climate Cookbook: www.thumbprintpro.com/~tiqdreng/ClimateCookbook-Geoff.pdf is an brilliantly simple explanation of wind, currents, and climate. Worldbuilders have been using it for years, hopefully someone here will find some useful info from in. If worldengine could implement most of these steps on generated worlds, we would have one of the most amazing generators ever made (not that we don't already! ;p) I would definitely love to see smoother coastline slopes and possible more defined continental shelves. They would help make the maps more usable for digital elevation/game maps, and the continental shelves would be important for modelling currents, and therefore climate. On the subject of ore and geology, I found the blog here: https://geoheritagescience.wordpress.com/2013/11/15/the-geology-of-skyrim-an-unexpected-journey/ to be interesting. There are several articles in the series, fyi.

psi29a commented 9 years ago

For now, we are concerned only with x-axis wrapping.. left to right because we can easily wrapped this onto a cylinder or globe.

y-axis wrapping will likely not be supported, and if it is.. it will be a setting and not default.

tibor95 commented 9 years ago

psi29a,

but your model of plate tectonics is (wrapped) rectangle not globe, and is wrapped in both directons.... so this is an inconsistency.

psi29a commented 9 years ago

@tibor95, that is why I said "we are concerned only with..." meaning this is what we are aiming for, not for what is currently happening. This still needs to be fixed.

Wrapping along the y-axis is nice for games, but not our current goal.

esampson commented 8 years ago

I wrote some code a while back for lands to let the temperature and humidity noise wrap left and right back on lands. I'll have to double check and see if I ever submitted the code and if it ever made it into worldengine. I've got a couple of other adjustments I made concerning the percentages of terrains that are considered polar, desert, etc. that I know I didn't submit.

It looks like most of the problems are with wrapping up and down, but since the map is designed as a Miller Cylindical Projection/Mercator Projection those sides aren't suppose to wrap anyway and it would make very little sense to do so (you end up with a single 'cold pole' if you do that).

I'm currently having trouble getting the latest release (0.18) to run properly (if I try a resolution higher than 512x512 astar.py throws an error "AttributeError: 'NoneType' object has no attribute 'lid'"), so that's slowing me down, but hopefully I will be able to get it resolved, readd my code, and issue a pull request.

ftomassetti commented 8 years ago

Hi! Definitely some of your code was merged (you appear among the contributors: https://github.com/Mindwerks/worldengine/graphs/contributors) but we are looking forward to the adjustments and future contributions :)

If you are stuck feel free to ask for help, we definitely do not want to miss your contributions!

esampson commented 8 years ago

Right. I knew the biome code was merged. I just can't remember when I wrote my code for wrapping the noise function. I've had some environmental adjustments I've been sitting on that were designed to make the percentage of land types closer match Earth's than I never got around to submitting before life grabbed me and I can't recall if the wrap code was in the part I didn't submit or in the earlier part.

psi29a commented 8 years ago

It will eventually be nice to specify the type of projection, in that case it would make sense to chose when to wrap and when not to.

I think I saw a pull request from you come in, it seemed like you haven't rebased in awhile... Anyway, just reading through it, I saw a lot of commented code. Ideally, this code should be dropped. :) If we need it back, we'll go diving in git history to get it back.

esampson commented 8 years ago

Just looked at the results from the latest build. Precipitation and Temperature (and therefore Biome) maps are wrapping properly east to west. The don't really wrap north and south but then they aren't intended to.

We can probably close this.

ftomassetti commented 8 years ago

thanks for checking this @esampson . We are always looking forward to more of your nice contributions :)

Closing this one.