GIS Tools

Language

Made withfor the GIS community

Hillshade Generator

Generate shaded relief from a DEM GeoTIFF

Raster Tools

Drop DEM GeoTIFF here

Single-band elevation data

Load a DEM GeoTIFF to generate hillshade

About Hillshade

  • β€’ Hillshade simulates illumination on terrain from the sun
  • β€’ Uses Horn's method with a 3x3 neighborhood kernel
  • β€’ Common azimuth 315Β° (NW) gives natural appearance
  • β€’ Increase Z-factor for flat terrain to enhance detail

Sample DEM Files

Need elevation data to test? Download free DEMs from:

What Is a Hillshade?

A hillshade is a grayscale raster that simulates how a terrain surface would look when illuminated by a directional light source β€” usually the sun. Each output pixel encodes the relative brightness of the corresponding ground cell as if a low sun were casting shadows across the slopes. Hillshades transform an otherwise abstract Digital Elevation Model (DEM) into an immediately readable 3D-looking image, revealing ridges, valleys, gullies, terraces and human-made earthworks that flat colour maps obscure.

The Hillshade Generator on gis.tools takes a DEM GeoTIFF, computes shaded relief in the browser using a Horn-style 3x3 kernel, and exports the result as a new GeoTIFF or PNG. People search for "hillshade dem", "create hillshade", "hillshade gis", "shaded relief from dem" and "qgis hillshade alternative" because shaded relief is one of the most universally useful terrain visualisations in cartography, archaeology, geomorphology and outdoor recreation mapping.

Unlike a slope or aspect raster that quantifies a single terrain attribute, a hillshade combines slope and aspect with a chosen light source angle to produce something the human eye reads instantly as topography. It is the foundation of nearly every modern terrain map, from USGS topographic maps to Google Maps base tiles to OpenTopoMap.

How Hillshade Works

The classical algorithm β€” used by GDAL's gdaldem hillshade, ArcGIS Spatial Analyst, GRASS GIS r.relief, and SAGA β€” was formalised by Burrough and McDonnell and traces back to Horn's 1981 paper on shaded relief. For each interior pixel of the DEM, a 3x3 neighbourhood of elevation values is read, the local first derivatives in the X and Y directions are estimated, and these are combined with the sun's azimuth and altitude to produce a brightness value between 0 and 255.

Horn's Method

The X derivative is dz/dx = ((c + 2f + i) - (a + 2d + g)) / (8 * cellsize) where the letters refer to the 3x3 neighbourhood. The Y derivative uses the analogous formula along the column axis. From these two derivatives the algorithm computes slope and aspect, then uses the dot product with the sun vector to find brightness. A z-factor is applied to the elevations before the derivatives are taken β€” this lets you exaggerate vertical relief on otherwise flat terrain.

Sun Position

The two parameters that drive the appearance of any hillshade are azimuth (compass direction of the sun, measured clockwise from north) and altitude (angle of the sun above the horizon). By convention, cartographic hillshades use azimuth 315 degrees (northwest) and altitude 45 degrees. The northwest light source is a centuries-old cartographic convention that prevents an optical illusion where mountains appear inverted as basins.

Multidirectional Hillshade

A more sophisticated technique combines hillshades computed from several sun azimuths (typically 225, 270, 315 and 360) with weighted averaging. Multidirectional hillshade reveals features that would be hidden in shadow under a single light source β€” useful for archaeological prospection and gentle terrain.

Key Parameters and Options

Azimuth

The compass direction of the simulated sun. 315 (NW) is the cartographic default. Try 270 (W) to highlight north-south ridges, or 045 (NE) for unconventional but striking visualisations.

Altitude

The angle of the sun above the horizon in degrees. Low values (15-30) produce dramatic, shadow-heavy renders that emphasise subtle features but may saturate steep slopes; high values (60-75) flatten the relief but preserve detail in deeply incised terrain.

Z-Factor (Vertical Exaggeration)

A multiplier applied to elevation before computing slopes. If your DEM is in metres but the horizontal units are degrees (a geographic CRS), you must apply a z-factor to convert β€” at the equator, 1 degree is roughly 111320 m, so a z-factor of about 0.0000089 keeps slopes correct. For visual exaggeration on flat terrain, use z-factors of 2-5.

Cell Size

The horizontal pixel size of the DEM, in the same units as the elevation values, drives the slope calculation. The Hillshade Generator reads cell size from the GeoTIFF affine transform automatically.

