By Tim King · Updated
Heightmap to 3D Terrain
View a Greyscale Heightmap as Terrain, Free
OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.
How the Heightmap Terrain Preview works
This heightmap to 3D terrain tool raises a greyscale image into a landscape. A heightmap is a greyscale image where brightness stands for elevation, the way terrain is stored for game engines, simulators and 3D printing. Drop one here and it becomes a landscape you can orbit, with a choice of colouring and height scale, so you can check a map from a noise generator or a real elevation dataset before importing it. Export the mesh as OBJ or download a PNG render. Nothing is uploaded.
Heightmap to 3D terrain: what to drop
Any PNG or JPEG works; the tool reads the brightness of each pixel, with black as the lowest point and white the highest. Colour images are converted to luminance. Sixteen-bit PNGs are read at eight bits by the browser, which is fine for a preview though the terracing of a low-contrast map will show. Square and rectangular maps are both fine; the terrain keeps the image's aspect ratio. Until you drop a file a sample of layered noise is shown.
Height scale and resolution
The terrain is ten units across. Height scale sets how tall pure white is in those units, so 2 gives a landscape a fifth as tall as it is wide, dramatic for mountains, and 0.3 suits gentle hills. Mesh resolution is the number of segments across the terrain: 128 is instant, 256 is a good default and 512 gives a quarter of a million vertices for fine detail at the cost of a moment to build. The heightmap is sampled with bilinear interpolation, so a small map on a large mesh is smooth rather than stepped.
Colouring
Terrain palette maps low areas to water and sand, the middle to grass and forest and the peaks to rock and snow, a quick way to judge whether your sea level and tree line land where you want. Height gradient runs from blue through green and yellow to red, useful for reading elevation bands. Greyscale shows the map as it is, and Wireframe shows the mesh itself. Flat shading gives a low-poly look that also exposes the facets of a coarse mesh.
Exporting
Download OBJ writes the displaced mesh with triangle faces, ready for Blender, Unity, Godot or a slicer for 3D printing. Colours are not included in the OBJ; apply a material or a texture in the destination application. Download PNG renders the current view at up to 4K.
Reading the result
If the terrain is spiky noise, the map has too much high-frequency detail; blur it or use a lower resolution. If it is a flat plate with a few bumps, the map uses a narrow range of greys; raise the height scale or stretch the levels. Terracing on smooth slopes is the eight-bit limit of the image.
Privacy
The image is decoded and converted to a mesh in your browser. No server receives it.
FAQ
What image formats are supported?
PNG and JPEG, as well as WebP and any other image the browser can decode. Brightness is read as height, with colour images converted to luminance. Sixteen-bit PNGs load but are reduced to eight bits by the browser.
Why is the terrain terraced?
Eight-bit greyscale has 256 levels, so a gentle slope becomes visible steps when the height scale is high. Use a map with more contrast, lower the height scale or use flat shading, which hides the steps in a low-poly look.
Can I export the terrain as a mesh?
Yes. Download OBJ writes the displaced plane with its triangles. It opens in Blender, Unity, Godot, MeshLab and most 3D printing slicers. Colours are not exported; add a material in the destination program.
What size should the heightmap be?
Anything from 64 pixels upwards works. The mesh resolution, not the image size, sets the detail of the preview; a 1024-pixel map on a 256-segment mesh is sampled smoothly. Very large maps only cost a moment to decode.
See also: all Mockups & 3D Making tools, Images, Audio, Video & Screen, PDF, SVG, Simulations & Screensavers, Generative Art, Chart Makers, 3D Model Viewers, Drawing Pads, Diagram Makers, 3D Science, Tracker Music.
Related tools
Normal Map Generator
Turn a height image into a normal map and preview it lit in 3D.
Perlin Noise Texture
Clouds, marble, wood grain and more from layered Perlin noise; PNG up to 4K.
OBJ Viewer
Drop an OBJ with its MTL and textures, orbit it, download a PNG.
STL Viewer
Drop an STL, orbit it, read its size and triangle count, save a PNG.
Image Resizer
Resize to a width, height or percent with the aspect ratio locked.