Skip to content

Autotile Tileset Editor — Terrain Bits for Godot, Tiled, Unity

Stop setting peering bits by hand: import a sheet, let the Studio recognise which of 12 published layouts it is, check that every combination exists, paint a test map with Godot's own rule and export files the engines loaded.

An autotile sheet is only a picture until every tile says which neighbours it connects to — Godot calls these terrain peering bits, Tiled calls them Wang IDs, Unity writes them as Rule Tile neighbours. Tile Lab (the Tile workspace of Nerulio Studio) takes a PNG sheet, measures its grid, recognises which of 12 published layouts it is from the seams between tiles, writes the bits, lists missing combinations and paints a test map with Godot's or Tiled's rule. The export was built and painted in Godot 4.7.2, Tiled 1.12.2 and Unity 6000.5.3f1; the LDtk file was checked against the 1.5.3 schema and loader.

Drop a tileset or autotile sheet (PNG)
Runs in your browser. Files are not uploaded.
Studio Tile workspace: a 47-tile sheet recognised as the GameMaker layout, with its terrain bits and a complete check
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

How the layout is recognised from the pixels, and when it fails

A layout is a table: for each cell of the sheet, the neighbour mask that tile stands for. The same 47 blob tiles are published in at least five incompatible orders (cr31 ascending 8×6, wang blob 7×7, caeles, GameMaker, the Godot 3 12×4 template), and nothing in a PNG says which one you have. Apply the wrong table and every tile lands in the wrong rule.

So the workspace tests each table against the art. If a layout says tile A connects on its right and tile B connects on its left, A|B must join without a visible seam; if only one of them connects, the layout promises a break. For every neighbouring pair it compares the pixels across the shared edge (split into the two corner segments and the middle), and scores the layout by the probability that a "should be seamless" pair really is smoother than a "should break" pair — the ROC AUC, where 1.0 is perfect and 0.5 means the pixels say nothing. Only edge pixels count, so slot numbers printed on template tiles do not disturb it.

Every layout is tried at every position on small sheets and on its own block grid on sheets above 400 cells: a quick sampled pass, then a full pass for the best six placements. Confidence is high when the AUC is at least 0.97, no cell of the layout is blank and it leads the next different reading by at least 0.03; medium from an AUC of 0.88 with at most one blank cell; anything else is low. Nothing is written until you press Apply.

