Padding Adjustments

Hey there. Our team is trying to add 1 pixel of padding to all of our 32x32 sized tiled. This would make them now 34x34 with us trying to use the inner 32x32 square as the ‘tile’. However I am running into a ton of things.

How am I attempting this?

  1. Taking the png, adding making the sheet 34x34 (increasing the size), centering each tile so we get a blank pixel around and then coloring that one pixel in the match and make it seemless.
  2. I export that image into tiled. Replacing the old one.
  3. I go to the tileset and change the properties. Selecting the new image, and changing the margin and spacing. Mine currently looks like 32x32 with margin and spacing of 2.

It seems like Tiled is cutting off the tile though. Am I missing something else I should be adding? I have seen other posts about changing the image size, but I don’t see that option in tiled. Do I have to add that in the xml part? If so how?

Also, if I were to use the tileset properties and make it 34x34, well then the map ends up being 34x34 tiles and thats not right either.

So the end goal is to have two 32x32 tiles next to each other, both with 1 pixel (because both have 1 pixel) between them hidden.

Thanks in advance!

It seems you want to use a margin of only 1 pixel.

A margin of one ends up making it not cut evenly in Tiled. Ill attach a bunch of screenshots of how I made the sheet and then the different tiled settings.

Here I added the 1 pixel padding. The image right below is the 1 pixel padding but a blank instead of filled it.


32x32 with margin of 1 cut in tiled.

34x34 with margin of 1 cut in tiled.

32x32 with margin of 2 and spacing of 2 cut in tiled. This doesn’t look like the correct image. There should be one dark border on the top.

34x34 with zero cut shows the full tile but I need that 32 tile size with padding of 1 all around the block.

Also if this is NOT the way to add padding please tell me! I am trying to solve the horizontal and vertical line issues in unity. I’ve tried basically everything in unity from AA, pixel snap, materials etc. Everyone just says add padding and thats the best way.

Took @bjorn advice from discord and made it 32x32 with a margin of 1 and spacing of 2. Seemed to cut correctly in tiled, but when I import to Unity I get some weird behavior. Seems like the tiles are now 34x34 or maybe I can just see the overlapping?

@Seanba thoughts? I’m using the older Tiled2Unity. Currently trying SuperTiled, left you a comment in discord on that separately though.

This is what it looks like in tiled:

and in unity

Seems that the tiled side is fixed and this isn’t a tiled question anymore?

This ended up being fixed by using SuperTiled2Unity instead. @Seanba is the man!

2 Likes