1
\$\begingroup\$

I recently made some Tiles using a program called Pyxel Edit to create some placeholder graphics. The problem I'm having is that when I move the camera horizontal the edge of the tiles starts to flicker, however if I move the camera vertical it wont.

This is my settings for the Tilemap, I have sliced them up inside the sprite editor. enter image description here

This is a gif of what I'm talking about: enter image description here

The image maybe isn't that clear but if you watch closely you can see some borders appear when I'm moving.

Do anyone know what could have caused this and what could be done to fix it?

EDIT: Second image for clarity: enter image description here

\$\endgroup\$

4 Answers 4

0
\$\begingroup\$

I have faced this problem earlier.This is because the "Generate Mip Maps" option is on. You need to deselect that option and apply the changes to the sprites.

Mip Maps are pre-calculated, optimized sequences of textures, each of which is a progressively lower resolution representation of the same image. They are intended to increase rendering speed and reduce aliasing artifacts. A high-resolution mipmap image is used for high density samples, such as for objects close to the camera. Lower-resolution images are used as the object appears farther away.

Hence in your case the rendering is shifted to a lower resolution due to which you see the gap between two sprites.

\$\endgroup\$
3
  • \$\begingroup\$ I deselected Generate Mip Maps but I still get the wierd edges any clue? \$\endgroup\$
    – Grimbox
    Commented Aug 22, 2015 at 15:54
  • 1
    \$\begingroup\$ That means the slicing is not proper , the weird edges which you see now, were the ones appearing in a blurred way when you had mipmaps on. \$\endgroup\$
    – Hash Buoy
    Commented Aug 22, 2015 at 15:57
  • \$\begingroup\$ I saw a problem like this a while ago. It was due to floating point precision and was fixed by adjusting the isometric camera size... Not sure if that will help but give it a go. \$\endgroup\$
    – Savlon
    Commented Aug 22, 2015 at 22:32
1
\$\begingroup\$

I know that it is an old post but I found a way to fix this issue, so I post it to help people that encounter this bug.

I achieved it by changing the Pixels per Unit of the tileset image to 15.99 instead of 16 (or 31.99 instead of 32...).

That just makes the images a little bit bigger and there are no stripes anymore.

I hope this could help somebody and goodbye!

\$\endgroup\$
0
1
\$\begingroup\$

though @Bic's solution is worked for me on desktops (Mac, Windows) it had no effect on tvOS unfortunately

fortunately using Sprite Atlases solved the issue on all platforms

a Unity thread about this https://forum.unity.com/threads/strange-stripes-and-dots-appear-on-the-tilemap-in-game-mode.1174772/

I did not add the Tiles separately to the Sprite Atlas like on the video, instead added the sprites the tiles were generated from that did the trick perfectly

\$\endgroup\$
0
0
\$\begingroup\$

creat new material> sprite> default and check the pixel snap and apply to your tiles

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Hello Khalid Redfox, and welcome to GameDev.StackExchange! The community here usually likes detailed answers, so you could consider editing your post to include a brief description of why this will help, or a before / after example to demonstrate. This can help your answer stand out and attract votes. :) \$\endgroup\$
    – DMGregory
    Commented Nov 13, 2017 at 14:52
  • \$\begingroup\$ i hade the same problem (tiles dosent fit properly while moving 2d) and i make a sall research and i found there are other peoples that have the same problem and i found that when you creat a new 2d material (sprite/default) and go to the material property and check if the pixel snap is true and then apply this material to all your tiles that you have in your scene i try it and it works for me also if you can try to make some modification to your quality option before you build your game i try it and it works for me i dont know if it could help you but i hope it will \$\endgroup\$ Commented Nov 13, 2017 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .