Skip to main content
Topic: [solved]r2171 - Level of sea is wrong with height map (Read 4245 times) previous topic - next topic

[solved]r2171 - Level of sea is wrong with height map

Unfortunately, new settings in r2171 have a problem with height of Height Map.
We can't use the correct level of sea.
If I set sea level down, all sea change to land.

Re: r2171 - Level of sea is wrong with height map

Reply #1
I am very sorry, but I did not get the core of your report. The heightmap in question has only one level below, thus it will land one level down, aparently. Or is this a misunderstanding?

EDIT: Maybe this is because most maps feature only a lighter grey (i.e. one depth level)? When I added more shades of grey, I got also reasonable heightlevels.

Re: r2171 - Level of sea is wrong with height map

Reply #2
Could you please test it by yourself ?
http://www.simutrans-germany.com/files/upload/Japan_RLE.zip

My only wish is reading a height map correctly as before. Thank you.

[EDIT]
I tested old versions.
r2099 is Okay, but r2101 have this problem.

So, change in r2100 or r2101 cause this problem.

Re: r2171 - Level of sea is wrong with height map

Reply #3
This map does not contain correct sealevels (only two greys). Other than that the land conturs are the same. With this 5 min effort from google maps the depth are correct (albeit the land heights are still not streched correctly, but this is more for testing.

Returning to the old smoothing is not really possible, because it can create incorrect landscapes with some maps.

Re: r2171 - Level of sea is wrong with height map

Reply #4
I really don't understand what you are taking about.
What I want to say is ground level is wrong.

In Japan map, color of the Kanto Plain is RGB(130,130,130) [51%].
Many document say, when water level is 4, RGB(128,128,128) [50-54] is ground level.
So, RGB(130,130,130) shoul be ground. but in current nightly, it is sea.

http://maps.simutrans.com/tutorial.html

http://www.simutrans-germany.com/wiki/wiki/tiki-index.php?page=de_ppm_Karten_erstellen&bl=y

And attached Italia map which is from maps.simutrans.com is also have RGB(128,128,128) [50-54] ground and is not loaded correctly in nightly.


Re: r2171 - Level of sea is wrong with height map

Reply #5
Ah, the ground water level was rounded, thus one errors. Second was, that there is an offset of one needed, albeit this was not changed between 2101 and 2099. Maybe it was only then uncovered, but was hidden by a side effect.

Thank you.

Re: r2171 - Level of sea is wrong with height map

Reply #6
Although not directly related to this topic, in the new nightly, in dataobj/einstellungen.cc, line 496 should be changed to (not to open a bug report for something so simple):
free( (void *) city_road_type );

Otherwise, in gcc, it won't compile.

[solved]r2171 - Level of sea is wrong with height map

Reply #7
Solved in r2178. thank you.