Creating and Using Custom Heightmaps and Layers

Creating and using custom Heightmaps and layers for your landscapes.


Sometimes your Landscape will require that you use external programs to create both the height map and layers that are needed. Unreal Engine 4 (UE4) does accommodate this style of workflow and everything that you need to be aware of when using a workflow like this, is in this guide.


If this is your first time using the Landscape tools, you might want to check out the Landscape Overview first, as what is going to be covered here may be too advanced for new users.


Landscape Layers are special textures that help to break up the look and feel of the Landscape.

Layer Formats

Landscape layers can be imported from external programs via implementation of the ILandscapeHeightmapFileFormat and ILandscapeWeightmapFileFormat interfaces. The Editor's existing support for image-based importing has been converted to use this interface and is still fully supported. Images for the built-in formats are still required to be grayscale, 8 bits per pixel, single channel files in either .PNG or .RAW format. If you are creating layers in Photoshop, you should use the following settings when creating a new document:


Layer Import

Importing Layers that were made in an external application is a simple process but you first need to make sure that you have a few things set up in order to get everything to work smoothly.

  1. You first need to make sure that you have a Landscape to work with. If you do not have one now, please create one.

  2. Once your Landscape has been created, you need to make a new material for it. For this example, we will be making a very simple Material but this Material could easily be expanded upon if needed. The Material that you need to set up should look something like this.


  3. Once the material is created, apply it to the Landscape Actor so that you have something that looks like this.


  4. Now with the material applied, it is now time to add Layer Info to our Landscape Actor. Add a Layer Info object for each layer you are going to have. For this example, we are going to have three. To read more about Layer Info objects, check out the Layer Info Objects section of the Paint Mode document.


  5. When completed, your Target Layers section should look like this.


  6. Now it is time to import our layer. To do this, all you need to do is right-click on the Target Layer you want to import a layer for, and then select the layer that you want to import from the dialogue box that pops up.


  7. If your layers are not output at the correct size, you will receive the following warning.


    To fix this issue, you need to determine how big the Landscape layer you are trying to import over is supposed to be. To find this out, you can export any layer by right-clicking on the Target Layer you want to look at, and then select Export from the dialogue box that pops up. Once you do that, you will be asked to save the layer file somewhere on your PC. After the file has been saved, you can then open it up to determine what size your layers should be.

Height Maps

Using external tools to create a base heightmap to work off of inside Unreal can be a good way of speeding up the Landscape creation process. The base heightmap can then be imported, cleaned up, or modified using the editing tools inside Unreal Editor to customize the Landscape, making it a better fit with the world and desired game play.

Height Map Formats

When exporting heightmaps from external programs, only the following formats are usable inside UE4.

  • 16-bit, grayscale PNG file.

  • 16-bit, grayscale .RAW file in little-endian byte order.

If you are using Photoshop to export your heightmap, make sure that you set up your new images like the following. Photoshop_HeighMap_Example.png

When making a heightmap in an external application, a value of White (255 in all channels) will represent the highest point on your height map and a value off Black (0 in all channels) will represent the lowest point on your heightmap.

Importing Custom Heightmaps

Importing a Custom Heightmap is quite simple. The process is initiated from the New Landscape section of the Landscape Modes panel. To active it, select the radio box labeled Import from File to expose the ability to import a heightmap from a file.


To select a Heightmap to import, press the button next to the box that says "Please specify a heightmap", and then select your Heightmap using the file browser.


Now let's try importing a custom height map. For this example, we will be using the image below.


Make sure you right-click Save as on the image (above) to download it to your PC.

Once you have the heightmap saved to your PC, it is now time to use it in the Landscape tools.

  1. Open up the Landscape tool and go into Manage Mode.


  2. Selected the option to Import from File.


  3. Select the Heightmap you want to import from the Heightmap File section.


  4. When the above has been completed, press the Import button to create a new Landscape based off of your heightmap.


Before pressing the Import Button: Landscape_Import_Heightmap_Setup.png

After pressing the Import Button: Landscape_Import_Heightmap_Finsh.png

Now you have a new Landscape to work with that is based off the Heightmap that you just imported.

Select Skin

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback