Hazel

Terrain

Terrain is the ground of an outdoor level: hills, valleys, cliffs and riverbeds you shape with brushes, texture by painting, and save with your scene. It looks the same in the editor and in your finished game.

A sculpted terrain wearing Alpine Landscape, with the Inspector open on the Terrain component

Adding terrain

In the Hierarchy, open Add Entity and pick Terrain (in the General group).

A new terrain is a single flat 64 metre tile, sitting just above the editor grid. It wears the grey blockout grid until you give it a material. Grow it from the chunk map when you need more ground.

The Add Entity window, with Terrain in the General group

Turning a plane into terrain

Already placed a flat plane where your ground should be? Select it and a Make Terrain button (a shovel icon) appears in the viewport toolbar. Click it and the plane becomes a terrain in place, ready to sculpt.

It stays the same object: same name, same spot in the Hierarchy, same scripts. Its size becomes the terrain's size, so the new ground covers exactly what the plane covered. Ctrl+Z turns it back into a plane.

Only flat meshes offer the button: a cube or a wall will not. Flat pieces inside an imported model do not offer it either.

The Terrain component

Select the terrain and the Inspector shows its Terrain section. At the top is the material slot. Under it are four tabs:

TabWhat it is for
ManageThe whole terrain: its size, detail, streaming, generator graph and heightmaps
SculptBrushes that shape the ground
PaintBrushes that paint the material's layers (grass, rock, snow...)
FoliagePainting grass. See Foliage

Picking Sculpt, Paint or Foliage arms that brush in the viewport. Manage puts you back to normal selecting. Every value is in real units: metres, degrees and percent.

The Terrain section: the material slot, with the Manage, Sculpt, Paint and Foliage tabs under it

Manage: size and detail

The chunk map

A terrain is a grid of square pieces called chunks. The World map at the top of the Manage tab shows them from above: bright for chunks at full detail, dim for far chunks drawn as a lighter stand-in, and an outline around the chunk the camera is over.

  • Click an empty cell beside the grid to add a row or column there. Ground you already shaped stays where it is.
  • Ctrl+click a chunk on the edge to remove its row or column. This deletes the sculpting and painting on it and cannot be undone, which is why it needs Ctrl.

Hovering shows which row a click would add or remove. A terrain can be up to 32 chunks on a side. Under the map you can read the terrain's Size, how many chunks are Resident at full detail, and roughly how much Memory they use.

The settings card

SettingWhat it does
Chunk sizeHow wide each chunk is, 8 to 512 m
ResolutionHow many points each chunk has per side: 33, 65, 129 or 257. More points means finer detail and more memory
Height rangeThe lowest and highest the ground can go, in metres
StreamingKeep full detail only near the camera, within the radius you set. On by default, at 512 m
Distant detailLevels (0 to 6): how many simpler versions of each chunk are drawn far away. Reach: how far out full detail lasts, as a percent

Chunk size and resolution rebuild every chunk, so they wait: change one and Apply and Revert appear, with a line telling you how many vertices and how much memory the new setting will cost. Everything else applies straight away.

Set the height range before you sculpt. The ground is stored inside that range, so changing it later stretches or squashes the hills you already made.

Whole terrain

  • Erode all weathers the whole terrain at once: rain carves gullies and fills valleys with sediment, then steep slopes crumble.
  • Flatten all levels all of your hand sculpting back to flat.

Each is one undo step.

Heightmaps

Open Heightmap import and export at the bottom of the Manage tab.

  • Import... loads a PNG (8 or 16 bit) or RAW16 heightmap across the whole terrain.
  • Export... saves the terrain's heights as a 16-bit greyscale PNG.

To place, level or mix a heightmap with other shapes, use an Import Heightmap node in a terrain graph instead.

Sculpting

Open the Sculpt tab, pick a brush and drag in the viewport. The mouse wheel over the viewport changes the brush size. Each stroke is one undo step.

The Sculpt tab: the two brush groups, the selected brush's card and the shared Brush card with its falloff curve

The brushes come in two groups.

Shape

BrushWhat it does
SculptRaises the ground. Hold Shift to lower it
RaiseRaises the ground
LowerLowers the ground
FlattenLevels the ground to the height where your stroke started. Affects lets it only fill hollows (Raise) or only cut bumps (Lower)
Set HeightBrings the ground to a Target height. Pick then click the ground to copy its height
RampSlopes from the stroke's start height out to the brush edge. Shift reverses it
SmoothRounds off bumps and ridges
RelaxRemoves small bumps without shrinking the hills underneath
PinchSharpens ridges and creases. Shift softens them
StampClick once to stamp a shape: Dome, Cone, Bell, Mesa, Ridge, Crater or Noise, or Load PNG for your own. Set its blend, rotation and height
ErasePulls the ground back to the level a new terrain starts at
RetopA strong, wide smooth for reshaping a whole area

Weather and detail

BrushWhat it does
NoiseAdds natural roughness. Pick a Pattern (Eroded, FBM, Ridge, Billow, Warped, Hybrid) and a Feature size. Shift smooths instead
ErodeLoose ground slides downhill, softening spikes into scree
RainRain carves gullies and carries sediment downhill
TerraceCuts the slope into level steps of the Step height you set
CliffBuilds layered rock ledges and outcrops. Shift smooths them

