Heightmap Generator: Terrain PNG, RAW and STL
Choose a size, set the seed, scale and detail, and the tool draws a terrain heightmap with a live 3D preview. Download it as an 8-bit or 16-bit grayscale PNG or a 16-bit RAW file, or as a terrain STL with a base for 3D printing. You can also turn any picture into a heightmap.
How to make a heightmap
- 1
Pick a source
Make terrain from a seed, or add a picture. In the terrain mode the same seed always gives the same map, so you can come back to it.
- 2
Shape the land
Change the scale for more or fewer hills, the octaves and roughness for detail, and turn on ridges for mountains. Island edge lowers the border, and erosion softens steep slopes.
- 3
Adjust the map
Blur smooths it, the black and white points stretch the range, and invert flips high and low. The 3D preview updates as you change them.
- 4
Download
Take a 16-bit PNG or RAW for a game engine or Blender, an 8-bit PNG for quick work, or the terrain STL with a base for a 3D print.
What each setting does
These are the controls for the procedural terrain. Change one at a time and watch the preview.
| Scale | How many large hills fit across the map. A low number gives a few wide shapes; a high number gives many small ones. |
|---|---|
| Octaves | How many layers of noise are added. One octave is smooth and round, and six or more add the small bumps that make it look like real ground. |
| Roughness | How strong each extra layer is. Low values keep the land smooth, and high values make it craggy. |
| Ridged mountains | Folds the noise into sharp crests, so it looks like mountain ranges and not rolling hills. |
| Island edge | Lowers the border to zero, so the land sits inside the map as an island with sea around it. Useful for game worlds and display models. |
| Erosion | A few passes that slump steep slopes toward their neighbours. It rounds sharp spikes and gives softer slopes. |
| 8-bit or 16-bit | 8 bits give 256 height levels and show as flat terraces on large terrain. 16 bits give 65,536 levels and a smooth surface. |
What a heightmap is
A heightmap is a grayscale picture where the brightness of each pixel is a height: black is the lowest point and white is the highest. Game engines, 3D programs and mapping tools read it and push a flat grid up by those heights to make terrain. It is a very compact way to store land, because one picture holds the whole shape.
The tool makes the map in two ways. Terrain mode builds it from seeded noise, layer after layer, then optionally shapes it into an island and erodes it. Picture mode reads the brightness of any image you add, so a photo, a logo, a drawing or a gradient becomes a relief, and you can blur, invert and stretch it.
Everything is computed in your browser, and the preview shows the displaced terrain in 3D, so you can judge the shape before you download anything.
Using the file in Unity, Unreal and Blender
In Unity the terrain heightmap size is a power of two plus one, such as 513 or 1025, and both are in the size list here. Unity can import a 16-bit RAW file, and you choose the byte order on import: the RAW file from this tool is little-endian, which is the Windows byte order. Pick the same resolution you used here when you import it.
Unreal Engine imports a heightmap as a 16-bit PNG or RAW as well, but it has its own list of landscape sizes, for example 1009 and 2017. This tool makes the sizes in its list, so check the sizes Unreal offers and resize the picture first if yours is not on it.
In Blender, use the 16-bit PNG as an image texture on a Displace modifier on a subdivided plane. Sixteen bits matter here: an 8-bit map shows visible steps once the relief is high. The terrain STL is for 3D printing and for any program that wants a mesh: it has a flat base, straight sides and the relief on top, in millimetres.
Printing terrain as a solid
The terrain STL is a closed solid, so a slicer can print it without repair. Set the model width, the relief height from the lowest to the highest point, and the thickness of the base under the lowest valley. The mesh detail sets how many cells run along the longest side: 128 is a good balance of detail and file size, and 192 keeps more of a rough map.
A low relief, around 10 to 20 mm on a 100 mm wide model, prints faster and shows the slopes clearly. A taller relief looks more dramatic but has steeper sides, so print it slower. The model sits flat on its base, so no supports are needed, and a brim helps tall, narrow peaks stay on the bed. Check the preview for thin spikes before you print.
Making a model from a picture?
A heightmap is one way to turn a picture into a relief. You can also make an STL straight from an image, or describe a model in words and get a 3D result.
More 3D and map tools
Heightmap generator FAQ
Engine and software import options change between versions. Check the current import settings and size list in your program before you rely on a size or a byte order.