Algorithm Variant

Choose between single-direction (classical) and multidirectional hillshade. Multidirectional takes longer but produces visually richer output.

Practical Applications

Archaeology and Lidar Prospection

Bare-earth Lidar DTMs revealed at sub-metre resolution have transformed archaeology. Hillshades β€” particularly multidirectional and low-altitude variants β€” expose Roman roads, medieval field boundaries, prehistoric ditches, hillforts and even individual house platforms hidden under modern forest canopy. Researchers in places like the UK National Lidar Programme and the LIDAR Cyfan in Wales routinely use shaded relief as their primary discovery tool.

Geomorphology and Landform Mapping

Geologists use hillshades to map fault scarps, alluvial fans, glacial cirques, drumlins, debris flows and landslide scars. Subtle linear features that vanish in colour ramps stand out boldly under raking light.

Cartographic Basemaps

Topographic basemaps for hiking maps, ski piste maps, national park brochures and online tile layers nearly always include shaded relief. Combining a hillshade with a hypsometric tint (colour-by-elevation) produces the iconic look of Swisstopo, IGN and USGS topo maps.

Hydrology and Watershed Analysis

Before delineating watersheds with flow accumulation algorithms, hydrologists eyeball the DEM with a hillshade to confirm the data is sensible β€” pits, sinks, artefacts and stream-burning errors all show up as visual anomalies.

Snow Avalanche and Backcountry Safety

Backcountry skiers and avalanche forecasters use hillshades on aspect maps to identify wind-loaded slopes, terrain traps and start zones. Pairing shaded relief with the Slope/Aspect Calculator is a standard avalanche reporting workflow.

Civil Engineering Site Selection

Engineers planning a road, pipeline, transmission line or solar farm scan a hillshade to spot rolling terrain, drainage channels and steep cuts before sending a survey crew.

Forestry and Timber Cruising

Foresters use shaded relief to design cut blocks, plan skid trails and identify sensitive riparian buffers along streams that otherwise hide in dense canopy.

Step-by-Step Workflow in gis.tools

  1. Open the Hillshade Generator page on gis.tools.
  2. Drag a DEM GeoTIFF (Float32 or Int16, single band) into the page. The file is parsed in the browser using geotiff.js β€” nothing leaves your machine.
  3. The viewer detects the cell size and units. If your DEM is in a geographic CRS, the tool warns you and suggests a z-factor.
  4. Set the sun azimuth (default 315) and altitude (default 45). Drag the sliders to interactively preview the result.
  5. Choose single-direction or multidirectional hillshade.
  6. Click Generate. The shaded relief is computed pixel-by-pixel with a Horn 3x3 kernel.
  7. Preview the result on the map and export it as a GeoTIFF (preserving georeferencing) or as a PNG with a world file.
  8. Optionally feed the same DEM into the Slope/Aspect Calculator, Raster to Contours, or Raster Value Probe to derive related products.

Worked Example: A 10 m USGS DEM of the Wasatch Front

You download a 10 m USGS 3DEP DEM tile covering the Salt Lake City Wasatch Front. The file is Float32, 10812x10812 pixels, in NAD83 UTM zone 12N, with elevations from 1280 m to 3580 m. You drop it into the Hillshade Generator. The cell size is detected as 10 m, so no z-factor adjustment is needed. You leave the sun at NW 315 / 45 and click Generate. After a few seconds the viewer shows a crisp shaded relief with sharp ridge lines, deep glacial cirques and the alluvial fans where the canyons exit onto the valley floor. Switching to multidirectional reveals a faint terrace along the Bonneville shoreline at about 1565 m β€” a relic of the Pleistocene lake that once filled the basin. You export the hillshade as a COG GeoTIFF for use as a basemap layer in QGIS.

Common Pitfalls and Gotchas

  • DEM in a geographic CRS (degrees) without a z-factor produces nonsense slopes β€” apply roughly 1/111320 at the equator, or reproject the DEM to a metric CRS first using the EPSG Reprojector & Coordinate Converter.
  • Float DEMs with NaN or sentinel nodata values can introduce dark artefacts at the edges of valid data β€” set the nodata value explicitly.
  • DEMs with artefacts (striping, voids, edge mismatches between tiles) become brutally obvious under shaded relief; consider filling sinks first.
  • A z-factor that is too high produces a "molten plastic" look; one that is too low looks washed out. Iterate.
  • Single sun azimuth can create the inverted-relief illusion if the light source is from the south. Stick to NW or NE for traditional viewers.
  • Lidar DEMs at very high resolution may show roof outlines, vegetation and benches β€” use the bare-earth DTM not the surface model (DSM).
  • Shaded relief alone is monochrome; combine it with a colour ramp on slope or elevation for a richer cartographic product.
  • Edge pixels are computed with a smaller kernel and may look noisy; clip them after generation.