It fails in predictable places: seamless art where every piece looks alike (an RPG Maker A2 floor scored 0.5), heavily textured art (the 64 px cave set scored 0.964, still all 47 tiles right), a layout that is not in the list (Tilesetter's output order is not published), and sheets that are not autotile sets at all. Then you paint the bits yourself or let the workspace suggest them from the pixels as a preview.

Peering bit
Godot 4's name for the terrain a tile expects at one of its 8 neighbour positions; Tiled stores the same idea as a Wang ID, Unity as a Rule Tile neighbour rule.
Layout
The order in which a sheet stores its tiles: which neighbour mask sits in which cell.
Seam AUC
How cleanly a layout's "seamless" pairs beat its "broken" pairs on edge pixel difference: 1.0 perfect, 0.5 no information.
Match mode
Which neighbours count: corners and sides (47-tile blob), sides only (16 edge tiles), corners only (16 corner / dual-grid tiles).

What identification said about real sheets

Corpus run of 2026-09-23 (docs/STUDIO-TILE.md), grid and layout found from the pixels with no hints:

Sheet                              Detected as               Confidence  Seam AUC  Bits right
GameMaker 47 template              GameMaker 47              high        1.000     47/47
caeles template 7×7                caeles 7×7                high        1.000     49/49
Tiled wangblob example             wang blob 7×7             high        1.000     49/49
cave platformer 47 (64 px art)     GameMaker 47              medium      0.964     47/47
Wang S-V2 (corner template)        corner16 cr31             high        1.000     16/16
coolschool A2 (seamless floor)     nothing from the pixels   low         0.5       size hint → assembled
Kenney tiny dungeon (no autotile)  low, or a 3×3 box with the warning "only part of the sheet: 9 of N tiles"

Godot 4.7.2 painting the exported sets: 485 of 485 test cells equal the Studio's prediction on each blob set.

The cave set is the typical real case: textured rock makes the edges noisier, so the AUC drops below 0.97 and the result is labelled medium even though every tile is right. Read the confidence as "how much to double-check", then confirm with the test map.

What it does

  • Layout recognition by seam continuity: blob-47 (cr31, wang blob 7×7, caeles, GameMaker, Godot 3 12×4), 16-side, 16-corner / dual grid, 3×3 box, RPG Maker A2 / A4 sources.
  • Bits tool, 3×3 bit editor, rotate / mirror, copy / paste bits, collision shapes from alpha.
  • A check that says Complete only after measuring: missing combinations as ghost tiles, duplicates, contradictions between art and bits.
  • A generator that assembles a blob-47 or dual-grid set from an RPG Maker A2, A4 or 2×3 base block.

How to do it

  1. Drop the tileset.
  2. Use the suggested grid, then apply the best layout candidate (Enter).
  3. Read the Check panel; fix or generate what is missing; paint a test map (M).
  4. Export for Godot 4, Tiled, Unity or LDtk (Ctrl+E).

Check the result before you export

  • Check panel: it says Complete only when every combination has a tile, no tile has a corner bit behind an open side, and the art-vs-bits check was measured and found nothing. "Not measured" is shown as such, never as a tick.
  • Missing combinations appear as ghost tiles with their mask; draw exactly those, or generate them with the tileset generator.
  • Press M and look at the starter island with the Godot rule, then the Tiled rule: outlined cells are where the engine would leave a hole or substitute a tile (what the outlines mean).
  • After export, paint the same shapes in the engine: in Godot 4 run the shipped nerulio_tileset_import.gd (File › Run), assign the saved nerulio-tileset.tres to a TileMapLayer and paint with the Terrains tab; details in Godot 4 autotile.

Troubleshooting

SymptomLikely causeHow to checkFix
The top layout candidate is low, or plainly wrongSeamless or heavily textured art, or a layout that is not one of the 12 known onesRead its seam AUC and the warning "explains only part of the sheet"Paint the bits with the Bits tool (B), or select the full tile and use Suggest bits from pixels, then accept the preview
Candidates show twice or half the real tile sizeA multiple of the true tile explains the same edges (a 64×32 cell made of eight 16×16 tiles)The dashed grid preview cuts through drawn tiles, or cols × rows is not 8×6, 7×7, 4×4 or 12×4Pick the candidate whose cols × rows matches a layout, or type the tile size
Check lists "corner bits behind open sides"A corner bit was set where one of its two sides is open: no map ever needs that tileClick the listed tile; the 3×3 bit editor shows the corner and the open sideClear the corner bit or connect the side; one click each, one undo step
The art check flags exactly two tilesTwo tiles are swapped in the sheet compared with the layoutThe art check lists both tiles by position; the drawn rims of each contradict its bitsSwap their bits (copy / paste bits) or fix the order in the sheet and re-import
An RPG Maker sheet gets no layout at allA2 / A4 sheets hold the pieces tiles are assembled from, not the tiles; a seamless floor scores 0.5A size hint appears, e.g. 768×576 = RPG Maker A2 at 48 pxUse "Assemble from this block"; see RPG Maker autotiles in Godot

Other ways to do it

OptionWhen it is the better choice
Godot's own TileSet editor: select tiles in Select mode and set the Terrain Peering Bits by handA small set in an unusual layout that only you use; nothing to install, and you see Godot's own UI while you learn it.
Tiled's terrain set editorYour levels live in Tiled and you mark Wang colours there anyway; Tiled Wang sets shows what the export writes.
LDtk auto-layer rulesYou build levels in LDtk and want its rule editor (rules on an IntGrid layer) rather than per-tile bits; see LDtk autotile rules.
A base-block generator such as Blobsmith, or Nerulio's own generatorYou have not drawn 47 tiles yet: draw a 2×3 base and assemble the rest (tileset generator).

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

  • Isometric and hexagonal tiles, animated tiles, alternative tiles, occlusion and navigation layers are not handled.
  • Tiled's terrain brush, the LDtk app and Godot's editor painter were not driven; the checks used their file readers and set_cells_terrain_connect.
  • Rules for more than two terrains meeting at one point are only as complete as the art.
  • 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.

Versions and sources

Verified by Nerulio (docs/STUDIO-TILE.md, 2026-09-23, Windows 11): Godot 4.7.2.stable.official built the TileSet with the shipped importer and painted every corpus map exactly as the Studio predicted; Tiled 1.12.2 read every Wang ID as written; Unity 6000.5.3f1 with 2D Tilemap Extras 8.0.3 built the Rule Tiles and matched in every cell; LDtk only against the 1.5.3 JSON schema and the official loader. Engine concepts above follow the linked documentation.

Official documentation used

Classic tool

Seamless-texture checks, edge extrusion of a finished tileset and a ZIP of single tile PNGs are still in the classic Tile Lab.

Open the classic tool →

Questions

My sheet is not one of the known layouts. Can I still use it?

Yes. Paint the bits with the Bits tool, or let the Studio suggest them from the pixels (as a preview you accept).

Does the Godot export include the terrain peering bits?

Yes. The included import script builds the TileSet with every tile's terrain peering bits, and the result was painted in Godot 4.7.2.

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).