New: 36 free tools for Unreal Engine and Unity developers.Try them →

Autotile Generator (47-Tile Blob)

Turn a small autotile template into a full 47-tile blob tileset with a bitmask map and a Unity Rule Tile builder script.

  • ✓ Free, no sign-up
  • ✓ Works for Unreal Engine & Unity
  • ✓ Runs in your browser

Template

    Isolated tile
    Inner corners
    2 x 2 patch: outer corners, edges, fill

    Tileset

    Drop a template or use the example to generate all 47 tiles.

    How it works

    Every tile is split into four quarters. Each quarter only depends on three neighbors: the one above or below, the one to the side, and the diagonal between them. That gives five kinds of quarter (outer corner, side edge, top/bottom edge, inner corner and fill), and the template contains each of them. The tool picks the right quarter for all four corners of all 47 tiles.

    Drawing your template

    • Use an even tile size (16, 32, 48, 64…) so each tile splits into equal quarters.
    • The 2 x 2 patch is the most important part: draw it as one rounded area of terrain with its border.
    • The inner corners tile is solid terrain with a small cut-out at each of its four corners.
    • Keep edges consistent where quarters meet (the middle of each tile), or seams will show.
    • RPG Maker MV / MZ "A2" autotiles already use this layout, so many existing autotiles work as they are.

    Using the bitmask in your own code

    For each filled cell, add the bits of the filled neighbors and look the sum up in the lookup array from the JSON file:

    // N=1, NE=2, E=4, SE=8, S=16, SW=32, W=64, NW=128
    int mask = 0;
    if (Filled(x, y + 1)) mask |= 1;      // north (Unity: y up)
    if (Filled(x + 1, y + 1)) mask |= 2;  // north-east
    if (Filled(x + 1, y)) mask |= 4;      // east
    if (Filled(x + 1, y - 1)) mask |= 8;  // south-east
    if (Filled(x, y - 1)) mask |= 16;     // south
    if (Filled(x - 1, y - 1)) mask |= 32; // south-west
    if (Filled(x - 1, y)) mask |= 64;     // west
    if (Filled(x - 1, y + 1)) mask |= 128;// north-west
    int tileIndex = lookup[mask];          // 0..46, position in the tileset

    In Unreal, Paper2D tile maps count rows downward, so "north" is y - 1 there. Tile index i sits at column i % 8, row i / 8 in the PNG.

    FAQ

    What is a 47-tile blob tileset?

    A tileset that covers every way a tile can touch its eight neighbors: edges, outer corners, inner corners and all their combinations. 256 neighbor combinations collapse into 47 different looks, so terrain like grass, water or walls joins up correctly in every shape.

    What template does this tool need?

    The RPG Maker A2 autotile layout: an image 2 tiles wide and 3 tiles tall. The top-left tile is the single isolated tile, the top-right tile holds the four inner corners, and the bottom 2 x 2 tiles are a patch with outer corners, edges and fill. Download the example template to see it.

    How do I use the tileset in Unity?

    Slice the PNG with Grid By Cell Size, add the generated editor script to an Editor folder, then right-click the texture and choose Create > Tvashta > Rule Tile From 47-Tile Sheet. It needs the 2D Tilemap Extras package. Paint the Rule Tile on a Tilemap and it picks the right tile automatically.

    How do I use it in Unreal Engine?

    Paper2D Tile Maps have no built-in autotiling, so use the bitmask: for each cell, add the bits of its filled neighbors (N=1, NE=2, E=4, SE=8, S=16, SW=32, W=64, NW=128), look the number up in the "lookup" array of the JSON file and set that tile index. Create a Tile Set from the PNG with your tile size.

    Guides for this tool

    More free tools