Tips for Best Results

  • Start with the cartographic default (azimuth 315, altitude 45) and only deviate when you know why.
  • For archaeology, drop the altitude to 25-30 degrees and try multidirectional to lift faint earthworks.
  • Reproject DEMs to a metric projected CRS (UTM or a national grid) before generating shaded relief.
  • Use Float32 DEMs rather than Int16 to avoid stair-stepping artefacts on gentle slopes.
  • Pair shaded relief with a hypsometric tint or a slope colour ramp using a multiplicative blend.
  • When mosaicking adjacent tiles with the Raster Mosaic Preview, generate the hillshade after mosaicking to avoid edge seams.
  • Save the result as a Cloud-Optimized GeoTIFF for fast tile serving.

Comparison with Other GIS Approaches

GDAL's gdaldem hillshade is the de facto reference implementation and uses Horn's algorithm. QGIS exposes both GDAL and SAGA hillshade tools, with SAGA offering more options including curvature-based and analytical hillshade. ArcGIS Spatial Analyst includes both classical and multidirectional Hillshade tools. The Hillshade Generator on gis.tools mirrors the GDAL approach exactly so the results match gdaldem hillshade -of GTiff input.tif output.tif to within rounding. The advantage is that you do not need to install anything, your DEM stays on your machine, and you can iterate on parameters with live preview.

Performance Considerations

Hillshade is an embarrassingly local operation β€” each output pixel depends only on its 3x3 neighbourhood β€” so it parallelises trivially. The browser implementation uses typed arrays and a single-pass row scan; on a modern laptop a 4000x4000 DEM computes in about a second. A 12000x12000 tile takes 5-10 seconds. Files larger than that may need to be tiled or downsampled with Raster Resampler. Multidirectional hillshade roughly quadruples the work.

Data Privacy and Browser-Based Processing

Your DEM never leaves the browser. The file is read with the File API, decoded by geotiff.js, processed with WebAssembly numerical kernels, and exported via a download blob. There are no uploads, no accounts, no telemetry. This matters for proprietary Lidar acquisitions, sensitive site surveys, military terrain data and classroom environments where IT policies forbid third-party uploads.

Related GIS Concepts

Slope and Aspect: The two intermediate quantities that hillshade depends on. The Slope/Aspect Calculator exposes them as separate rasters.

Sky View Factor: A more sophisticated terrain visualisation that simulates ambient hemispheric light rather than a single sun, often preferred by archaeologists for revealing subtle features.

Z-Factor: The conversion factor between vertical and horizontal units. Critical when your DEM uses a geographic CRS.

Hypsometric Tint: Colouring elevations along a continuous ramp (greens-browns-whites) and combining with hillshade for a cartographic look.

Bare-Earth DTM vs DSM: A Digital Terrain Model represents ground level only; a Digital Surface Model includes vegetation and buildings. Use the DTM for terrain analysis.

Frequently Asked Questions

How do I create a hillshade from a DEM in the browser?

Drop your DEM GeoTIFF into the Hillshade Generator and click Generate. Default sun parameters (NW 315 / 45) work for most landscapes.

What sun azimuth should I use?

Stick to 315 degrees (NW) for cartographic outputs to avoid the inverted-relief illusion. Use 270 (W) or 360 (N) only when you have a specific reason.

Can I make a multidirectional hillshade?

Yes. Toggle the multidirectional option to combine four light sources for richer detail.

Why does my hillshade look like flat noise?

Either your DEM is in degrees and you forgot the z-factor, or the elevation range is tiny. Reproject to UTM and re-run.

Does the Hillshade Generator output a GeoTIFF?

Yes. The output preserves the input CRS, affine transform and bounds so it overlays correctly on the source data.

Can I use this for Mars or Moon DEMs?

Yes β€” as long as the input is a valid GeoTIFF with consistent units, the algorithm is the same.

Related Tools on gis.tools

100% client-side processing - your data stays private and never leaves your device