Skip to content

Pyramid Shader Skillshare

Zach Levitt edited this page Sep 21, 2022 · 14 revisions

Hillshades with Pyramid Shader

Screen Shot 2022-09-20 at 12 12 33 AM

How to use

To open the Java application, run the following line from your terminal:

Java -jar PyramidShader.jar

Prepare your digital elevation model

Before bringing your data into Pyramid Shader, you may want to reproject your data to a better projection for your use case.

# reproject
gdalwarp -s_srs 'EPSG:4326' -t_srs '+proj=aea +lat_0=37.5 +lon_0=-96 +lat_1=29.5 +lat_2=45.5 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs' -overwrite srtm_conus.tif srtm_conus_proj.tif

Hillshades often have too much detail, so here we downsample the DEM to half the pixel size:

# resample to a fewer pixels
gdalwarp -tr 1000 1000 -r cubicspline srtm_conus_proj.tif srtm_1km_conus_proj.tif

Pyramid Shader only accepts ESRI ASCII files, which you can convert to in QGIS or using this GDAL command:

#convert to ASCII format
gdal_translate  -of AAIGrid INPUT_FILENAME.tif OUTPUT_FILENAME.asc
gdal_translate  -of AAIGrid srtm_2km_conus_proj.tif srtm_2km_conus_proj.asc

Now that we have our ASCII file, here's what we can do:

What you can do

1. Scaling

  1. Edit -> Scale Grid Values
  2. Visualization tab -> Vertical Exaggeration for Shading (0 - 5)

2. Generalize

  1. Generalization -> Landforms Removal (1 - 10, blur level of generalization)
  2. Generalization -> Details Removal (0 - 100, degree of generalization)

Visualize

  1. Visualization -> Gray Shading (simple basemap)
  2. Visualization -> Exposition Color (customization based on lighting)
  3. Visualization -> Hypsometric Color (customization based on elevation)