Mindwerks / worldengine

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

elevation in ocen vs land #76

Open tibor95 opened 9 years ago

tibor95 commented 9 years ago

Hi,

I found that elevation of a field in ocean can be higher then elevation of a field in land - is it intentional? F.e. here I have a map where lowest land is -0.027 and highest ocean is 0.999. Not an problem for me but perhaps it is bug in your code...

ftomassetti commented 9 years ago

this is intended: the way we find where there is ocean is starting to fill the map with water from the border until we reach a certain percentage of ocean. In this way we can also have depressions. In this case it seems a too low depression, so we should probably use more wind erosions to fill it a bit.

tibor95 commented 9 years ago

As you mentioned erosion - is it possible to regulate it? I would need more of it, because our game is not able to have so steep slopes. Of course this is also problem of scale.

ftomassetti commented 9 years ago

currently there is not an option to control erosion but about the problem of scale: we have arbitrary values for altitude, so I guess you can interpret them as you want when generating your map. In other words if you have a value of 1.0 you can decide it corresponds to an altitude of 100 meters or 1Km and 1.1 to 110 meters or 1.1 Km. Depending on the mapping you decide to do the slope will be more or less steep.

Cheers, Federico

On Tue, Jun 16, 2015 at 9:00 AM, tibor95 notifications@github.com wrote:

As you mentioned erosion - is it possible to regulate it? I would need more of it, because our game is not able to have so steep slopes. Of course this is also problem of scale.

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

Website at http://tomassetti.me http://www.federico-tomassetti.it GitHub https://github.com/ftomassetti

tibor95 commented 9 years ago

I have very specific problem - no beaches - coasts are too steep :) No place for ports, but I will manipulate the elevation probably with some quadratical function

tcld commented 8 years ago

About that very last comment: The steep coasts could be related to draw.py, line 248+249 respectively draw.py, line 340+341. There is an artificial gap introduced to separate the oceanic part of the world from the land part. I am (still) not sure what purpose it serves. The current grayscale heightmap generation circumvents that. Although if you had used a map exported via GDAL before (if that was available at the time) that gap might not have been introduced in the first place (again, the current version doesn't do it, but I don't remember the previous version well enough to know what it did). All of that is pure assumption, though.

By the way: @ftomassetti, can this be closed?

ftomassetti commented 8 years ago

I also noticed the problem when exporting to TMX: we have very high mountains close to sea. I guess it depends on how much terrain is represented by a tile, it determines what we mean by close. Perhaps we should just rescale the map to an higher resolution and use interpolation to have less steep coasts. Ideally we would like to have many beaches and a few cliffs

tcld commented 8 years ago

So this might be a pure Platec-issue?

ftomassetti commented 8 years ago

I guess that yes, it is due to Platec but I do not see as an issue, it is just a matter of resolution.

Look at this map of the Earth which has a resolution similar to our map:

The Andes are near the ocean. If we could zoom in we could see that the coast is not necessary steep but looking at things at this zoom level it seems that there is a tall mountain and attached there is ocean.

tcld commented 8 years ago

I understood that, but we can't really make Platec give us higher-resolution maps (I assume that 4k x 4k cannot easily be surpassed). And if we start interpolating, all coasts will be flat to start with.

ftomassetti commented 8 years ago

Yes, I do not have a solution for that :) Unless we have other factors to smooth/make steeper coasts. Perhaps we could have an interpolation function which is affected by other factors.

I think it is something which should be considered when increasing the resolution but not at Platec level. Consider also that Platec is sort of complex C++ code so the less it does the better.

psi29a commented 8 years ago

It is an issue of resolution, I solved this by up-scaling the image (4x) and adding a slight Gaussian blur. This allowed me to load the image into OpenMW (Morrowind) and have smooth transition between sea and land.

So maybe a solution would be to take results from platec and upscale it before we get to it. Someone asks for 512x512, and platec works with a world of size 256x256 for example...