The short answer
In a hillshade, azimuth is the compass direction of the simulated sun (measured clockwise from north, 0-360 degrees) and altitude is how high that sun sits above the horizon (0 degrees at the horizon, 90 degrees straight overhead). The standard cartographic defaults are azimuth 315 degrees (north-west) and altitude 45 degrees. These two angles control only the appearance of relief, not any measurable terrain property — a hillshade is a visualisation, not an analytical layer.
Understanding them matters because the same DEM can look like a ridge or a trench depending on the light direction, and because mismatched defaults between tools are a common reason two hillshades of the same area look different.
How a hillshade is computed
A hillshade assigns each cell a brightness value (typically 0-255) based on the angle between the terrain surface at that cell and the light vector defined by azimuth and altitude. Internally the algorithm computes the surface normal from the cell's slope and aspect (using the 3x3 neighbourhood of elevation values), then takes the dot product of that normal with the illumination vector. Cells whose slope faces the light come out bright; cells facing away come out dark.
Because the calculation uses slope and aspect, three things feed into a hillshade besides the light angles: the cell size and vertical units of the DEM, and the z-factor that reconciles them. If elevation is in metres but the horizontal CRS is in degrees (geographic, e.g. EPSG:4326), the slopes are wildly exaggerated unless you set an appropriate z-factor or, better, reproject to a metric CRS first.
Azimuth: where the light comes from
Azimuth rotates the light around the compass:
- 0 degrees = light from the north
- 90 degrees = from the east
- 180 degrees = from the south
- 270 degrees = from the west
- 315 degrees = from the north-west (the default)
The reason 315 degrees is standard is a perceptual quirk: people unconsciously assume scenes are lit from the upper-left. Light a hillshade from the south-east (135 degrees) and many viewers see relief inversion — valleys read as ridges and peaks as pits. North-west illumination keeps the brain's "lit from top-left" assumption satisfied, so landforms read correctly.
The cost of a single fixed azimuth is that features running roughly parallel to the light direction get little contrast — a north-west-trending fault is poorly shown by a 315-degree light. The fix is either to rotate the azimuth to cross-light the feature of interest (try 045 to highlight north-west/south-east structures) or to use a multidirectional hillshade, which blends several light directions so no orientation is systematically washed out.
Altitude: how high the light sits
Altitude controls shadow length and overall contrast:
- Low altitude (20-35 degrees): long shadows, strong contrast, subtle features exaggerated — good for revealing faint archaeological or geomorphic detail, but rugged terrain can go almost black in shadow.
- Default (45 degrees): a balanced compromise that works across most landscapes.
- High altitude (55-75 degrees): the surface flattens and shadows shorten — useful where deep shadow would otherwise hide detail in steep terrain, at the cost of dramatic relief.
There is no single "best" altitude; it depends on whether you are trying to dramatise broad relief or tease out low-amplitude features.
Setting the angles in practice
GDAL — gdaldem hillshade exposes -az and -alt:
gdaldem hillshade -az 315 -alt 45 -z 1.0 \
-compute_edges dem_25831.tif hillshade.tif
Add -multidirectional (ignoring -az) for the blended version, and use -compute_edges to avoid a black no-data border at the raster edge.
QGIS — two routes. The layer Hillshade renderer (Symbology > Hillshade) has Azimuth and Altitude sliders for on-the-fly display. The Processing algorithm Hillshade (and Raster terrain analysis) writes a permanent raster with Azimuth and Vertical angle fields, plus a Z factor.
ArcGIS Pro — the Hillshade tool (Spatial Analyst) takes Azimuth and Altitude, with a Z factor parameter to handle unit mismatches.
In every tool, the azimuth/altitude defaults are usually 315/45 — but confirm, because differences in defaults (or in z-factor handling) are why the same DEM yields different-looking shades across software.
A worked example
You receive a 1 m LiDAR DEM in EPSG:25831 (metric) and want to map subtle fault scarps trending north-east.
- Check the DEM:
gdalinfoconfirms metric horizontal units and metres vertical, so z-factor = 1. - First pass (standard):
gdaldem hillshade -az 315 -alt 45for an orientation-correct base. - Cross-light the scarps: the scarps trend NE-SW, so light from the north-west (315) already crosses them well; if they trended NW-SE you would switch to
-az 045. - Lower the sun for subtlety: rerun at
-alt 30to lengthen shadows and exaggerate the low scarps. - Blend: generate a
-multidirectionalhillshade so scarps in all orientations show, and use it as the interpretation base while keeping slope as the measurement layer.
Common pitfalls and why they happen
- Relief inversion from a southern light. Setting azimuth near 135 degrees inverts perceived relief because viewers assume top-left lighting. Keep azimuth in the north-west quadrant unless you have a deliberate reason.
- Exaggerated shading on a geographic DEM. Running hillshade on an EPSG:4326 DEM without a z-factor mixes degrees and metres, producing absurd slopes. Reproject to a metric CRS or set the z-factor correctly.
- Black edge borders. Omitting
-compute_edgesin GDAL leaves a no-data rim. Add the flag. - Treating the hillshade as data. Azimuth and altitude are display choices; classifying hazard or steepness from a hillshade is invalid because the values change with the light. Use slope for measurement.
- Features invisible because they parallel the light. A single azimuth hides structures aligned with it. Rotate the azimuth or use multidirectional.
Validating the output
Confirm the DEM's horizontal CRS is metric (or that the z-factor compensates) before reading any shape into the result; check that no-data areas are masked rather than shaded; verify that perceived relief matches reality at a known landmark (a valley should read as a valley); and remember that any interpretation drawn from a hillshade must be confirmed against slope, aspect, or contours, which do not depend on illumination.
Bathyl perspective
We treat azimuth and altitude as cartographic instruments: they make landforms legible but encode no measurement. A hillshade is the base map for interpretation, paired with slope and aspect as the layers that actually quantify the surface. Documenting the light angles used keeps a relief map honest and reproducible.
Related reading
- Multidirectional Hillshade for Relief Maps
- Hillshade vs Slope
- Z Factor in Hillshade and Slope Analysis
- Why Your GIS Layers Do Not Line Up
- Terrain intelligence