Blending my Way to Relief

Throughout my brief cartographic career, I’ve been a fan of shaded relief, but I’ve also struggled to create one that I found satisfactory. I haven’t had the time to learn how to draw relief manually, and so I rely on the old standard digital hillshade algorithm, plus the judicious application of Photoshop (having learned from folks like Tom Patterson and Tanya Buckingham how big of a difference it can make). I’ve also posted here on some efforts to do a bit of spatial analysis to improve the end result. But, I am still often dissatisfied with the final product.

Lately, though, I’ve been experimenting with something that I think could represent a substantial improvement over the standard techniques for doing a digital hillshade. I’ve been messing around with Blender, a free 3D modeling program.

I got started with Blender because I wanted to do some oblique terrain maps (a la Natural Scene Designer), and because I also wanted to do some 3D printing for a project I’m working on. But I also realized it might be the solution for shaded relief. So, I used a DEM to create a 3D terrain mesh inside Blender, then positioned my camera directly above it, and started doing some rendering. Here’s what I’ve gotten so far.

First off, here’s one that mimics what you’d get out of ArcMap or some other standard GIS algorithm. Nothing special, but it’s a good starting point for comparison.

A fairly plain effort that looks much like a standard hillshade

It’s pretty plain. The standard hillshade algorithm looks at each pixel, determines its slope and aspect, and uses that to figure out how bright it should be. That’s about it. It doesn’t look at where each pixel sits in the context of its surroundings, or figure out how light bounces around or causes shadows. It produces decent results, but it’s pretty simple and unrealistic. So, let’s add some more realism:

With some basic lighting effects added
With some basic lighting effects added

This one is much better. All I’ve done here is turn on two things: shadows and light bounces. Places facing away from the sun are now in shadow, with the shadow length depending on the height of the terrain. The light bounces allow us to still see the shadowed areas, though. Blender figures out that the backside of the mountain, while not receiving direct sun, will still be illuminated by light striking nearby ridges and scattering around. So, it traces the path of the light rays and determines how light moves around the scene to create a much more realistic result. In ArcMap, you can turn on shadows in your shaded relief, but it just makes everything black if it’s caught in a shadow; it’s not equipped to re-light those shadows by looking at light scattering.

We can also change our light angle, or strength, to simulate different times of day. Here’s one with a low sun angle, coming from the west.

Mount Rainier at dusk
Mount Rainier at dusk

Again, you could aim for something like this in a GIS program, but it’s not likely to turn out quite so nicely, because it doesn’t have the ability to calculate the way light bounces around and dimly illuminates those east-facing slopes. They’d just be in a solid black shadow. Or, if you didn’t turn on shadows, they’d be lit as though the mountain isn’t in the way.

There are a lot of parameters you can change in Blender that simply aren’t available in a GIS program, as well. We can, for example, add a second light source. Here’s the same image as above, except with some moonlight coming from the southwest:

With moonlight
With moonlight

We can also do things like adjust the “size” of the sun, giving us more of a point-light effect, as though we’re on a planet without an atmosphere to spread out the incoming rays:

A harshly-lit landscape

Now it’s as though we’re on the moon, or some other harshly-lit place, with much sharper shadows.

Finally, my favorite is probably this one:

A more sketched look
A softer, more sketched look

I think it looks the closest to a handmade relief. It’s still not the same, but it’s probably the closest I’ve seen an automated algorithm come to something human-produced. It’s got a nice fuzziness that comes from turning down the number of light paths that Blender calculates. I’ve also made the surface smoother, which gives it a bit more specular reflectivity and produces an interesting effect that I quite like. Since we’re working in a 3D modeling program, we can change what material the surface is made from, if we want to try interesting things. Here’s one more where I’ve made the terrain out of a glossy material, instead:

A shinier terrain
A shiny world

In the end, I think this could be the way to go for a lot of my future shaded relief needs. It does, admittedly, take longer to accomplish. Each test render can take several minutes. But I think the quality is a lot higher. I don’t think this is necessarily the be-all, end-all, last word in doing automated relief. It could probably be improved further via some of the same techniques people use to improve standard GIS hillshades. But I think it’s a better foundation than the standard algorithm, and I’m looking forward to playing around with it more.

At some point in the future, I’m hoping to put together instructional materials on using Blender for shaded relief. But I don’t think I’m quite ready yet. I don’t know the program well enough to be able to say that I’m doing things in the most efficient and effective manner, and I haven’t quite pieced together the best way to explain everything clearly. In the meanwhile, I encourage you all to experiment with it, and to tell me if you’ve tried anything similar in the past. I imagine I’m not the first to think of this.

6 thoughts on “Blending my Way to Relief

  1. One of the things that I’ve been thinking about a lot lately is the full control over lighting setups that a 3D app would give you. When doing standard hillshades, we tend to only use a single infinite light source, trying to model the Sun at various positions (while ignoring the positive effects that atmospheric scattering has on the actual Earth). But in 3D, we can artificially light our models with multiple different types / colors / intensities of lighting from multiple directions to achieve a wide variety of finished renders.

    One place I’ve been looking to for inspiration is looking at lighting diagrams for portrait studios, with all of their soft boxes, bounce lights, key lights etc at different color temps. See also some of the diagrams and behind the scenes stuff that Pixar puts out on how artificially complicated their lighting setups are to make things look “natural.” Lots of possibilities here. Thanks for putting this up and I look forward to seeing more!

    1. There’s definitely a lot more that can be done with this sort of setup, for sure. I’ve not explored more complex lighting much, but I do now use two suns when rendering relief in Blender. The first one is the traditional sun from the upper left, and the second one is straight overhead and much fainter. I use it to give a bit of illumination to deep canyons and other places that the main sun can’t reach.

      1. Sweet work here. I’ve done similar with Maya & Metal Ray. I also work with L3DT (A “Large 3D Terrain” generator, and the Unreal 3 engine for real-time renders.

Leave a Reply

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

You are commenting using your 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