Skip to content

Instantly share code, notes, and snippets.

View zombodotcom's full-sized avatar
💭
School

Zombo zombodotcom

💭
School
View GitHub Profile
@apollolm
apollolm / gist:350c21e54ac8d8129fae
Created December 31, 2014 17:51
Converting DEM (or other raster format) to RAW for import into Unity
gdal_translate -ot UInt16 -scale -of ENVI -outsize 1025 1025 Seattle_16Int.tif seattle_heightmap.raw
-of ENVI means it will write out RAW
This works fine. However, importing this .raw file into Unity produces an Vertically inverted terrain.
I opened with Photoshop CS, then did Image > Flip Vertical.
“Save As” Photoshop RAW. Options were blank, but saving worked.
Loaded into Unity as a terrain setting. Then manually set the Terrain height to 75, which when walking around seems right.