Jaconir
Studio-Grade Developer Tool

Bitmask Autotile Generator for Godot & Unity

Turn a single tile into a seamless 47-tile Autotile bitmask set with a live testing canvas.

Live Testing Canvas

Left Click: Paint | Right Click: Erase

Upload to Test

Paint directly on this grid after uploading your tile.

Generated 47-Tile Sheet

256x192 px · click a tile to inspect
Waiting for source assets...

Tile inspector

Click a tile on the generated sheet

Generate a sheet to inspect tiles.

Generation statistics

Tile count

47

Tile size

32px

Template

47 Blob

Export format

PNG + JSON

Sheet

256×192

Validation

Pending

Validation

Incomplete — upload center tile

  • Missing center tile — required for generation
  • Missing edge tile — edges fall back to center
  • Missing outer corner — corners fall back to center
  • Missing inner corner — optional for some styles

Export center

Production-ready formats for your pipeline

Optimization panel

Ready for production · NO

Generated tiles

47

Unused area

2%

Padding

0 px (tight sheet)

Grid

8×6

Engine compatibility

Import with confidence

Godot

Supported
Exports
TileSet · Terrain
Setup time
~5 min
Difficulty
Easy

Import PNG + Godot JSON mapping

Unity

Supported
Exports
RuleTile
Setup time
~10 min
Difficulty
Medium

PNG + RuleTile mapping JSON

Tiled

Supported
Exports
TSX tileset
Setup time
~3 min
Difficulty
Easy

Load TSX next to PNG

LDtk

Supported
Exports
Tileset JSON
Setup time
~5 min
Difficulty
Easy

Point tileset path at PNG

Integration guide

  1. 1

    Export PNG sheet + Godot metadata JSON

  2. 2

    Import PNG as Texture2D (Nearest filter)

  3. 3

    Create TileSet → add atlas with tile size

  4. 4

    Apply bitmask mapping from JSON / paint terrains

Input vs output

Drag to compare source tile and generated atlas

Generate a sheet to compare
Upload center tile
InputOutput

Professional best practices

Tile Padding

Keep 0–1px between cells if your importer adds margins; avoid bleed into neighbours.

Bleeding

Match edge colours or extrude 1px when using bilinear filtering in-engine.

Pixel Perfect

Use Point / Nearest filtering and integer camera zoom for crisp autotiles.

Power of Two

Prefer 16/32/64 source tiles so the 8×6 sheet stays GPU-friendly.

Atlas Size

Sheet is tileSize×8 by tileSize×6 — keep under your engine max texture size.

Continue your game dev workflow

Idea → level → art → collision → audio → progression

More free browser-based game development tools

Game Dev Lab

How to generate a 47-tile autotile template

Five steps from one source tile to a sheet plus the mapping your engine needs.

  1. Start with one centre tile

    The generator needs a single filled tile — the texture that represents "this cell is solid ground". Edge and corner sources are optional refinements; without them the tool derives edges and corners from the centre tile so you can see the whole set working before you commit to drawing 47 pieces by hand.

  2. Set the tile size before you generate

    Tile size drives the atlas dimensions, so a 32px tile produces a 256×192 sheet across the 8×6 grid. Match it to whatever your project already uses. Changing it later means regenerating, since every exported mapping references pixel offsets on that specific sheet.

  3. Paint on the live canvas to test the ruleset

    Left click paints, right click erases. This is the part worth spending time on: draw an L-shape, a diagonal, a one-tile island, a hole in the middle of a filled area. Those are the cases where a hand-built tileset falls apart, and seeing the correct tile appear at each is how you know the bitmask is being read the way your engine will read it.

  4. Inspect any tile to see the rule behind it

    Clicking a tile on the generated sheet reports its bitmask value, which neighbours are set, and how the tile is classified — isolated, edge, outer corner, inner corner, junction or filled. That mapping from a number to a picture is the thing that makes autotiling stop feeling like magic, and it is what you need when a tile is appearing in the wrong place and you are trying to work out why.

  5. Export the sheet and the mapping for your engine

    PNG gives you the atlas. The metadata export gives your engine the mask-to-index table so it knows which tile answers which neighbour configuration — as a Godot or Unity mapping, a Tiled .tsx tileset, or an LDtk JSON definition. The PNG on its own is only half of a working autotile set.

How bitmask autotiling actually works

Why the set is 47 tiles on an 8×6 atlas, what the bit values mean, and when a different system is the better answer.

