Importing a Heightmap - Lumberyard Getting Started Guide

Importing a Heightmap

You can import a prebuilt heightmap to quickly place mountains and valleys in your level. Lumberyard supports using heightmaps generated by third party tools such as World Machine. A heightmap is a raster image that stores values, such as surface elevation data, for display in your Lumberyard game levels.

Lumberyard uses heightmaps in the following ways:

  • Bump mapping – Uses 3D data to create shadows in materials

  • Displacement mapping – Determines the geometric position of points over the textured surface

  • Terrain mapping – Converts heightmap into a terrain mesh.

Lumberyard also has a set of terrain generation and manipulation tools that you can use to create terrain from scratch.

For this tutorial, you'll create terrain by importing a heightmap.

To import a heightmap

  1. Open the Terrain Editor by choosing Tools, Terrain Editor.

  2. Set the maximum height of your terrain by choosing Modify, Set Terrain Max Height.

    Enter 128.

    This means that the tallest point in your terrain will be no more than 128 meters.

  3. Choose File, Import Heightmap.

    The default path may appear as \dev\Cache\StarterGame\pc\startergame. You must navigate to \dev\StarterGame\Textures\Heightmaps and select FTUE_heightmap_test.tif.

    If you opened this file in an image viewer, it would look like this. Black represents minimum height, and white represents maximum height.

                    View of the heightmap image, which you can open in an image viewer.

    In your viewport, you see the initial creation of valleys and mountains as determined by the heightmap.

  4. Press Ctrl+S to save your level.