Grass and other details
Terrain settings

Working with Heightmaps

Terrain tools that affect height, such as Raise or Lower Terrain and Set Height, are reminiscent of painting tools available in image editors. In fact, Unity uses a texture behind the scenes to implement Terrain, hence the tools ultimately act as texture painting tools.

The height of each point on the Terrain is represented as a value in a rectangular array. This array is represented using a grayscale image known as a heightmap. It is sometimes useful to work on a heightmap image in an external editor, such as Photoshop, or obtain existing geographical heightmaps for use in your game.

Example heightmap
Example heightmap

Unity provides the option to import and export heightmaps for a Terrain. Click on the Terrain Settings button (rightmost button in the toolbar with the gear icon). Under Texture Resolutions (On Terrain Data), there are two buttons labelled Import Raw and Export Raw. These options allow the heightmap to be read from or written to the standard RAW format, which is a 16-bit grayscale format compatible with most image and landscape editors.


  • 2019–01–29 Page amended with editorial review

  • Updated functionality in 2018.3

Grass and other details
Terrain settings
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961