Page 1 of 1

Water in heightmap...

Posted: 24 May 2021 12:34
by chrisroode
Hello. I have spent the last week or so looking up how to add water information to a heightmap. I have found numerous ideas on how to incorporate river formation information into the map, but I think I may have found a quicker and easier solution.

Keep in mind, I only want to store information of what tiles have river/lake water, not canals, roads...etc. I'm glad to make that stuff in the scenario editor.

So, the details of the formula could change but...use the sum of red and green channels for the height map, and the blue channel for water. This could be added as a checkbox on the open heightmap window, and would only override the river generation algorithm.

With this format, you would have the option of 512 different elevation levels present in the heightmap, and the appearance of water would be represented well in gimp. With this, we could easily create landforms like the great lakes that do not sit at sea level, or even Niagra Falls (which would really be niagra rapids). I think one key aspect of our rail network is how they have adapted to the natural formations rivers have created...from massive viaducts to tunnel and bridge combos. But the tools to create that seem to be too hard to implement in the game.

Attached is a sample palette using this formula. Elevation is low on the left, high on the right. The top three rows are all examples of colors that would be interpreted as water, and the bottom three are all interpreted as dry land. It would also be easy to interpret the balance of Red and Green channels for some biome information...but that might be getting too much too fast.
HeightMapWaterPalette.png
HeightMapWaterPalette.png (250 Bytes) Viewed 1677 times
So please let me know your thoughts!

Re: Water in heightmap...

Posted: 24 May 2021 14:50
by Eddi
there's an old concept lying around for an extended heightmap format:
https://wiki.openttd.org/en/Development ... o%20format

Re: Water in heightmap...

Posted: 24 May 2021 17:04
by chrisroode
Yeah, I was actually looking at that for a while. Honestly, that's more overkill for my personal tastes. I might see about making the land mass and fill it with canals in the scenario editor to make the rivers. I'm wondering if after all is said and done, I might be able to do a little swap trick to get all the canals to turn into rivers and lakes. That's another way to go about it.

I'm building my model railroad I never had, but building it in virtual space since I'm out of it at home. I've got time to work on it.

Re: Water in heightmap...

Posted: 24 May 2021 17:09
by chrisroode
Oh! nevermind! I found the river button in the scenario editor. Now I'm good to go! I'll just use my heightmap concept to plot out the landform, and then import a greyscale of the height map and manually add all the inland water. it'll give me time to think of what to name all the towns...

Re: Water in heightmap...

Posted: 24 May 2021 22:25
by Eddi
the problem with simply using the blue channel for water is that this breaks existing greyscale heightmaps.