Creating Shaded Relief in Blender

Welcome! This is the long-awaited text version of my Blender relief tutorial, following on the video series I did a few years back. If you’ve already seen the videos and are returning for a refresher, note that I use a somewhat different method now, so don’t be surprised if you encounter unfamiliar settings.

This tutorial will take you an hour or two to get through — but I think the results are quite worth it. More importantly, note that your second relief will take much less time than this first one, since most of the work you’ll be doing can be saved and simply reloaded for future relief projects. Once you’ve invested the time to get comfortable with it, this technique can fit within ordinary production timelines.


This tutorial is, and will remain, free, but if you derive some value from it, you are welcome to make a donation to support my continued work.


Version History

Version 2.1 (Oct 30, 2019) — Added step in Chapter 6 to change the heightmap’s color space, to avoid lowlands being washed out.

Version 2.0 (Sep 29, 2019) — Major revision for Blender 2.80. All screenshots replaced to reflect the new UI. Many steps rewritten to reflect new interface elements and new names for tools/features/menu items. Removed some no-longer-needed material, such as UV unwrapping, are no longer needed. Thanks to Diane Fritz for her notes on changes, which helped me double-check my work.

Version 1.2 (May 14, 2018) — Added new section in Chapter 7, pointing readers toward the idea of rendering relief on a pre-colored plane. Suggested by Anton van Tetering.

Version 1.1 (Jan 29, 2018) — Changes to Chapter 6: Added section on denoising, and alterered render settings to suggest using Limited Global Illumination. Both of these tips are courtesy of Dunstan Orchard.

Version 1.0 (Nov 16, 2017) — Initial release of text version.

Preamble

Why Blender? In short: Blender makes better-looking relief. Most of the cartographers I know do their shaded relief in ArcMap or another GIS program, or sometimes they use Photoshop or Natural Scene Designer. All of these programs use basically the same algorithm, and you get a pretty similar results, as seen below. This standard GIS hillshade looks OK, but it’s rather noisy and harsh.

Hillshade.jpg

As Leland Brown has put it, this looks sort of like wrinkled tinfoil; full of sharp edges.

Blender, on the other hand, is designed specifically for 3D modeling. People use it for CGI, animations, and plenty more cool stuff. It’s intended to simulate the complexities of how light really works: the way it scatters, the way it reflects from one mountain to the next, and the way its absence creates shadows. Here’s Blender’s version of the same area:

Blended.jpg

Notice how it’s softer and more natural. The peaks cast shadows, and then those shadowed areas are gently lit by light scattered off of nearby mountain faces. Notice also how the structure of the terrain becomes more apparent. In a standard hillshade, I think you lose the forest for the trees. Here’s a side-by-side comparison of the two methods:

Compare.jpg

Blender’s result not only looks more attractive and realistic, it’s also more intelligible, I think. Certain features of the landscape become more apparent — look at the valley below, running northeast-southwest. It’s hard to tell how wide it is, or that it’s a valley at all, when looking at the standard hillshade. But the Blender relief makes its structure clear, thanks to the improved modeling of lighting.

Valley.jpg

Whereas the standard hillshade algorithm makes pixels lighter or darker based solely on which direction they’re facing, Blender looks at the scene’s context, and whether that pixel is in a mountain shadow or is in a position to catch scattered light. The result is a more attractive, more understandable relief.

Table of Contents

This is a fairly long tutorial, as I mentioned, so for your convenience I’ve split it up into multiple chapters.

  1. Getting Set Up: We begin by downloading Blender and preparing a heightmap
  2. Blender Basics: Here, we’ll learn to navigate the software
  3. The Plane: We shall set up a plane mesh and apply a heightmap texture
  4. The Camera: Let us prepare to image the plane correctly
  5. The Sun: In which we cast light upon the plane
  6. Final Adjustments: Here, lingering settings are finally adjusted
  7. Advanced Thoughts: For your consideration on future days

Please enjoy, and if you see any errors (either typographical or of fact), please do let me know. I hope that this tutorial empowers you to produce work you can be proud of!

