Search Unity

Tile Map Tearing Problems

Discussion in '2D' started by mactinite77, Jan 31, 2014.

  1. akshay2001

    akshay2001

    Joined:
    Dec 22, 2015
    Posts:
    4
    Thanks! This method really works You helped me from the trouble of redoing all my work.
     
  2. AShenawy

    AShenawy

    Joined:
    Apr 3, 2018
    Posts:
    1
    I guess it's been a while since any updates on this thread, but it does include multiple solutions so at least one is bound to work. I just had the same issue and what worked for me was disabling the AA in quality settings, like Fariel mentioned:
    To do this go to "Edit > Project Settings > Quality" and for every level of quality I disabled the Anti Aliasing. This fixed it instantly in the editor, didn't even have to build to double check.. but I did anyway :D

    Let me add that my issue was not gaps between tiles but rather streaks of solid lines that may or may not show at random.
     
  3. fatassmofu

    fatassmofu

    Joined:
    Aug 5, 2018
    Posts:
    1
    I have this problem for almost a week, already tried yours. It worked at first, but I forget to save the game, next time When I try to use this "New material" solution, it's just not working. Those lines don't pop up again but, more lines appear
    Do you know how to fix those? still trying other solutions.
     
  4. bodart_a

    bodart_a

    Joined:
    Oct 12, 2015
    Posts:
    3
    I think I just found a good solution for using dark textures reacting with lights !
    /!\ This solution is only for those who use the Tilemap Unity system.

    Just create a new material with the following shader : "Legacy Shader/Diffuse" (because the Sprites/Diffuse shader doesn't work).

    And apply this material to your tilemap into "Tilemap Renderer".

    This solution worked for me on my tilemaps. Fell free to ask me more precisions if you need it.
     
    Last edited: Aug 13, 2018
  5. aledbarreto

    aledbarreto

    Joined:
    Jan 28, 2019
    Posts:
    1
    Hello everybody!!

    Dealing with this problem I found out that the only definitive solution is putting a 2px padding in every tile. I tried everything and randomly happens in animations. It feels good to know that I wasn't the only one with this problem, I thought I was doing something really wrong
     
  6. CarterG81

    CarterG81

    Joined:
    Jul 25, 2013
    Posts:
    1,716
    Last edited: Jun 11, 2019
  7. GalopeTeam

    GalopeTeam

    Joined:
    May 13, 2014
    Posts:
    5
    I found a solution using Unity's native tilemap.

    After losing all the weekend looking for that Pixel Bleeding issue I almost give up using Sprite Sheet, but then I could understand better the cause of this problem and found a rather simple solution. It won't use any plugin or special coding.

    In my case I'm using 16x16 block size and 1.1 camera size.
    • - No Pixel Snap Material
    • - No Manual sprite extrude and extrude edges 1 (sprite default)
    • - Mesh type Tight
    • - Sprite Atlas with Filter mode Point and Format RGBA 32

    All I had to do was resize the tile by removing -0.0001 pixels both in X and Y.



    This negative micro-pixel won't affect the visuals of any sprite and it will fix the pixel bleeding. I tested for an hour and the issue was gone.



    This is barely noticeable and appears only in the corners, I noticed because I was using a pink bg to make sure I could see the line. Using a black background solve this or another sprite below.
     
    Last edited: Jun 11, 2019
    Nope404, CarterG81 and mgear like this.
  8. Nope404

    Nope404

    Joined:
    Jun 3, 2016
    Posts:
    2
    Love your solution! Thank you
     
  9. Tammaire

    Tammaire

    Joined:
    Feb 21, 2019
    Posts:
    1
    Hello, guys, I'm continuing the glorious necroing to add a solution that worked for me <3

    Adding the spritesheet into an atlas seemed to have fixed the problem.
    I started with a solution using the sprite packer (over there : https://nielson.io/2015/10/fixing-gaps-between-sprites-better-2d-in-unity-part-2) but this tool being legacy, now, I tried to find the replacement and found a video explaining the sprite atlas (
    )

    The documentation is here : https://docs.unity3d.com/Manual/class-SpriteAtlas.html

    Note : I also used the pixel snap thingy (that's wasn't enough) and the automatic orthographic change wasn't fixing the tearing either for me (and I didn't want to use it anyway). Disabling all of these seems to be still working, leaving only the atlas.