Search Unity

Bug Strange lines when using tilemap

Discussion in '2D Experimental Preview' started by WolfMountainGames, Oct 1, 2016.

  1. WolfMountainGames

    WolfMountainGames

    Joined:
    Apr 7, 2016
    Posts:
    16
    When I use the tilemap editor I get lines everywhere like this: TileLines.PNG
    And if I change the zoom on the camera or on in the scene the lines change... I am not sure exactly how to fix this, but I do remember that in a previous version there was a similar bug like this.
     
  2. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    259
    I ran into this too. Turn off Bilinear filtering on your tilemap textures.
     
  3. WolfMountainGames

    WolfMountainGames

    Joined:
    Apr 7, 2016
    Posts:
    16
    When using pixel art I always use "point(no Filter)", this is what it would look like in bilinear: Bilinear.PNG

    Often just changing it to point helps as
    Point filtering - texture pixels become blocky up close.
    Bilinear filtering - texture samples are averaged,
    but I think that this is something else.
     
  4. WolfMountainGames

    WolfMountainGames

    Joined:
    Apr 7, 2016
    Posts:
    16
    I tried turning off anti-aliasing and turning on pixel snap and that fixed it in the game view.. for now, but in the scene view, there is a vertical line in between every row....
     
  5. AndressMartin

    AndressMartin

    Joined:
    Jun 24, 2017
    Posts:
    12
    Sorry for necroing this thread, but did you find a fix?
     
  6. guiguimanu

    guiguimanu

    Joined:
    Mar 6, 2017
    Posts:
    17
    This is a common problem in making 2d tile based games. It isn't Unity specific and the solution is usually to add a pixel bleed around the edge of each sprite in your spritesheet.

    I recommend googling spritesheet bleed.

    Hope this helps!
     
  7. cuproPanda

    cuproPanda

    Joined:
    Apr 20, 2014
    Posts:
    2
    What fixed it for me was going into the Package Manager and enabling '2D Pixel Perfect'. 2D Pixel Perfect gives you a Pixel Perfect Camera script which you can add to any rendering cameras, fixing the tile tearing.
     
    stevebla likes this.