36 thoughts on “Creating Shaded Relief in Blender

  1. Pingback: Blender Tutorial | somethingaboutmaps
  2. Pingback: Creating Shaded Relief in Blender – GeoNe.ws
  3. Pingback: What I did in 2018: An Annual Report | somethingaboutmaps
  4. Pingback: Historically rendered 3D maps by Scott Reinhard – Matt's Homepage
  5. Pingback: Mount Ruapehu – Tyrrell Maps
  6. Got any advice for using this/your same workflow on a DEM that isn’t square or rectangular? I have a county DEM the has an irregular shape and the resulting TIFF export contains white space in the outside portions of the extent. The portions that have “No Data” alter the render. Would a PNG with transparent background solve the problem of using a DEM that has an irregular shape?

    • I’ve dealt with this situation when using DEMs that leave the ocean as “no data.” I would recommend filling those empty areas with black, rather than white. Transparency won’t do it, I don’t think. Even in a transparent raster, every pixel is filled in with some number, just a number that certain programs choose to ignore and depict as invisible. Blender likely wouldn’t use that to make the plane vanish, since the DEM is being read only to modify the plane’s height. With those areas being white, as you’ve see, the plane gets very high and creates shadows over the “real” area. If you make it black, they’ll be very low and stay more out of the way, not casting shadows.

  7. Pingback: Playing With 3D – Daniel Fourquet
  8. Pingback: Vintage Shaded Relief in Photoshop Pt. 2 • Naturalistic Coloring – CARL CHURCHILL
  9. Pingback: Virtual to physical: translating a 3D landscape to a printed model | GIS & You
  10. Pingback: Shaded relief with BlenderGIS, part 1 | The Wandering Cartographer
  11. Pingback: Shaded relief with BlenderGIS (2019), part 1 | The Wandering Cartographer
  12. Pingback: Surselva – Irene de la Torre Arenas
  13. Pingback: Annual Report: 2019 | somethingaboutmaps
  14. Pingback: Yellow – #30DayMapChallenge – South Arrow Maps
  15. Super nice tutorial series Daniel, kudos! Just did the whole series and rendered the IBCAO polar dataset with 15% resolution. Turned out quite nice, see Twitter mention. Would NEVER have been able to do that without your extensive input. Written for humans, thanks for that!

    However, in the final “Advanced thoughts” tutorial, are you sure about replacing the “Displacement” node with a “Math Multiply” node? I’ve seen this in another tutorial which is built on top of yours as well: https://www.barthoekstra.com/blog/photo-realistic-shaded-relief-using-blender

    When I did that, it seemed like it shifted the camera perspective considerably towards southwest, more or less proportional to the multiplication value. Only when I switched back to “Displacement” as for the ordinary BW render, it started to behave again.

    Didn’t you have that behavior yet? Maybe a Blender version issue? I’m on the latest, v2.81. The rest I configure mostly as you did, with the exception of some minor unrelated settings.

    • Thanks for the kind words! That screenshot was older, thanks for noticing. It was provided by someone else for an earlier version; I’ll get a new one in there today.

  16. Pingback: Shipwrecks of the Arctic – Data Stuff
  17. Pingback: Using Blender to Create Beautiful Maps – Zoey Armstrong
  18. Pingback: Hledání nejlepšího DEM – srovnání SRTM, ASTER a ALOS – <0174 : Blok alias zápisník
  19. Thanks for the awesome tutorial Daniel! Have you had success with large renders (something like 12000×7200)? Wondering if you have any tips and tricks!

    • I have definitely done some large renders successfully. I am not sure offhand how large they were, but several thousand pixels per side. It’s possible to run into memory limits depending on your hardware, though. You could split the DEM into chunks, too (I used to do this in an older workflow). Make sure to leave some overlap, so that shadows from one chunk don’t abruptly stop at the edge of another chunk. If you’re willing to spend a bit, you can also get things done faster and avoid tying up your computer by using a render farm.

  20. Pingback: How to Make a 3D Map in Blender | Wesley Barr
  21. Pingback: Hillshade Cartography – PHANNISA
  22. Thank you so much for this useful tutorial! But i have one question: at step six Rescale you have the following formula: (Pixel Value – 120) ÷ (1500 – 120) * 65,535

    What do i have to fill in at Pixel Value? My raster information says that my Pixel Depth is 32 Bit.

    • This is a formula run on a pixel-by-pixel basis in your raster calculator. So in the example, it would take the value of each pixel, regardless of what that value is, and subtract 120 from it, before dividing it by 1500-120, and multiplying by 65,535. The correct syntax will vary based on the GIS program you are using, so you’ll need to read up on the details of your GIS program’s raster calculator.

  23. Pingback: Dica de software: Blender 3D - Geoprocessamento
  24. You are very important in spreading this methodology. I am particularly grateful. But many people have difficulties mainly in the preparation of the DEM in Qgis or Arcgis. Why not make this tutorial a video? Thankful!

  25. Hello Daniel. First off, thank you so much for creating this detailed tutorial aimed at enhancing understanding in your readers instead of giving them random numbers and formulas to use. It’s a great approach and very, very helpful!
    I’ve been having fun adding 3D terrain to old maps or to topographic maps. I have a question for you relating to a problem I’m having that I haven’t been able to track down and fix. When I pull a grayscale image from Tangram Heightmapper and plug it in to my node setup it creates a layered look in my mesh. It literally looks like a 3D print instead of having smooth vertical slopes.
    A broader angle for the sun softens this, as does increasing the Dicing Scale on the adaptive subsurf. I’m just wondering if I’ve missed a setting somewhere. I’ve turned on Shade Smooth for the mesh as well.
    Some of my previous files don’t seem to have this issue, but the ones I’ve done recently are very noticeably layered-looking. I’ve used THeightmapper with auto-exposure on and off, I’ve created my grayscale maps by zooming in to export multiple files to stitch together in Photoshop, and I’ve tried it by capturing the entire area in one export. None of these things seem to affect it. I can slightly mitigate the layering by adding noise to the grayscale image and then blurring it. But this adds a lot of other texture to the mesh.
    Any insights you can give me would be greatly appreciated!
    Again, thank you for this detailed tutorial.

    • Glad you enjoy the tutorial and are putting it to fun uses! It sounds like you’re having a vertical resolution problem. I’m not familiar with Tangram Heightmapper, but perhaps it’s outputting 8-bit images? The tutorial talks about this a little, in its discussion of rescaling the DEM. The basic idea is that an 8-bit image has 256 levels of elevation, so you’ll notice the “steps” between levels. With a 16-bit image (if you have the data to support it), you’ll have 65,000 steps, so things will look smooth. But, that requires going back to the original elevation dataset. If Tangram is just outputting a simple 8-bit heightmap, there’s no way to process that to get more detail. You can smooth it in the ways you’ve been doing so, which can help some (and I’ve done the same, in a pinch), but to really avoid terracing, you’ll need original DEM images that you then process yourself to preserve as much detail as possible.

      • Thanks Daniel! I think you are correct that the source I’ve been using is merely 8-bit. I’ll try working with better DEMs in the future. Thanks again for your tutorials!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s