Skip to content

Godot Terrain Wrong Tiles — Find Missing Combinations

When Godot 4 terrain paints a tile with the wrong edge or leaves a cell empty, the terrain set is usually missing the tile for that neighbourhood, or a tile carries the wrong peering bits. Godot then substitutes the closest tile or leaves the cell blank, and the result can even change with the order you paint in.

Drop a tileset or autotile sheet (PNG)
Runs in your browser. Files are not uploaded.
Studio Tile workspace: a test map painted with the Godot rule where one cell stays empty because the set has no isolated tile, flagged in the Check panel
The real Studio with a CC0 asset (OpenGameArt).
Exports to
  • Godot 4 TileSetVerified· Godot 4.7.2
  • TiledVerified· Tiled 1.12.2
  • Unity 6 Rule TileVerified· Unity 6000.5.3f1 + 2D Tilemap Extras 8.0.3
  • LDtkPartly verified· LDtk 1.5.3 schema + loader

What it does

  • The Check panel counts, per terrain, the combinations the set has against the ones a map can ask for, and draws every missing one as a ghost tile, so you see exactly which tile to draw.
  • Duplicates (two tiles with the same bits) are listed and clickable, and tiles with a corner bit behind an open side, a combination no map ever requests, are counted separately.
  • The art-vs-bits check compares each tile's edge pixels with its bits. On the corpus it found two deliberately swapped tiles exactly, both of them and nothing else, with no false flag on any set.
  • The test map's Godot rule is a port of set_cells_terrain_connect that equalled Godot 4.7.2 cell for cell. Holes and substituted tiles are outlined; hovering a cell tells you which tile Godot picks and why.
  • When whole groups are missing, the Generator assembles a complete blob-47 or dual-grid 16 set from a small source block (RPG Maker A2, Blobsmith base, A4 wall, five-tile or a procedural rim).

How to do it

  1. Drop the tileset PNG into the Tile workspace and press Use this grid.
  2. Apply the recognised layout, or paint the bits with B if no layout fits.
  3. Open the Check panel, fix the flagged bits, then draw or generate each ghost tile it lists.
  4. Press M, keep the Godot rule and paint across the outlined cells until none are left.
  5. Export for Godot 4 and run nerulio_tileset_import.gd so the TileSet is rebuilt from the corrected bits.

Wrong Godot terrain tiles: symptom, cause, fix

SymptomUsual causeFix in the Studio
An inner corner or a junction shows a tile with the wrong edgeThe set has no tile for that neighbourhood, so Godot substitutes the closest oneCheck panel ghost tile shows the missing combination; draw it or rebuild the set with the Generator
A painted cell stays emptyNo tile fits the neighbourhood at allThe test map (Godot rule) outlines the hole and names what is missing
Two different tiles appear at random in the same spotTwo tiles carry identical bits and Godot picks by probabilityDuplicates list: keep one, or set probabilities if they are meant as variants
A tile exists but is never usedA corner bit sits behind an open side, a combination no map asks forClear the stray corner bit in the 3×3 bit editor
Bits look right, the painted map shows seamsBits contradict the art, for example two swapped tilesThe art-vs-bits check flags both tiles; fix them or apply the recognised layout again
The result changes with the painting orderGodot's matcher is path-dependentFill each terrain once, row by row, as the test map does

Corpus result: Godot 4.7.2 painted every test cell as the Studio predicted, 485/485 on each blob set and 251/251 on a 4-terrain dual-grid pack.

Engine exports and how each was checked

"Verified" means the exported files were loaded by the real engine or tool on real CC0 assets and the result was compared with the source. Anything that was not loaded is labelled as such.

TargetFilesCheck
Godot 4 TileSetPNG · nerulio-tileset.json · nerulio_tileset_import.gdVerified Godot 4.7.2The included import script builds the TileSet with terrain peering bits; a map painted with set_cells_terrain_connect equals the Studio preview in every cell on 9 corpus sheets.
Tiled.tsx Wang set · sample.tmxVerified Tiled 1.12.2Tiled's own readers load every Wang ID as written and the sample map renders pixel-exact. The terrain brush itself was not driven.
Unity 6 Rule Tilenerulio-ruletile.json · Editor/NerulioRuleTileImporter.csVerified Unity 6000.5.3f1 + 2D Tilemap Extras 8.0.3Blob and side sets: a painted Tilemap shows the predicted sprite in every cell. Corner / dual-grid sets are not exported to Unity.
LDtk.ldtk (1.5.3) · rules · sample levelPartly verified LDtk 1.5.3 schema + loaderAccepted by the LDtk JSON schema and its official loader, and the rules re-run to the exported tiles; not opened in the LDtk app.

Evidence

Layouts identified from the pixels alone on the tile corpus: 4 blob-47 templates and 2 Wang templates with high confidence, a real 64 px cave tileset with medium confidence — every tile's bits right. Godot 4.7.2 painted every test cell exactly as the Studio predicted (485/485 per blob set, 251/251 on a 4-terrain dual-grid pack); Tiled 1.12.2 read every Wang ID back; Unity 6000.5 matched on every painted cell of the blob and side sets.

Limits

  • Tiled's terrain brush, the LDtk app and Godot's editor painter were not driven; the checks use the engines' readers and set_cells_terrain_connect.
  • Unity gets blob and side sets only; several terrains become several Rule Tiles with no transitions between them.
  • Isometric and hex tiles, animated tiles, occlusion and navigation layers are out of scope.
  • Suggesting bits without a known layout needs a reference "full" tile; on side-only path templates the guess can fail until you select it.

Questions

Why does my terrain not show up in the TileMap at all?

Where no tile matches the neighbourhood, Godot leaves the cell empty. If whole areas stay blank, the set is missing most of the combinations the map asks for; the Check panel's present/expected count shows how many, and the test map leaves the same cells empty and outlines them.

Can it open the TileSet .tres I already have?

No. It works from the tileset image. Export for Godot 4 and the bundled GDScript builds a fresh TileSet with the corrected terrain bits inside Godot; keep your old resource until you have compared the two.

Why is my dual-grid (corner) set half a tile off in Godot?

Godot draws corner-matched sets on the cells themselves, not on the points between them, so a dual grid needs a plugin such as TileMapDual. The Godot rule shows it the way Godot draws it; the Tiled rule shows the half-tile offset Tiled uses.

Was the Godot editor's own terrain brush tested?

No. The check ran set_cells_terrain_connect in Godot 4.7.2, which the editor brush calls, and compared every painted cell. The brush itself was not driven.

Is it free, and do I need an account?

Everything on these pages is free and works without an account. There is no watermark and no export that is held back.

Are my sprites uploaded?

No. The Studio decodes, packs and exports in this browser tab. Projects are autosaved in the browser (IndexedDB) and can be saved as a .nerulio file.

Does it need Aseprite or an engine plugin installed?

No. .aseprite files are read and written in the browser, and each engine bundle carries what that engine needs (for Godot, the import settings and scene; for Unity and the Godot TileSet, a small editor script).