Ugly border around sprite?

Hi guys,

I hope someone can point me in the right direction …

When I import a texture (PNG), or have UE extract sprites from a spritesheet (PNG), the resulting sprites have ugly borders around them. They are visible both in the editor, and in game.
This is for use in a 2D game, so I’m using the default sprite material (maskedUnlitSpriteMaterial).

Thanks !

65084-spriteborders.png

So … No one else is having problems with sprites ???
I have tried creating my PNGs with different software (GIMP, Irfanview, …) but that doesn’t make a difference. I also tried JPEG and TGA, as well as different sprite materials …
What am I doing wrong ?

Hello.

I had such problem as well. It can be fixed by changing Filter setting inside the imported picture to Nearest. Just double click the picture in the editor and change the setting. You will not even need to re-extract the sprite to see the result.

I get this from time to time and what I do is I change some settings in the texture itself.

Try this:
Double click your texture in the content browser.
Look at the Details panel on the right of the texture itself.

Enter “Tiling Method” in the search.

You should see X and Y axis tiling methods and pull down menus. The default is “Wrap.”
Use the menu and change Wrap to Clamp.

This gets rid of the ugly borders for me.

1 Like

Setting the filtering to nearest is only good if you have pixel art.
If you wanted to do a Vanillaware style high res sprite, Nearest is a bad idea.

@haruna thank you so much