Hello Guest

Author Topic: Odd Sprite Issue?  (Read 5170 times)

Kyuur

  • Newbie
  • *
  • Posts: 6
    • View Profile
Odd Sprite Issue?
« on: August 26, 2014, 12:35:59 am »
Hi folks,

Just got started with 2D Toolkit, really enjoying working around in it so far.

I've run into a problem, and not entirely sure what is causing it. I have a single SpriteCollection with multiple sprites drawing from it. At certain pixel positions (every .5ish), the sprite is displaying a little bit of the texture above the one it should be displaying in the atlas. As far as I've been able to tell, this is only happening vertically. I've changed resolutions, removed and added all the different overrides, tried various options in the SpriteCollection and nothing seems to be fixing it. Any ideas?



The sprite on the left is at y:50, the one on the right at y:51.

Edit: Upon further inspection, the pixels above aren't even from anything I put in the collection. They were created somehow.
« Last Edit: August 26, 2014, 12:37:44 am by Kyuur »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Odd Sprite Issue?
« Reply #1 on: August 26, 2014, 11:15:27 am »
It might be pixels bleeding over the edge. Try setting padding to 1 in the sprite collection, it may help.

Kyuur

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Odd Sprite Issue?
« Reply #2 on: August 26, 2014, 09:08:59 pm »
Thank you! I guess I missed that option, did fix the bleeding. Sprites are still displaying oddly at certain coords:



One on left is at y:0, one on right at y:0.1. The entire sprite is only 4px high, so it seems to be trimming about 1/2 a pixel off the bottom for some reason and adding some on top. Gonna mess around with settings to see if I can find something but any help would be appreciated.

Modify: On second look, I think it's still 'bleeding', just that the atlas texture now has the padding directly above. Switching the padding mode to Black Zero Alpha removes the bleeding from above, but it's still missing half a pixel or so off the bottom for some reason.
« Last Edit: August 26, 2014, 11:34:11 pm by Kyuur »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Odd Sprite Issue?
« Reply #3 on: August 27, 2014, 09:49:58 am »
It almost looks like its not pixel perfect. If its slightly expanded / compressed you would expect these kinds of artefacts.

Kyuur

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Odd Sprite Issue?
« Reply #4 on: August 27, 2014, 05:49:06 pm »
Yeah... would it help if I set up a quick project to illustrate my exact settings? It should be pixel perfect from what I understand, I've made the native and previous resolutions the same, pixels per meter are at 1.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Odd Sprite Issue?
« Reply #5 on: August 27, 2014, 06:16:07 pm »
Yup totally, please put it dropbox or similar and email a link to support @ unikronsoftware.com

Kyuur

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Odd Sprite Issue?
« Reply #6 on: August 27, 2014, 07:26:56 pm »
Sent.  :) Thank you.

Kyuur

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Odd Sprite Issue?
« Reply #7 on: August 30, 2014, 08:58:56 pm »
Hey Unikron, just wanted to make sure that you received the project files I sent?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Odd Sprite Issue?
« Reply #8 on: August 30, 2014, 09:26:39 pm »
Yes I did, sorry not had the time to look at it yet.