Unity Terrain Tutorial: How to Make Terrain in Unity 6 (Sculpt and Paint)

Illustration of a holographic mountain landscape on a wireframe grid

Unity’s Terrain system gives you hills, valleys, painted ground, forests and grass that would take days to model by hand, and it stays fast enough for big open areas. It’s also full of settings that do nothing obvious until they suddenly halve your frame rate. This Unity terrain tutorial goes from an empty scene to a finished landscape in Unity 6 (URP): sculpting, texture painting with Terrain Layers, trees, grass and details, then the performance settings that matter and fixes for the usual problems.

Quick answer

To make terrain (ground) in Unity, choose GameObject > 3D Object > Terrain. Set its width, length and height in the Terrain’s Terrain Settings tab (not with the Transform’s Scale, which terrain ignores), then use the Paint Terrain tools to raise, lower and smooth it, add Terrain Layers to paint textures, and finish with Paint Trees and Paint Details for grass. Install the free Terrain Tools package for erosion, noise brushes and heightmap import.

Create a Terrain and Set Its Size

GameObject > 3D Object > Terrain creates a Terrain GameObject and a TerrainData asset in your Assets folder. The asset holds the heights, textures and vegetation. The GameObject just displays it.

Before sculpting anything, open the Terrain Settings tab (the gear icon in the Terrain component) and set the size, because changing resolution later resamples your work:

Setting What it means Sensible start
Terrain Width / Length Size in metres (Unity units) 500–1000 for a level, 1000+ per tile for open worlds
Terrain Height The maximum possible height 200–600. Set it to your tallest mountain, since precision is spread over this range
Heightmap Resolution Number of height samples per side 513 or 1025
Detail Resolution Grid resolution for grass placement 512–1024
Control Texture Resolution Resolution of the texture-painting splatmap 512–1024

Scale matters: a Unity unit is one metre, and a default player capsule is two metres tall. A 1000 x 1000 terrain is a full kilometre, which takes a while to walk across. Drop a capsule on it early to sanity-check the scale.

Install Terrain Tools (Recommended)

The built-in brushes work, but the free Terrain Tools package (Window > Package Manager > Unity Registry > Terrain Tools) adds much better ones: erosion (hydraulic, thermal, wind), terrace, slope flatten, noise, and brush masks that limit painting to slopes or heights. It also adds the Terrain Toolbox (Window > Terrain > Terrain Toolbox) for creating multi-tile terrains, importing heightmaps and batch-applying layers. Everything in this guide works without it, but erosion alone is worth the install.

Sculpt the Landscape

Select the terrain and click the Paint Terrain tab (the brush icon). The dropdown lists the tools:

  • Raise or Lower Terrain: click to raise, hold Shift to lower. Use big, soft brushes and low strength first.
  • Set Height: flattens to a fixed height. Use it for building plots, roads and lakesides. Hold Shift to sample the height under the cursor.
  • Smooth Height: removes the lumpy look raise/lower leaves behind.
  • Stamp Terrain: stamps a brush shape as a mountain or crater in one click.

Shortcuts: A/S adjust brush strength, [ and ] change brush size, and Ctrl (or Cmd) plus drag resizes the brush in the Scene view.

A workflow that looks natural: block out the big shapes with large soft brushes, add a few mountains with Stamp, flatten the playable areas with Set Height, run an erosion brush (Terrain Tools) over the slopes so they look weathered, then Smooth. Erosion is what makes terrain stop looking like a blanket over a pile of balls.

Lower the whole terrain first if you want lakes or valleys below the “ground” level. Set Height to, say, 50 m across the whole terrain (use the Flatten All button), so you can dig down as well as build up.

Paint Textures with Terrain Layers

Terrain textures are Terrain Layers: small assets holding a diffuse texture, an optional normal map, a mask map, and tiling size.

  1. Choose Paint Texture in the tool dropdown.
  2. Click Edit Terrain Layers > Create Layer and pick a texture. The first layer fills the whole terrain, so make it your most common ground (grass or dirt).
  3. Add more layers (rock, sand, snow, path) and paint them where they belong.

Tips that make a big difference:

  • Set each layer’s Tile Size to a realistic value (2–10 m). Too small and you see an obvious repeating pattern from far away.
  • Paint rock on steep slopes and grass on flat ground. With Terrain Tools, a slope brush mask does it automatically.
  • Keep it to 4 layers per terrain if you can. URP’s terrain shader renders 4 layers per pass, so 5–8 layers draw the terrain twice.
  • Add normal maps. Flat ground without them looks like a painted floor.

Add Trees

Choose Paint Trees, click Edit Trees > Add Tree and pick a tree prefab. Trees must be prefabs with a LOD Group or a single mesh. SpeedTree models and trees made with Unity’s Tree Creator work best because they generate billboards automatically.

  • Brush Size and Tree Density control how many you place per stroke.
  • Enable Random Tree Rotation and set a height/width variation range so forests don’t look cloned.
  • Mass Place Trees scatters thousands at once. Then clear areas by holding Shift while painting.
  • Trees need a collider on the prefab to block the player, and Enable Tree Colliders ticked in Terrain Settings.

