Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Strange stripes and dots appear on the tilemap in game mode.

Discussion in '2D' started by manking99, Sep 26, 2021.

  1. manking99

    manking99

    Joined:
    May 29, 2021
    Posts:
    11
    Hello!
    When displaying a tile map only in game mode (in scene mode everything is correct), strange stripes or dots are displayed. For example, if there are canvas image or text objects under the map. That is, as if the tiles are translucent. If you change the resolution, then the positions of the points and stripes may change, or they may disappear altogether.

    Unity version 2021.2.0b13.

    1. Game mode 1920x1080.
    tilemap1.png
    2. Scene mode. All correct.
    tilemap2 no problem.png

    3. Game mode. 1366x768. More problems.
    tilemap3 1366-768.png

    4. Game mode. 4k resolution. no problems.
    tilemap4 4k.png

    5. Game mode. 1366x768. Turn off all other game objects in scene. Problem stays.
    tilemap5 turnoff all objects.png
     
  2. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    246
    Hi @manking99, I'm guessing this could be an oversampling issue. Perhaps you could try dragging all of these Spritesheets/Tilesheets textures into a single Sprite Atlas. Sprite atlasing helps add some padding to the tiles thus removing those border lines you see during runtime.

    Here's a short and concise YouTube tutorial that shows you how to Sprite Atlas your textures to fix these Tilemap line artifacts.



    Moreover, other than the visual fix, Sprite atlasing also comes with other advantages too. One would be a smaller performance overhead as Unity can call this single Texture to issue a single draw call instead of multiple draw calls. If you are interested, here's more info on Spirte Atlasing.
     
    Last edited: Sep 26, 2021
    manking99 likes this.
  3. manking99

    manking99

    Joined:
    May 29, 2021
    Posts:
    11
    Unfortunately it didn't help.
    I have about 10 atlases. there the size of the textures at the atlas is 8192. some images from other atlases will still be lower than the tilemap.
    I understand correctly that there is no way to fix this bug and it will always be in unity? In the scene mode, after all, everything is displayed correctly as in 4k resolution.

     
  4. Xiangting_Su

    Xiangting_Su

    Unity Technologies

    Joined:
    Sep 22, 2020
    Posts:
    246
    Let me check with the devs and see if they know what could be the issue.
     
  5. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    @manking99 Would it be possible to file a bug report using the Unity Bug Reporter with your project and post the case number here, so that we can check it out? Thanks!

    Based on the images so far, it is possible that the non-whole values of the Scale and Positions of the Transforms for the Tilemap are exacerbating the issue you are experiencing here. You may want to adjust the PPUs of your Sprites, and oversize your hexagonal Sprites a little to compensate for the values used in the Transforms.