How to paint terrain for auto tile of tilemap?

Godot Version

4.2.1

Question

this square is 48px.
https://i.imgur.com/0b2sKB7.png
and tilesize setting is 16px of tilemap node.

i want adding border by autoTile for tilemap.
how to paint to terrain for autoTile?

i painted terrain to this pattern and upper scene is it result.
but auto tile is not work by this terrain pattern.
please hint about this.

Your terrain has only 10 tiles (or 9 because one is not painted). For autotile to work correctly, you usually need 16 or 47 tiles. If you have only 16 tiles, select “Match sides” mode (Inspector → TileSet → Terrain Sets).

  1. Add more tiles (see image below)
  2. Select “Match sides” mode
  3. Paint your tiles like this

1 Like

thanks for comment.
I filled in the terrain as you said. Each block is 16px.
After filling it in as you instructed, I used path mode and it connected automatically.

tileSet
https://i.imgur.com/xtQ89pv.png

Is there an official explanation for this mechanism? I don’t quite understand how it works."

i see this page now.

1 Like

Great that it works now

I don’t know about an official explanation but here is a short explanation: The amount of tiles needed depends on how many different ways tiles can be connected to other tiles. So technically you can have less than 16 tiles but then the way you can connect the tiles is very limited. Match sides mode means that you ignore all diagonal (corner to corner) connections.

Try painting the tiles in different ways and see what happens when you place them. That is what helped me to understand it.

thanks you.
I will continue to experiment with the tool a little more and strive to understand it.

1 Like