Skip to main content

Terrain Rules and Terrain Painting

Terrain painting chooses tiles that connect to their neighbours, such as grass borders, shorelines, roads, and walls. Configure connection rules on a tileset, then select a terrain and paint on a tilemap layer.

For importing tilesets and creating map layers, start with Tilesets and Tilemaps.

Paint an automatically connected tile area with terrain rules
Paint an automatically connected tile area with terrain rules

Supported Tilemap Types​

Use terrain rules on rectangular or isometric tilemap layers. Hexagonal layers support ordinary tile painting, but do not support terrain-rule painting.

Core Concepts​

Terrain Set​

A terrain set groups terrains and their tile rules under one mode: Corner, Edge, or Mixed. A tileset can hold several terrain sets. Choose the mode when creating a set; create another set when you need a different rule structure.

Terrain​

A terrain is a category such as grass, road, or water. Assign it a name, display colour, and optional representative tile so you can recognise it in the list and rule overlay.

These display settings do not define connections. A tile's corner and edge markings determine which terrain it represents. Different positions on one tile can belong to different terrains, allowing transitions within the same set.

Rule Positions​

A rule position assigns a terrain to a tile's corner or edge. Unmarked positions have no terrain marking. In the rules editor, Erase Terrain clears those markings; on the map, Terrain Eraser changes the painted terrain states. These operate on different parts of the workflow.

Choose a Terrain Set Mode​

Choose the positions needed to describe the artwork:

ModeRule positionsTypical use
CornerFour cornersConnections expressed by corner combinations.
EdgeTop, right, bottom, and left edgesRoads or other pieces connected along edges.
MixedFour corners and four edgesArtwork that needs both kinds of constraints.

Mixed adds more positions to configure; it does not automatically improve a tileset with rules designed for another mode.

Rule setup and painting results for Edge, Corner, and Mixed terrain set modes
Rule setup and painting results for Edge, Corner, and Mixed terrain set modes

Create Terrain Rules​

Prepare and correctly slice the required straight, edge, corner, and connection tiles, then:

  1. Select the tileset and open Tileset ▸ Edit Terrain Rules, or choose Edit in the panel's Terrains section.
  2. Add a terrain set and choose its name and mode.
  3. Add the terrains needed for the transitions, setting their display properties as needed.
  4. Select a terrain and mark valid rule positions on the tiles at the right. Inspect the overlay as you work.
  5. Choose OK to apply the changes.

The image numbers follow these steps. All terrains in a set share its mode.

Terrain rule creation workflow
Terrain rule creation workflow

Edit and Inspect Rules​

OperationHow to use it
DrawSelect a terrain and click or drag over valid corners or edges.
EraseSelect Erase Terrain, then click or drag over markings to clear them.
SampleRight-click on desktop or touch and hold on mobile. A marked position selects its terrain; an unmarked one selects erase.
InspectShow or hide the rule overlay, adjust outline and fill opacity, or zoom/fit the atlas.
Undo / redoRevise changes within the rules editor.

Edits remain in a draft until you choose OK. Cancel discards the current edit. Closing with unsaved changes offers save, discard, or cancel options.

Understand the Overlay​

The overlay shows assigned corners and edges in each terrain's colour. Compare adjoining parts of the artwork: straight sections, corners, endpoints, and intersections need consistent markings. Leave positions that belong to no terrain unmarked.

A representative tile is only a list preview. Rules can match without one, but a preview alone cannot replace missing rules.

Rule Coverage and Matching Results​

The painter chooses from the tiles and rule combinations you have provided. It cannot draw a missing corner or create a new connection image.

If a result looks wrong, check the set mode, whether the required tile exists, and its corner/edge markings. Also inspect nearby tiles for the wrong terrain or extra markings.

Several tiles can share the same rule combination to provide visual variations. Their Probability values in Tile Properties affect variant selection among equivalent candidates; they do not replace valid connection rules.

Paint Terrain on a Tilemap Layer​

  1. Select an editable rectangular or isometric tilemap layer.
  2. In the Tilesets panel, select the tileset and open Terrains.
  3. Choose the terrain set and terrain you configured.
  4. Paint with the Pencil tool.

Painting updates the target terrain states and recalculates nearby affected tiles. A neighbouring tile can change when its connection to the painted area changes.

Tile and Fine Modes​

  • Tile: apply terrain to a whole cell for larger continuous areas.
  • Fine: change the corner or edge under the pointer to repair a local connection. Corner mode targets corners, Edge mode targets edges, and Mixed supports both.

Choose Terrain Eraser in the panel to clear terrain states and rematch affected neighbours. The Eyedropper can select an identifiable terrain from an existing map result.

Paint terrain in Tile mode
Paint terrain in Tile mode
Modify a terrain edge or corner in Fine mode
Modify a terrain edge or corner in Fine mode

Frequently Asked Questions​

ProblemCheck
No terrain paintingUse an unlocked, editable rectangular or isometric tilemap layer, select the intended terrain, and confirm it has usable rules.
Wrong edges or cornersCheck the required tile exists and its markings match the chosen set mode.
Neighbours change while paintingThis is part of rematching connections around the edited area.
Overlay hides detailsHide it temporarily or reduce its fill opacity. This keeps the rules intact.
A different mode is neededCreate a new terrain set and mark its rules for that mode.

Example Files​

Download a project from Example Files to inspect a working setup.

Continue Reading​