WoLD Archives Search About Contact

World of Level Design

Tutorials to Becoming the Best Level Designer and Game Environment Artist (since 2008)

UE4 Heightmap Guide: Everything You Need to Know About Landscape Heightmaps for UE4

Category: UE4
April 29, 2020

Creating landscapes in UE4 manually using in-editor Sculpt Tools takes time. But you can speed up this process by using heightmaps.

In this guide you will learn everything you need to know about heightmaps in UE4.

Video Tutorial

What is a Heightmap?

A heightmap is a grayscale texture that stores landscape height information. Black color is low elevations or valleys and white color are high elevations or peaks. All landscapes in UE4 rely on heightmap data to create the terrain.

  • Black = low elevations or valleys
  • White = high elevations or peaks

Gray color that represents the middle of the heightmap is:

  • RGB = 149 (#959595)

Here is what a heightmap texture will look like:

Here is what it looks like after import in UE4:

Heightmap File Format

When exporting heightmaps for UE4, follow this format:

  • 16-bit
  • Grayscale
  • PNG or RAW file

Where Do You Get Heightmaps

There are many different ways to create heightmaps.

  • In UE4 using Sculpting Tools (heightmap gets created automatically as you sculpt)
  • In UE4 using Landscape Blueprint Brushes (experimental feature in 4.24+, heightmap gets created automatically)
  • Real-world data websites such as Terrain.Party, Heightmapper, etc.
  • Free software such as L3DT, Scape, Free Version of World Machine
  • Paid software such as World Machine, World Creator, Terragen, TerraSculptor etc.
  • Adobe Photoshop or Gimp

Landscape Scale

  • 1px = 1meter

If your Landscape's Overall Resolution is 4033px by 4033px then the size of your landscape is 4033 meters by 4033 meters.

You can find overall resolution of your landscape when you create the landscape in UE4:

If you have an existing landscape, select it and go to Details panel:

When you create a heightmap in external software you can define the texture resolution. For example in Photoshop:

Recommended Landscape Sizes for Heightmaps

You should use heightmap resolution listed in the Epic's Recommended Landscape Sizes.

So if you are in Photoshop, you create a new document with Width and Height listed in Overall Size (Vertices) column.

I've seen many people recommend using power of 2 texture sizes but that has created some issues.

Why to Use Epic's Recommended Landscape Sizes vs Power of 2 Texture Size

Reason to use Epic's Recommended Landscape Sizes has to do with a stretching effect around the edges of landscapes if using power of 2 heightmap sizes.

Here is an example of a heightmap created in Photoshop at 2048x2048 texture resolution and imported into UE4. This produces a stretching effect around the landscape edges and it usually means your heightmap resolution is wrong.

When creating heightmap resolution using the above Epic's Recommended Landscape Sizes such as 2017x2017 heightmap resolution. The landscape texture produced correct results:

My conclusion to use Epic's Recommended Landscape Sizes and not power of 2 texture sizes.

However, you could still use power of 2 texture sizes with an adjustment.

Can I Use Power of 2 Texture Sizes for Heightmaps?

Yes, you can still use power of 2 texture sizes.

What are power of 2 sizes?

  • 2x2
  • 4x4
  • 8x8
  • 16x16
  • 32x32
  • 64x64
  • 128x128
  • 256x256
  • 512x512
  • 1024x1024
  • 2048x2048
  • 4096x4096
  • 8192x 8192

Fix I found is to remove 1 component from the imported heightmap prior to creating the landscape. For example, importing 2048x2048 heightmap will give you Number of Components set to 17x17, which will create the stretched edge around the landscape:

If you reduce it by 1 component to 16x16, it will work as supposed to:

This applies for heightmaps generated in Photoshop and from real-world data websites such as Terrain.Party.

I haven't tried this with heightmaps generated from World Machine, World Creator or other 3rd party software yet.

Blocky Landscape After Heightmap Import

If you are getting blocky landscape after heightmap import such as this:

It is because you are using 8bit heightmap instead of 16bit heightmap.

Important: Heightmaps must be created and exported as 16bit grayscale textures (png or raw file type).

However it does produce an interesting effect that could be used for a specific style.

Importing Heightmaps Into UE4

To import heightmaps into UE4, go to Landscape Mode (Shift + 3) > Manage and click to Import from File:

Browse to the heightmap under Heightmap File:

The Section Size, Sections Per Component, Number of Components and Overall Resolution will be prefilled based on the heightmap resolution:

I usually keep the defaults that UE4 gives me. But if you know what you are doing and have some understanding of all these properties, you could adjust them.

Once you are ready, hit Import:

Fit to Data will reset the size back to what UE4 thinks is best:

Imported Landscape Heightmap is Too Intense

On heightmap import it is very common to get the height of the landscape that is too intense:

To fix this you need to lower Scale on Z.

Select the landscape and go to Details panel. Under Scale, lower the Z value. Make sure you have the Uniform Scale icon unlocked:

Also, during the import screen for the heightmap, you could lower the Scale Z there prior to creating it:

Exporting Heightmaps from UE4

You can export an existing heightmap from UE4 at any time. This will generate a 16bit PNG file of your landscape.

  • Go to Landscape Mode and Sculpt
  • Right-Click on the Heightmap and choose Export to File

Then you can open this texture in Photoshop, Gimp or any other image-editing software:

Re-Importing Heightmaps in UE4

Reimport a heightmap to an existing landscape:

  • Go to Landscape Mode and Sculpt
  • Right-Click on the Heightmap and choose Import from File

The reimported heightmap should match the size of your existing heightmap.

Next Tutorial

UE4: Create Procedural Landscape Heightmaps Entirely in Photoshop for UE4

Download "UE4 Landscape Essentials" Course

Learn EVERYTHING you need to know for how to create/sculpt landscapes and create/paint landscape materials entirely in UE4 without any external software with "UE4 Fundamentals Vol.2: Landscape Essentials".


Subscribe to receive NEW/UPDATED and FREE "UE5 Beginner's Quick Start Guide" PDF (90 pages).

Subscribe and Get Free UE5 PDF Guide

Visit this page for more info about the guide...

Follow WoLD





About World of Level Design

My name is AlexG. I am self-taught level designer, game environment artist and the creator of World of Level Design.com. I've learned everything I know from personal experimentation and decades of being around various online communities of fellow environment artist and level designers. On World of Level Design you will find tutorials to make you become the best level designer and game environment artist.

Read More »

Home Terms of Use/Trademarks/Disclaimers Privacy Policy Donate About Contact

All content on this website is copyrighted ©2008-2024 World of Level Design LLC. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.

World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of AlexG.

Template powered by w3.css