- Home /
Generate 16bit terrain map from real world elevation data
I'm looking for some tips, advice or even a tutorial on how to generate 16bit terrain height maps from real world elevation data. I'm able to generate 8bit height maps from tiff and jpg I found via google img search and converted to 8bit raw format in gimp. The 8bit versions cause noticeable stepping in the terrain due to the limited brightness levels it can represent. I'm currently using VTBuilder to open and export data from elevation data I sourced here. The supported export formats are -
3TX
ArcInfo ASCII Grid
BMP
ChunkLOD
GeoTIFF
MSI Planet
PNG(16bit greyscale)
RAW/INF(MS Flight Sim)
RAW(Scaled to 8bit for Unity)
STM
TIN
TerraGen
VRML
XYZ ASCII
The exportable tile size always seem to be 1201x1201, which means they need to be scaled to a unity terrain compatible resolution (513,1025,2049,etc)
The 16bit PNG seemed promising, so I've been attempting to resize and convert to raw using gimp and imagemagick, but all I've managed to get is messed up spiky terrain of various flavors. I also tried both raw types (which still need to be scaled) but no luck.
There are so many variables and opportunities to get it wrong (resolution, byte order etc.) I was hoping someone who has been down this road already might share some experience.
Thanks!
Answer by tanoshimi · Dec 23, 2014 at 09:13 PM
Thanks. That is pretty much what I was after. I noticed that the gdal_translate cmd referenced in the tutorial uses the -scale flag, which for me introduced noticeable terrain stepping. Omitting that flag produced a better result...
Answer by Gaume · Mar 12, 2016 at 02:53 PM
I use a c# script for reading GeoTiff format, which is the one used for MANY DEM product such ASTER2. Then convert directly to heigthMap then terrain.
oupss not seen your comment... you can access $$anonymous$$ute X $$anonymous$$ute dem tile (worlwide coverage non filtered Aster) using the following link http://dem.t{0}.tiles.mygeolive.com/Demservice/tile({x},{y}) where {0} is 0-9 value (used for web js client load limitation) where x,y are the $$anonymous$$ute integer index return as 181x181 png projection are web mercator, then it's easy to put standard image tile on top of it, as you already doing in GIS Terrain loader Whole ASTER DE$$anonymous$$ Data are store into Azure cloud. If you want to use it as commercial, let me know, i can bundle the whole service code for on premise installation. Aster data are open sourced. http://dem.t0.tiles.mygeolive.com/Demservice/tile(3736,888) for somewhere in the alps... Js client integration sample http://live2.dotvision.com/live?guid=580178b6-6888-4c8c-ace5-7801d6a82600⟨=us∫ro=true hit 3D button. G.
Your answer
Follow this Question
Related Questions
Understanding heightmap RAW imports 1 Answer
Convert RGB heightmap to greyscale 2 Answers
Terrain - Raw problem 0 Answers
How to read raw files for custom terrain generation system? 0 Answers