Skip to content
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

elevation in ocen vs land #76

Open
tibor95 opened this issue Jun 16, 2015 · 11 comments
Open

elevation in ocen vs land #76

tibor95 opened this issue Jun 16, 2015 · 11 comments
Milestone

Comments

@tibor95
Copy link

tibor95 commented Jun 16, 2015

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
Copy link
Member

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
Copy link
Author

tibor95 commented Jun 16, 2015

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
Copy link
Member

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
#76 (comment)
.

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

@tibor95
Copy link
Author

tibor95 commented Jun 16, 2015

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
Copy link
Contributor

tcld commented Nov 16, 2015

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?

@psi29a psi29a added this to the v0.19.0 milestone Nov 17, 2015
@ftomassetti
Copy link
Member

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
Copy link
Contributor

tcld commented Nov 19, 2015

So this might be a pure Platec-issue?

@ftomassetti
Copy link
Member

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
Copy link
Contributor

tcld commented Nov 19, 2015

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
Copy link
Member

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
Copy link
Member

psi29a commented Nov 23, 2015

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants