Drop a tileset PNG, get a wired Godot 4 TileSet

The terrain set, all 47 peering-bit assignments and one collision polygon per tile, written into a .tres you save next to your image. The tile size is read off the sheet, not typed. Nothing is uploaded — the file never leaves your browser, and there is no plugin to install.

Drop your tileset sheet here
…or click to choose a .png. 8 columns × 6 rows for a 47-tile blob, 8 × 2 for sides-only.

Save the .tres in the same folder as your PNG — the texture path inside is relative, so the pair works in any project without an edit.

What this writes, and why by hand it is 47 × 9 fields

A Godot 4 terrain does not read your picture. It reads, per tile, which of its eight neighbours belong to the same terrain — the peering bits — and then paints the tile whose bits match the neighbourhood it is filling. Wiring a blob sheet by hand in the TileSet editor means selecting 47 tiles one at a time and clicking up to 8 bits on each, in a 3×3 widget, without a way to tell afterwards which one you mis-clicked.

The file itself is plain text. One tile looks like this:

3:1/0 = 0
3:1/0/terrain_set = 0
3:1/0/terrain = 0
3:1/0/terrains_peering_bit/right_side = 0
3:1/0/terrains_peering_bit/bottom_side = 0
3:1/0/terrains_peering_bit/bottom_right_corner = 0
3:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)

3:1 is the atlas coordinate — column 3, row 1 of your sheet. The = 0 on every line is the terrain index, not a boolean: a bit that is absent is a neighbour that must NOT be the same terrain. That distinction is why a half-wired sheet paints the wrong tile instead of no tile at all — the page for that failure is here.

The slot order is the wiring

Tile 12 of your sheet gets the peering bits of mask 12. There is no picture recognition involved and there cannot be: two tiles that differ by one pixel of grass are the same image to a machine and opposite tiles to a player. So a sheet drawn in another tool's order will wire cleanly, export cleanly, open cleanly — and paint wrong, everywhere, with no error.

The order below is the one this page writes and the one the free starter pack and Blobsmith draw in: canonical masks ascending, 8 per row. # is a neighbour of the same terrain, O is the tile itself. Check three or four slots against your sheet before you trust the output.

47 slots in an 8×6 grid leaves one spare at the bottom right. Anything drawn there is never painted by the terrain.

Transparent slots are the failure nobody sees

A sheet with a slot you never drew still wires. Godot accepts the empty tile, sets its bits, and paints an invisible cell every time that neighbourhood comes up — usually a diagonal join that only appears once the map is big enough to contain one. The editor reports nothing, because nothing is wrong with the file.

That is why this page reads the alpha of every wired slot before it offers a download, and names the empty ones by index. Blank here means every pixel in the slot has alpha 0 — a slot painted solid white is art, not a hole.

After you save the file

  1. Put the .tres next to the .png, then let Godot import once. The texture reference is relative, so the folder can be anywhere in the project.
  2. Drop a TileMapLayer in your scene and set its Tile Set to the resource. The Terrains tab will already have one terrain with the swatch colour you picked.
  3. Paint with the terrain, not with tiles. In the TileMap panel choose the Terrains tab and drag — Godot picks the tile per cell from the bits this file wrote.
  4. Still on TileMap instead of TileMapLayer? It is deprecated since 4.3 — paste your scene here and get the converted one back.

If you do not have 47 tiles to bring

This page wires a sheet; it cannot draw one. Blobsmith is the tool for the other half: 6 hand-drawn tiles in, the full 47-tile sheet out, with this same .tres in the export. If you only need something correct to test the pipeline against, take the free 47-blob starter pack — 8 wired TileSets, MIT, no e-mail. Everything on this page also runs inside the editor as the MIT Wirer addon.