Hello Guest

Author Topic: Tilemap "Tearing"  (Read 5156 times)

brutang

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Tilemap "Tearing"
« 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

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap "Tearing"
« Reply #1 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.

brutang

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Tilemap "Tearing"
« Reply #2 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.
« Last Edit: January 05, 2015, 12:06:07 am by brutang »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap "Tearing"
« Reply #3 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.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Tilemap "Tearing"
« Reply #4 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.

brutang

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Tilemap "Tearing"
« Reply #5 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.
« Last Edit: January 05, 2015, 08:54:48 pm by brutang »