Global Mapper 16.2 and later can export elevation and raster data to Unity Raw format.
The Unity RAW Terrain/ Texture command can be accessed through File > Export > Raster/Image Format... or File > Export > Elevation Grid Format. Individual layers can also be exported from the Control Center by right-clicking on the layer and going to Layer > EXPORT. Either method will export the loaded terrain and elevation data.
The export to Unity RAW Terrain/ Texture command creates a RAW terrain file with unsigned 16-bit values scaled from 0-65535 for the elevation range of the data being exported. It also creates a JPG texture file covering the same area as each RAW terrain file. This means the height values are scaled to use the full data range for the export bounds. It may be necessary to scale the terrain values first, using theAlter Elevation Values tab for the layer, in order to align the export with other existing terrain data.
The Terrain Size and Texture Image Size are used to create the RAW texture file and JPG image files. Consult the Unity documentation for a specific Terrain Size values that may be required for some versions of the program.
Options to mirror data horizontally and/or vertically when exporting data can be applied to the export. Using the check boxes to Horizontally Mirror Data or Vertically Mirror Data each RAW data file generated in the export will be flipped horizontally and/or vertically, and the JPG rotated 180 degrees to conform with Unity requirements.
The option to Use Mac Byte Order will create the output RAW files encoded with network byte order, referred to as 'Mac encoding' commonly used in applications like Photoshop and Unity.
If not exporting the full extent, first specify the bounds for the export on the Export Bounds tab
Set the Terrain size and Texture Image Size to specify the pixel dimensions of the output terrain (raw) and texture (jpg) files.
There are two methods to derive a tiling scheme for the export extent:
- Select Specify Terrain Resolution. Specify the resolution to use for the terrain layer. This will auto-derive tiles that match the tile dimensions listed above, while preserving the terrain resolution.
2. Select Use Layout Specified on Tiling Tab to Fill Bounds. Use the Tiling tab to define a custom tiling
scheme. The linear resolution of each pixel will be auto-calculated to match the tiling scheme and tile dimensions specified in Terrain Size and Texture Image Size.