A downloadable tool for Windows

Download NowName your own price

Mapper is tool for generating heightmaps from real world elevation data. Mapper takes elevation data from Mapbox and converts it to heightmap files compatible with Unity and Unreal. Heightmap files are RAW 16-bit images. Mapper supports tiling so multiple heightmaps can be stitched together seamlessly.

See the source code on Github: https://github.com/vazgriz/Mapper

Usage

When you launch Mapper for the first time, a settings window will open. You need to provide a Mapbox API key. You can access this window again from File > Settings.


Mapper allows the user to graphically select an area to convert to a heightmap. Drag the selection box over the area you want to map.


The user can configure several grid settings to control the heightmap output. The current grid settings can be saved as a JSON file.

The `Grid size` parameter controls the size of the selection on the map in kilometers.

`Output size` controls the total dimensions of the heightmap data for all tiles. Common sizes are 1024, 2048, and 4096.

`Tile count` controls the number of tile subdivisions of the heightmap data. `Tile size` displays the size of an individual tile. For example, if `Output size` is 8192 and `Tile count` is 2, then each tile will have size 4096.

`Output size` must be evenly divisible by `Tile count`.

The output file will have the dimensions `Tile size + 1` by `Tile size + 1`. Adding 1 is needed to ensure that neighboring tiles have 1 overlapping row/column.

Click the "Inspect" button to download the elevation data tiles for the selected area. Elevation data is cached at `AppData\Roaming\Vazgriz\Mapper\tilecache`.

When the tiles are downloaded, Mapper displays the minimum and maximum heights of the selected terrain. You can copy these values to the `Custom height min` and `Custom height max` parameter to control the heightmap values of the output. Or you can alter the values to select a different height range to output.


For example, the height values here are from 1104 meters to 2386 meters. The height difference is 1282 m. The custom height parameters allow you to control how these elevation values are mapped to the 0-65535 heightmap range.

I've selected a custom height range of 1100 m to 2400 m, giving a custom height range of 1300 m. That means the heightmap should be scaled to 1300 m size when imported into a game engine.

`Flip output` inverts the Y value of the output heightmap. If false, then Y+ is north. If true Y- is north. X- and X+ are always west and east respectively.

`Apply water offset` controls whether water features are included in the output heightmap. Certain water features like rivers, lakes, and oceans are marked in the Mapbox data. Mapper can use this data to lower areas on the heightmap covered by water. The depth the terrain is lowered is controlled by `Water offset`. This does not produce accurate height data for underwater areas, but it does mark the location of water features so artists can modify it later.

`Force .zip export` causes a zip archive to be created even if only one tile is output. If multiple tiles are output, a zip archive is always exported. A zip export contains the tiles and the JSON file that generated the image. The JSON file is equivalent to a grid settings save file.

StatusIn development
CategoryTool
PlatformsWindows
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
Authorvazgriz

Download

Download NowName your own price

Click download now to get access to the following files:

mapper-v0.1-alpha.zip 66 MB

Comments

Log in with itch.io to leave a comment.

Great idea, but the API key requires card information to obtain - are there any alternative sources of the height data?

(1 edit)

What do you do with the json and .raw file that is generated?
How do you create a 16 bit grayscale png file from them to be used as a heightmap?  This is what Unreal Engine uses.

Mapper creates a file in the ".raw" format, which contains 16-bit height data. It does not output a .png file. Unreal (as far as I know) can import .raw files.

The .json file is the save file that allows you load the exact same coordinates, output size, etc in case you need to regenerate the heightmap at a later time. This file can be saved in your documents folder, the VCS repo for your game, or anywhere else

Which API key?

(1 edit) (+1)

Mapbox calls the API key an "Access Token". The same access token is used for Vector and Raster API, which is what Mapper uses. I believe you get an access token with some free usage just by signing up with Mapbox