Skip to content

Hillshade with projectionwizard, GDAL, QGIS and Blender

Zach Levitt edited this page Dec 31, 2022 · 6 revisions

IN PROGRESS**

  1. Go to Projection Wizard and define bounding box for map. Copy proj code and coordinates.

  2. Get DEM data

  3. Gdalinfo to get max and min of dem.

    gdalinfo -mm input.tif

  4. prepare raster for blender

    gdalwarp -t_srs '+proj=aea +lat_0=33.790633 +lon_0=67.6757813 +lat_1=28.9919149 +lat_2=38.5893511 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs' -overwrite afghanistan-dem.tif afghanistan-projected.tif && gdal_translate -of GTiff -ot UInt16 -scale -31 7833 0 65535 afghanistan-projected.tif afghanistan-projected-rescaled.tif

  5. BLENDER Steps to re-do

  • Change the dimensions of the plane to match the aspect ratio of your new heightmap.
  • Edit your output dimensions in Output Properties, so that the final image matches your new heightmap.
  • Edit your camera’s Orthographic Scale to match your new plane dimensions.
  • Go to the Shader Editor and choose your new heightmap file.
  • And don’t forget to change your color space back to Linear if Blender tries to reset it to sRGB.
  1. convert PNG to TIF with coords gdal_translate -of GTiff -a_srs '+proj=aea +lat_0=33.790633 +lon_0=67.6757813 +lat_1=28.9919149 +lat_2=38.5893511 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +type=crs' -a_ullr (UPPER LEFT) -1160186.438 746557.603 (LOWER RIGHT) 927280.328 -753678.566 afghanistan-hillshade-render-dark-ps-hazy.png afgh-hillshade-hazyrender.tif

  2. John Nelson tutorial: https://www.youtube.com/watch?v=-sitCuwXAaE&t=23s

Clone this wiki locally