2D Toolkit Forum

2D Toolkit => Support => Topic started by: brutang on January 04, 2015, 11:01:45 pm

Title: Tilemap "Tearing"
Post by: brutang on January 04, 2015, 11:01:45 pm
I'm getting this issue on some tilemaps, mainly backgrounds, etc. I set the padding on the tilemap collection everywhere from default all the way up to 10. Anything I'm missing?

Image attached to demonstrate what I mean; i get a 1px line horizontally and vertically through the tile connections as my character is moving.

Thank you
Title: Re: Tilemap "Tearing"
Post by: unikronsoftware on January 04, 2015, 11:21:57 pm
Set sprite collection padding to 1, set to extend. That should improve it somewhat.

The appears when the geometry isn't aligned to a pixel, and either 1. the vertex gets transformed to the adjacent pixel, or 2. the uv sampling is incorrect. In the case of the latter the above should fix it.
Title: Re: Tilemap "Tearing"
Post by: brutang on January 04, 2015, 11:58:34 pm
http://screencast.com/t/JyJbvfdE0dou

http://screencast.com/t/5OEjWmwwy

same issue. I also went in and selected every tile individually and did extra padding: 1 - no different.
Title: Re: Tilemap "Tearing"
Post by: unikronsoftware on January 05, 2015, 10:21:49 am
Are you displaying this tilemap pixel perfect on screen? Are you using an ortho camera / tk2dCamera?
If you're still having the issue then its probably not pixel perfect or aligned properly to a pixel, in which case you'll need to snap your camera position to pixel boundaries.
Title: Re: Tilemap "Tearing"
Post by: unikronsoftware on January 05, 2015, 10:23:28 am
If you're still stuck, post a repro in the private support forum and I'll take a look.
Title: Re: Tilemap "Tearing"
Post by: brutang on January 05, 2015, 07:35:53 pm
Regular ortho camera (not tk2d camera although i switched to that and have the same issue).

Not sure what you mean by displaying it pixel perfect, sorry. Thanks for the help so far!

EDIT: Fixed it by changing Pixels Per Meter to 99.9 on Sprite Collection settings.