Godot TileSet .tres Generator
Stop slicing tiles by hand. Point at a tileset, set the grid, and download a
TileSet with a TileSetAtlasSource, every tile defined, and
optional terrain and collision layers.
res://tiles/terrain.png. Load a tileset to start.
Grid preview
TileSet + one TileSetAtlasSource,
optionally with a terrain set and a physics layer.
What it generates
A Godot 4 TileSet resource with a single TileSetAtlasSource.
Every cell inside the margins becomes a tile, serialized as:
0:0/0 = 0
1:0/0 = 0
... That is the same format the Godot editor writes when you create an atlas source and click “Create tiles”.
Margins and spacing
| Setting | Meaning |
|---|---|
| Margin | Empty border around the whole image. |
| Spacing | Gap between adjacent tiles. |
| Tile size | Size of one cell, also the region size. |
The grid math is tile_x = margin + column × (tile_width + spacing). A tile is
included only if it fits inside the image.
Using it in Godot
- Put the PNG in your project at the path you typed.
- Put the
.tresanywhere in the project. - Create a
TileMapLayerand assign theTileSet. - Paint. The tiles are already defined; no “Create tiles” step.
FAQ
Does this upload my tileset?
No. The image is read in the browser to show the grid; the .tres is generated locally.
What texture path should I use?
The path the PNG will have inside your Godot project, for example res://tiles/terrain.png. The generator cannot know your project layout, so it writes the path you type.
What are margins and separation?
Margin is the empty border around the whole tileset. Separation is the gap between tiles. Both are in pixels; set them to 0 for a tightly packed sheet.
Does it create terrain or collision?
Yes, optionally. Turn on “Add a terrain set” to create terrain 0 and assign every tile plus the selected peering bits. Turn on “Add a physics layer” to add a rectangle collision polygon to every tile.
Why does the .tres show 0:0/0 = 0?
That is Godot 4's serialized tile entry: atlas coordinates x:y, alternative 0, with value 0. It is what the editor writes.