All brushes work across chunk edges, so a stroke never stops at a seam.

The brush card

Every sculpt brush shares one Brush card:

SettingWhat it does
SizeThe brush radius, 1 to 200 m
FalloffHow the edge fades: Smooth, Linear, Round, Sharp or Hard, and how much of the radius fades. A small curve shows the result
ShapeCircle, Square or Diamond

Each brush also has Strength, 1 to 100%.

In the viewport the cursor is two rings lying on the ground: the outer one is the brush's reach, the inner one is where it works at full strength.

Texturing the ground

A terrain is coloured by one landscape material: it says what each layer (grass, rock, snow...) looks like and where it appears. You then paint more of any layer wherever you want it.

The material slot sits at the top of the Terrain section:

  • Use Alpine Landscape gives the engine's ready-made ground. It is copied into your project, so you can open and change it.
  • Choose... picks a .material from your project, or drag one from the Assets panel onto the slot.
  • Edit opens the material in the Materials workspace.

Alpine Landscape

LayerWhere it appears by itself
GrassEverywhere nothing else is
GravelSlopes between about 24 and 40 degrees
RockSlopes steeper than about 34 degrees
SnowAbove 190 m, on slopes gentler than about 40 degrees

These rules follow your sculpting live: raise a peak past 190 m and snow appears on it. The edges are broken up so they look natural rather than drawn with a ruler.

Painting layers

Open the Paint tab. The list shows the material's layers and how much of the terrain each one covers. Pick a layer and paint in the viewport.

ModeWhat it does
PaintBrings the layer up toward the Target weight
EraseTakes the layer away again
SmoothBlurs the edges between layers
FillLays the layer down at the target weight in one pass

The paint brush has Size, Strength, Target weight, Falloff and Shape, plus two masks:

  • Slope mask: only paint where the ground is between two angles. Rock only on cliffs.
  • Height mask: only paint between two heights, in metres. Snow only up high.

Each stroke is one undo step. To add a layer, add it to the material in the Materials workspace and it appears in the list.

Terrain graphs

A terrain graph is a recipe for a landscape: a set of connected boxes (nodes) that build mountains, dunes or craters, weather them with rain and rivers, and mark where grass, rock or sand should go. It is a .tgraph file, so one graph can make many terrains, each different.

Your hand sculpting is kept on its own layer above the graph's result, so rebuilding the graph never throws your work away.

Making a graph

In the Assets panel, open the create menu and choose one of:

EntryWhat you get
Terrain Graph: HighlandsEroded mountain ranges over meadow foothills
Terrain Graph: Rolling HillsSoft grassy hills with gentle valleys
Terrain Graph: DesertDune fields around terraced mesas
Terrain GraphOne noise into the output: a blank start

Double-click the file to open it in the Terrain workspace.

Building a terrain from a graph

Select the terrain, open Manage, and find the Generator card:

  1. Drag the .tgraph onto the slot, or press Choose....
  2. Set the Seed, or press Re-roll. Same graph, new seed: a different landscape of the same kind.
  3. Adjust any settings the graph offers, such as the Highlands' peak height. These apply to this terrain only.
  4. Press Build. It runs in the background with a progress bar and a Cancel button.

You can also press Build in the graph editor's toolbar: it builds into the terrain that already uses this graph, or else the selected terrain.

A build is one undo step. If the result goes higher or lower than the terrain's height range, the range grows to fit.

Editing a graph

  • Add a node with Add Node, by right-clicking the graph, or by dragging a wire from a pin into empty space.
  • Connect by dragging from an output pin to an input pin.
  • Delete removes the selected nodes. C (or Comment) wraps them in a comment box.
  • Select a node to change its settings in the Terrain Graph Inspector. The pin icon beside a number lets each terrain change that value from its Generator card.
  • Every node shows a small preview of its result, updated as you edit.
  • Ctrl+S saves. Build uses the graph as you see it, unsaved edits included.

All distances are in metres and angles in degrees, so the previews match the final build.

The nodes

FamilyNodes
ShapesNoise, Mountain Range, Plateau, Crater, Volcano, Dunes, Cells, Gradient, Constant, Import Heightmap, Current Terrain
ShapingCombine, Curve, Terrace, Warp, Blur, Sharpen, Transform, Clamp, Invert, Height Range, Flatten
NatureErosion, Thermal, Rivers, Lakes, Snow
MasksSlope, Height, Curvature, Flow, Wetness, Aspect, Select Range
OutputTerrain Output, Mask Output

Terrain Output is the ground the graph builds. Mask Output names an area, such as where water runs, for painting layers and foliage.

Collisions

Every chunk has a collider that matches its shape, so characters and physics objects stand on the ground you sculpt. It catches up when you finish a stroke, not during it. See Physics.

Big terrains

A terrain can cover kilometres. Streaming (on by default) keeps full detail only near the camera, and distant chunks are drawn with fewer triangles, so a large terrain costs little more than a small one. To see how a whole level streams, read Large Worlds.