Hello Guest

Author Topic: Distorted Images and black lines appearing on edges.  (Read 4683 times)

marcosramos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Distorted Images and black lines appearing on edges.
« on: September 29, 2012, 12:09:21 am »
The QA of my project is already on my neck about some messy images, and unfortunately i run out of ideas on how to solve this.

Some images get messy, especially images that has a lot of curves or text on them. Plus some other images get random black borders, even when the asset has nothing like that. Sometimes moving the image makes the border disappear, but i'm clueless why.

I attached two examples. I'm using compression on the images with the dark edges, but i'm not using it on the other one that has messy shapes. Plus, i'm not using atlas bigger than 2048, but even so the game is built to web.

The Lines on this special case i sent you are huge, but it's usually not that bad.

The other image has some "crosses" on it, can't describe any better.

Thanks in advance!
Best Regards.




unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Distorted Images and black lines appearing on edges.
« Reply #1 on: September 29, 2012, 12:13:52 am »
Black borders are usually caused by incorrect alpha on the objects. Switching to premultiplied alpha usually sorts that out -
1. In the sprite collection editor, go into settings and tick Premultiplied alpha
2. Select the material and switch shader to "PremulVertexColor"
(also, if you have premultipled alpha ticked, but don't have premulvertexcolor selected, you'll have the same issues)

Also, try multiselecting the sprites you're getting black border issues with and switch Pad Method to Extend.

So the one with those "crosses", does is that sprite diced?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Distorted Images and black lines appearing on edges.
« Reply #2 on: September 29, 2012, 12:14:35 am »
One last thing, try turning off mipmaps on the texture, if that helps then that'll point to the texture not being displayed at the correct size.

marcosramos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Distorted Images and black lines appearing on edges.
« Reply #3 on: October 01, 2012, 08:49:43 pm »
Hello!

It seems that you solved the black borders issue! The premultiplied solution didn't help, but when i edited the pad amount on the collection editor to 1, the black borders stopped spamming. So one problem less ;D thanks!

About the other problem, as i don't even know what is sprite dicing, i'm probably not using it. I will search what that is, but it's certainly not the problem.

Any other idea?

marcosramos

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Distorted Images and black lines appearing on edges.
« Reply #4 on: October 01, 2012, 09:06:32 pm »
Wow!

Nevermind. It seems that in one of the revisions something resclaled the images, and even the scale being 1.01 it messed up the texture.

Everything cool now!

Thanks for your attention!

Just a question... If i need to rescale images ingame, is there anyway that the image get less distorted? Any setting to get things a little better? Because i'm having trouble to redimension anything, they get horrible.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Distorted Images and black lines appearing on edges.
« Reply #5 on: October 01, 2012, 11:33:45 pm »
Hard to tell what is causing this without actually looking at the image. I could look into it for you, if you could send me a copy of the image or part of the image on support@unikronsoftware.com