- Home /
Gaps between tiles in a tileset
I have looked up a lot of answers for this, and I haven't found anything. I am using Unity's built in tile thing, and it's all pretty great except for that the tiles will have these weird random gaps between them. I have it on point filter, made sure my splits are right, turned off mip maps and anti-aliasing, have the thing on clamp, and did literally everything and this still happens. Does anyone know how to make it so there aren't these lines here? Thanks (Im using the Sunnyland asset pack while I'm messing around with tiles)
So for your problem, I'm not sure if this is the best/easiest way to do it, but when i first worked with tiles in Unity i got the same problems and found an answer for this.
Just to clarify I'm working with 16x16 tiles and on my tileset I let a gap of 1 pixel around every tile. So every tile is 18x18.
Now with the gap of every tile I have a gap of 2 pixels between two tile cause one pixel for the first tile plus another pixel for the second tile. (I hope you know what I'm trying to say)
The gap I get around every tile I repaint with the color of the pixel I get next to it. I know this is a lot of work to redo but after I first noticed this I took attention to this and paint every tilemap like I said above.
I think the problem whit Unity is that when you crop out the tiles individually from a sprite sheet Unity doesn't recognize the tiles exactly and the tiles are like a very little bit bigger than you defined them and so the tiles have a little bit from the pixel next to it.
At the moment I'm not on my computer but as soon as I've got time for that I post screenshots of what I mean.
Hope I could help you with this "trick" with your problem.
Answer by The_Icaruz · Jul 16, 2018 at 05:38 AM
So now I'm at my computer.
In the attached picture I got following results
If I place the red tile I got an white outline on three sides and an gray line on the right.
If I place the red tile I got an white outline on every side.
If I place the red tile I got an black outline on every side. (the red is my 16x16 tile and with the black oultine its 18X18.
What am I doing now is I take the third method and recolor the black outline with the color I got of the pixel next to it from my tile.
Here is a tile from me wich I repaint with this method :
When I place the tile on the left I get an black oultine around of it. (without the black outline my tile is 16x16 pixels) To the right I got my tile repainted with the color of the pixel next to it and my tiles fit perfectly without any transparent or other outlines.
Sorry for the complicated method but I got no other solution for this. (if there is one please tell me)
If something is unclear just tell me and I'm trying to help you.
Your answer
Follow this Question
Related Questions
Perfect Hexagonal Tilemap 1 Answer
Tile Palette not showing tiles 14 Answers
Having trouble with dragging sprites into the tile palette 1 Answer
Make tilemap better 1 Answer