Where the number 47 comes from256 → 47
Each tile looks at eight neighbours, which is 2⁸ = 256 possible configurations. Most are duplicates: a corner neighbour only changes what the tile should look like when both edges beside it are also filled. A north-east neighbour with no north and no east neighbour is visually irrelevant — there is nothing for it to connect to. Normalising every mask by that rule collapses 256 down to exactly 47 distinct cases, which is why the blob set is the size it is. It is not an arbitrary art convention.
The bit values, and why the order mattersN=1 NE=2 E=4 SE=8 S=16 SW=32 W=64 NW=128
Neighbours are numbered clockwise from north, each one a power of two, so any configuration is a single byte. A tile with neighbours to the north, east and north-east has mask 1 + 4 + 2 = 7. Engines differ on which direction is bit zero and which way they rotate, so if your tiles come out mirrored or rotated, it is almost always a bit-order mismatch rather than a broken sheet — check the exported mapping against what your engine expects before redrawing anything.
What the 47 tiles are actually made of
One isolated tile with no neighbours, one fully surrounded fill tile, six edges, four outer corners, five junctions, and thirty inner-corner variants. That distribution surprises people: the bulk of the work is inner corners, the cases where a filled region turns back on itself. If you are drawing a set by hand and it looks wrong in complex terrain, inner corners are almost certainly what is missing.
Is there something better than the 47-tile system?
It depends what you are matching on. A 4-bit set that ignores corners needs only 16 tiles and is much faster to draw, and it is enough for blocky terrain where diagonal joins do not matter. Full 8-bit matching without the corner rule would need 256 tiles, most of them visually identical, which is why nobody does it. Wang and corner-matching tilesets solve the problem differently by matching edges between tiles rather than neighbour occupancy, which handles multi-terrain blending better but needs different authoring. The 47-tile blob is the standard because it is the smallest set that renders every distinct single-terrain case correctly — if you need less fidelity, use 16; if you need multiple terrains blending into each other, look at Wang tiles.
Godot 4 changed the terminology
Godot 3 called this an autotile with a bitmask you painted in the editor. Godot 4 replaced that with Terrain Sets and terrain peering bits, which is the same idea with different names and a different UI. The generated sheet works for both; what changes is where you tell the engine about neighbour rules. Searching for Godot autotile documentation will often land you on Godot 3 pages that no longer match the editor in front of you.
How the 47 tiles of the blob set break down by role
Tile roleCount
Inner Corner30
Edge6
Junction5
Outer Corner4
Isolated1
Filled1

Computed from the tile catalog this generator uses. Inner corners dominate because they are the cases where a filled region turns back on itself — the part hand-drawn sets most often get wrong.

Frequently asked questions

What is a 47-tile autotile template?

A tileset laid out so that every distinct arrangement of neighbours has exactly one tile answering it. Your engine looks at which of the eight surrounding cells are filled, computes a number from that, and draws the matching tile — so a wall automatically grows corners, edges and junctions as you paint. The 47 comes from collapsing 256 possible neighbour configurations down to the ones that are actually visually distinct.

Why 47 tiles and not 16 or 256?

Eight neighbours give 256 combinations, but a corner neighbour only matters when both adjacent edges are also filled — otherwise there is nothing for the corner to connect to. Applying that rule collapses 256 to exactly 47. Sixteen is what you get if you ignore corners entirely and match only north, south, east and west, which is a legitimate simpler option for blocky terrain. 256 would mean drawing many tiles that are pixel-identical.

Is there a better system than 47-tile blob?

For a single terrain type, 47 is the smallest set that gets every case right, so "better" usually means "simpler" or "different problem". A 16-tile 4-bit set is far quicker to draw and fine when diagonal joins do not matter. Wang tiles and corner-matching sets match edges between tiles rather than neighbour occupancy, which handles several terrains blending into one another — something the blob set does not do. Pick by what you actually need: fidelity, drawing time, or multi-terrain blending.

How do the bitmask values work?

Each of the eight neighbours is a power of two, clockwise from north: N=1, NE=2, E=4, SE=8, S=16, SW=32, W=64, NW=128. Add the values of the filled neighbours and you get a single byte identifying the configuration. Neighbours to the north, north-east and east give 1 + 2 + 4 = 7. The tile inspector shows this number for any tile you click, together with which neighbours it represents.

Does this work with Godot 4 terrain sets?

Yes. Godot 4 renamed autotiles to Terrain Sets and bitmasks to terrain peering bits, but the underlying idea and the sheet layout are unchanged. Export the PNG and the mapping, then assign the peering bits in the TileSet editor. Be aware that a lot of Godot autotile tutorials online are written for Godot 3 and describe an editor UI that no longer exists.

Which engines and editors can I export to?

A PNG atlas plus metadata for Godot and Unity, a Tiled .tsx tileset, and an LDtk JSON tileset definition. The metadata is the important half: it carries the mask-to-index table so the engine knows which tile answers which neighbour configuration. Exporting only the PNG leaves you to rebuild that mapping by hand.

My tiles are rotated or mirrored — what went wrong?

Almost always bit order. Engines disagree about which direction is bit zero and whether the sequence runs clockwise or anticlockwise, so a sheet that is correct can still render wrong if the engine reads the mask differently. Compare the exported mapping against what your engine documents before redrawing any art — the fix is a remap, not a repaint.

Do I need to draw all 47 tiles myself?

No, that is the point of the tool. Supply one centre tile and the generator derives the full set; supply optional edge and corner sources if you want more control over how the borders look. Drawing all 47 by hand is possible and gives the best results for a finished game, but generating the set first lets you test the terrain logic before committing that time.

Is my artwork uploaded anywhere?

No. Your source tiles are read into a canvas in the page and the sheet is generated in your browser. Nothing is transmitted, there is no account, and the exported files are produced locally.

Where this fits in the pipeline