How to make a 3D heightmap in Photoshop

In this tutorial I will be showing you how to make a 3D heightmap in Photoshop CC!

This is more of an advanced level tutorial, so I will be skimming over basic instructions and cracking on with the core details.

Height Map

What is a height map?

A height map is a black and white image used to show height information.

  • The blacker something is, the lower the elevation.
  • The whiter something is, the higher the elevation.

Here is the example height map I used for the fancy .gif at the top of this post. Looks pretty unremarkable right?

Here’s what it looks like as soon as we hit the 3D button!! You can start to see now hilly regions, rivers and an ocean area.

So let’s make our own example height map to play about with:

First up, open a 3000 x 1500 px document. Size doesn’t really matter at this stage but be wary that huge documents will take longer to work with in 3D and tiny images may not show enough detail.

Now let’s create some random terrain:

On a new layer, press D to make sure that your colours are set to the default black and white. Then go Filter > Render > Clouds. You should have something like this :

Now, if you want to skip to the later part of the tutorial, you can go ahead and play around with this in 3D straight away. But for now we will make it look a bit more like a landscape.

Use the Quick Selection Tool (W) to select 1/4 of the end of your document. Make a new layer and fill this selection (G) with solid black. This will be your coast area and the sea level is lowest. (Remember that the darker something is the lower it is!)

You should end up with something like this.

Duplicate your clouds layer in case you make a mistake and want to go back to things and bring up your Burn Tool (O). Make the brush size fairly large and use a soft brush.

Set the Range to Midtones so that it affects the grey areas and put the exposure to 20% so that it has a rapid effect.

Start to brush the area nearest the coastline and bring it inland. You should barely be able to see the edge of the coast so use the Burn Tool until it’s a very dark grey.

Now, the lighter areas are going to be our hilly regions (or mountainous if they are high enough!), and it looks like a natural gap has appeared between some of these hills.

Time for a bit of worldbuilding! Let’s chuck in a river. Rivers start from high elevations and take the shortest route to the coast. Other rivers (tributaries) may join a main river, but they don’t split to go around obstacles like hills.

Pick a dark area of your map and start in a high elevation (whiter). On a new layer, grab your Pen Tool (P) and draw in a meandering river that starts thin at the top and wider at the mouth where it meets the sea. We’ll draw this in black because it’s going to cut into the landscape.

You should have something a bit like this – a good idea would be to look at real world examples and get a bit of inspiration!

Currently, if we chucked this into 3D the rivers would be like straight edged canals due to the contrast of pure black next to grey. We can fix that with some layer styles. Select your river layer, and add a layer style using the fx button (down near the new layer button).

Add an Outer Glow set to normal, 100% opacity and pure black. Tweak the spread and size according to your river and you should end up with something like this:

Next up we’re going to adjust the height of the hills. If you have any rogue white areas like the one in the top middle of my map, use the Burn Tool but select the range to Highlights. Do this on your clouds layer (don’t forget to make a copy incase you make a mistake).

Once you’ve reduced any stray hills, we’re going to even out the contrast in the main hilly area. Switch to the Dodge Tool and set the range to Shadows. We’re going to make the shadows a bit lighter so that the region is not so jagged when we put it into 3D.

Here’s what I’ve got so far! But if we compare it back to my other example at the beginning of this post, these light grey areas are going to be HUGE when we put them into 3D mode.

To fix this we’re going to adjust the levels with Layer > New Adjustment Layer > Levels.

Drag the lower white slider down – this reduces the highlights into the grey regions.

Make a duplicate of your clouds layer because we’re going to smooth out some of the rough bits by blurring it. If you’ve ever mucked up the terrain generation on a custom Minecraft map, you’ll end up with an incredibly tall and spiky world. We’re trying to avoid that šŸ˜€

After duplicating my clouds layer, I gave it a Gaussian Blur (Filter > Blur > Gaussian Blur) of about 8px, but if your document size is different you may need to adjust it accordingly. You’re aiming for a slight blur but maintaining the hill shapes.

Right! I think we’re ready for 3D time!

Let’s prep:

Make a new layer above your levels adjustment layer and go Image > Apply Image (make sure the blending mode is set to Normal before you apply). This makes a merged copy of all of your layers onto a that layer (whilst still leaving the old layers to be accessible if you need them later).

Select all of the layers that are beneath your top layer and put them in a group (Ctrl / Cmd + G). Then hide the group, you’ll see why in a moment.

This is what your layers should look like:

Before we go any further you will need to check your 3D preference settings (Edit > Preferences > Performance).

Make sure OpenCL is checked under the advanced setting.

Under the 3D tab, give Photoshop as much VRAM as you can to make rendering easier.

All set? Great! Click OK and select your top most layer (make sure the other grouped layers are hidden).

With your lovely height map layer selected, go to 3D > New Mesh From Layer > Depth Map To > Plane

After a few seconds of loading – this is the first thing you’ll see:

PRETTY FREAKING COOL, RIGHT?

When the other grouped layers were hidden it left the clean white background which makes things easier to see.

It gets better though, this is just in the top down view.

Click on the map and an axis should appear. Hover over the parts of the axis and you will be able to click and drag to rotate the map.

Use the different 3D tools to adjust the view of your map.

Here is what mine looks like now:

But it still looks a bit bumpy, right?

See the blue Z axis cursor there? The lower slider of that can be grabbed and dragged to adjust the scale along the Z axis.

I reduced mine to make a smoother, more natural feeling landscape.

I decided to rotate and scale this some more so that it filled my screen.

But it still looks a bit too dark to see anything. This is because of the lighting! To adjust it, click the map and then click on the light source.

A sphere with a stick on it will appear, which you can drag into position to change where the source of light is coming from.

I’m pretty happy with this! You can really see how each step has had an effect on the ladnscape. For example, the outer glow on the river made smooth banks rather than sharp cut edges.

From here, click the new layer button.

Any time you hop into 3D mode, it changes your workspace and you may need to revert back to access your normal tools. Do that now by going to Window > Workspace.

To make a flat image that we can work with visually now, on the new layer go Image > Apply Image.

That concludes my tutorial on how to make a 3D heightmap in Photoshop!

But that isn’t all you can do with this! From here you can go mad with photobashing stock images to create something like this, which I’ll cover in the next tutorial!

Need some more mapmaking inspiration? Gotcha covered in my Mapmaking & Toponymy post

4 thoughts on “How to make a 3D heightmap in Photoshop

  1. Great tutorial Wizard,

    This has me itching to get back into 3D work. Haven’t done any for a long time.

    Like Anna said, I’ve never use the 3D tool in Photoshop. It felt a bit backwards to use 3D in a 2D tool but looks like the Photoshop’s 3D tool has come a long way since it’s first incarnation. Also, I’ve seen Orange Box on Envato doing cool 3D map things in Photoshop, so I’m intrigued.

    Can you import 3D assets into Photoshop or is it purely extrapolating heighmaps and similar?

    I look forward to your future post on photobashing.

    All the best,
    Nate

  2. Pingback: My Homepage

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top