Water in heightmap...

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
chrisroode
Engineer
Engineer
Posts: 3
Joined: 26 Apr 2021 01:56

Water in heightmap...

Post 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 1519 times
So please let me know your thoughts!
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Water in heightmap...

Post by Eddi »

there's an old concept lying around for an extended heightmap format:
https://wiki.openttd.org/en/Development ... o%20format
chrisroode
Engineer
Engineer
Posts: 3
Joined: 26 Apr 2021 01:56

Re: Water in heightmap...

Post 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.
chrisroode
Engineer
Engineer
Posts: 3
Joined: 26 Apr 2021 01:56

Re: Water in heightmap...

Post 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...
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: Water in heightmap...

Post by Eddi »

the problem with simply using the blue channel for water is that this breaks existing greyscale heightmaps.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 7 guests