Terrain trees are lightweight because Unity draws them as instances, not GameObjects. That’s why you can’t click an individual tree in the Hierarchy. If you need interactive trees (choppable, with scripts), place those as normal prefabs or swap terrain trees for prefabs at runtime.

Add Grass and Details

Choose Paint Details > Edit Details. You have two kinds:

  • Grass Texture: a billboard texture with alpha that faces the camera and sways in the wind. Cheap. Good for large grass fields.
  • Detail Mesh: a real mesh prefab (rocks, flowers, bushes, 3D grass clumps). In URP, tick Use GPU Instancing on the detail and use a material with GPU instancing enabled for good performance.

Set Min/Max Width and Height for natural variation, and use Density to control how thick each detail is. Wind for grass is set under Terrain Settings > Wind Settings for Grass.

Import a Real-World or Generated Heightmap

Heightmaps let you use landscapes made in World Creator, Gaea, World Machine, or real elevation data:

  1. Export the heightmap as a 16-bit RAW (or PNG with Terrain Tools) at a size of 2n+1 (513, 1025, 2049, 4097).
  2. Terrain Settings > Import Raw. Match the resolution and byte order (Windows for most tools).
  3. Set Terrain Height to the elevation range of the source, so mountains are the right height.

8-bit heightmaps give visible terraces, because 256 height steps aren’t enough. Always use 16-bit.

💻 Big terrains are heavy to edit

Sculpting a 2k heightmap with thousands of trees will crawl on a weak GPU. Our tested picks list laptops that run the Unity Editor smoothly at every budget.

See the best laptops for Unity development →

Terrain Performance Settings

Terrain is fast by default, but a few settings decide whether it costs 1 ms or 10 ms. They’re all in Terrain Settings:

Setting Effect Recommendation
Draw Instanced GPU-instanced terrain rendering Leave on
Pixel Error How much the terrain simplifies with distance 5–10 (higher = fewer triangles); 1 is very expensive
Basemap Distance Beyond this distance a cheap pre-baked texture is used 100–300 m
Detail Distance How far grass and detail meshes draw 60–120 m; this is usually the biggest cost
Detail Density Scale Global multiplier for grass density Lower it on weaker platforms
Tree Distance / Billboard Start Where trees disappear / switch to billboards 500–2000 / 50–150 m
Cast Shadows Terrain shadow casting Off if the ground is mostly flat

Grass and trees usually cost more than the terrain mesh itself, so start there. For very large worlds, split the landscape into multiple terrain tiles (Terrain Toolbox does this) so distant tiles can be culled or streamed. Check the real cost with the Profiler and the Frame Debugger.

Troubleshooting

The terrain is pink or white

The terrain material doesn’t match your render pipeline. In URP, set the Terrain’s Material (Terrain Settings) to TerrainLit (the default TerrainLit material from the URP package). Our pink materials guide has the full fix.

Grass is invisible

Detail Distance is too low, density is 0, you’re looking from beyond the detail distance, or a detail mesh lacks an instancing-compatible material. Also check the Scene view’s gizmo/draw settings. Grass sometimes only shows in the Game view.

Trees show as white or grey billboards

The tree’s shader doesn’t support URP (common with old Tree Creator assets). Use URP-compatible SpeedTree shaders or convert the materials. If trees turn white only at a distance, regenerate the billboards by re-adding the tree prototype.

The player falls through the terrain

Make sure the Terrain Collider is enabled and uses the same TerrainData as the Terrain. After duplicating terrains, both components must point to the new asset.

Visible seams between terrain tiles

Neighbouring tiles need matching heightmap resolution, and Auto Connect with the same Grouping ID so Unity stitches their LODs.

Terraces or steps on slopes

The heightmap was imported as 8-bit, or Terrain Height is far bigger than needed. Use 16-bit RAW and the smallest height that fits your tallest peak.

FAQ

How do I make a terrain in Unity?

Use GameObject > 3D Object > Terrain, set its size and resolution in Terrain Settings, sculpt with the Paint Terrain tools, then paint Terrain Layers, trees and grass.

What is the Terrain Tools package?

A free Unity package that adds erosion, noise and terrace brushes, slope and height masks, and the Terrain Toolbox for multi-tile terrains and heightmap import.

How many textures can a Unity terrain have?

As many as you like, but URP draws 4 layers per pass, so going beyond 4 renders the terrain again for each extra group of 4.

Why is my terrain grass not showing?

Usually Detail Distance or density is too low, or a detail mesh’s material doesn’t support GPU instancing in URP.

Should I use Unity terrain or a modelled mesh?

Terrain for large natural landscapes. Meshes for caves, overhangs, cliffs and stylised or small levels, since terrain can only be a heightmap.

How big can a Unity terrain be?

A single tile works well up to a few kilometres. Beyond that, use multiple tiles and, for very large worlds, floating-origin techniques to avoid precision issues far from the origin.

Can you scale a terrain in Unity?

Not with the Transform: terrain ignores Scale. Change Terrain Width, Terrain Length and Terrain Height under Terrain Settings > Mesh Resolution instead. Raising Heightmap Resolution adds detail rather than size.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *