can I use heightmap into the game to make the map look real?

General feedback and discussion of the game.

Moderators: Forum Moderators, Developers

Post Reply
User avatar
wingsfalcon
Posts: 25
Joined: April 12th, 2015, 6:09 pm
Contact:

can I use heightmap into the game to make the map look real?

Post by wingsfalcon » November 27th, 2017, 1:53 am

Heightmap
From Wikipedia, the free encyclopedia
This article is about modifying the geometry of surfaces - or the illusion of this - in computer graphics. For techniques which relate to recording distances from a viewpoint, see depth map.

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2009) (Learn how and when to remove this template message)
A heightmap created with Terragen
The same heightmap converted to a 3D mesh and rendered with Anim8or

In computer graphics, a heightmap or heightfield is a raster image used to store values, such as surface elevation data, for display in 3D computer graphics. A heightmap can be used in bump mapping to calculate where this 3D data would create shadow in a material, in displacement mapping to displace the actual geometric position of points over the textured surface, or for terrain where the heightmap is converted into a 3D mesh.

A heightmap contains one channel interpreted as a distance of displacement or “height” from the “floor” of a surface and sometimes visualized as luma of a grayscale image, with black representing minimum height and white representing maximum height. When the map is rendered, the designer can specify the amount of displacement for each unit of the height channel, which corresponds to the “contrast” of the image. Heightmaps can be stored by themselves in existing grayscale image formats, with or without specialized metadata, or in specialized file formats such as Daylon Leveller, GenesisIV and Terragen documents.

One may also exploit the use of individual color channels to increase detail. For example, a standard RGB 8-bit image can only show 256 values of grey and hence only 256 heights. By using colors, a greater number of heights can be stored (for an 24-bit image, 2563 = 16,777,216 heights can be represented (2564 = 4,294,967,296 if the alpha channel is also used)). This technique is especially useful where height varies slightly over a large area. Using only grey values, because the heights must be mapped to only 256 values, the rendered terrain appears flat, with "steps" in certain places.
Heightmap of Earth's surface (including water and ice) in equirectangular projection, normalized as 8-bit grayscale

Heightmaps are commonly used in geographic information systems, where they are called digital elevation models.
can I use heightmap into the game to make the map look real?

Tad_Carlucci
Developer
Posts: 300
Joined: April 24th, 2016, 4:18 pm

Re: can I use heightmap into the game to make the map look r

Post by Tad_Carlucci » November 27th, 2017, 2:04 pm

Ignoring the wall of text, and knowing what a heightmap is without it:

No.
I forked real life and now I'm getting merge conflicts.

User avatar
wingsfalcon
Posts: 25
Joined: April 12th, 2015, 6:09 pm
Contact:

Re: can I use heightmap into the game to make the map look r

Post by wingsfalcon » November 28th, 2017, 6:57 am

I actually want to make a real map of the world map to use as a background wesnoth game is definitely interesting, therefore I assume that if can use heightmap would be more interesting.

Tad_Carlucci
Developer
Posts: 300
Joined: April 24th, 2016, 4:18 pm

Re: can I use heightmap into the game to make the map look r

Post by Tad_Carlucci » November 28th, 2017, 8:30 am

You can do a static image for use during narratives or as a progress map. The game-board, however, will still need to be built out of terrain tiles.

I imagine you could write a program which took height-map data and classified it into Wesnoth map tiles. Given the right remote-sensing data (or Terragen output) you might even be able to get things like desert, grass, trees and snow to be placed; but I expect the results would be highly unsatisfying and likely not very interesting to play upon.
I forked real life and now I'm getting merge conflicts.

User avatar
Dugi
Posts: 4840
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: can I use heightmap into the game to make the map look r

Post by Dugi » November 28th, 2017, 2:34 pm

It's not so hard to do. To Lands Unknown is a campaign that uses 3D rendered images over the terrain to achieve fairly good graphics. Look how he has done it. There is no super secret about that, I've managed to replicate it a few years ago too when trying to place an oversized tower on the map.

User avatar
wingsfalcon
Posts: 25
Joined: April 12th, 2015, 6:09 pm
Contact:

Re: can I use heightmap into the game to make the map look r

Post by wingsfalcon » December 2nd, 2017, 5:35 pm

please tell me the secret? :geek:

User avatar
beetlenaut
Developer
Posts: 2205
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: can I use heightmap into the game to make the map look r

Post by beetlenaut » December 3rd, 2017, 4:25 am

"There is no secret" means, "You can look at the terrain code, too." Download To Lands Unknown, play the first scenario and see if that 3D effect is close to what you want. If it is, study the terrain files and graphics. (Also, turn on Preferences->Display->Show Grid to more-easily see what the author did.) I don't know how you would use a height map though: The units have to move around in a 2D grid, so 3D rendering the background doesn't really make any sense.
Campaigns: Dead Water
The Founding of Borstep
Secrets of the Ancients

Post Reply