Creating a Terrain for Unity 3D with Photoshop

Terrains in Unity may be created from height maps designed with Photoshop.

unity-photoshop-terrain

Height maps should be sized to a power of two plus one (65, 129, 257, 513, 1025, 2049 in pixels) for width and height.

In Photoshop, start by creating a new image by File » New

photoshop-new-terrain

Adjust foreground and background colors to height thresholds. Lighter colors will raise elevation to peaks, while darker colors sink to origin.

photoshop-foreground-background-colors

Seed the terrain height map by rendering clouds. In Photoshop, select Filter » Render » Clouds.

photoshop-filter-render-clouds

This alone may be used to generate a terrain.

Applying additional filters may enhance the terrain, such as adding difference clouds in Photoshop by selecting Filter » Render » Difference Clouds.

photoshop-filter-render-difference-clouds

Further enhance by applying Photoshop's Plastic Wrap filter:

terrain-plastic-wrap

Numerous filters enhance a terrain, such as:

terrain-bas-relief bas relief
terrain-craquelure craquelure
terrain-cutout cutout
terrain-fresco fresco
terrain-sumi-e sumi-e
terrain-watercolor watercolor

Unity imports terrain height map data as Photoshop Raw with a single channel.

In Photoshop, remove all channels except one.

photoshop-channels

In Photoshop, save as a Photoshop Raw (.raw) file.

photoshop-raw

photoshop-raw-options

In Unity, create a new terrain selecting Terrain » Create Terrain

create-terrain

This will create new terrain asset in Unity.

unity-new-terrain

unity-new-terrain-asset

In Unity, import the raw height map by selecting Terrain » Import Heightmap - Raw… and select the Photoshop raw image.

unity-import-heightmap

unity-import-heightmap-options

In Unity, the terrain will reflect the height map.

unity-terrain

Flattening the center of the texture and painting texture, here is an example desert scene.

unity-flattened-center-terrain

unity-terrain-paint-texture