- Home /
Jagged / Pixelated edges on all sprites
Hi
(Before I start I`m talking about 2D Sprites not Textures)
My 2D sprites made in adobe illustrator look horrible jagged and pixelated when are not in exactly horizontal and vertical position. So basicaly when am rottating pretty much anything.
Import Sprite settings:
Tried both bilinear and trilinear 4096 size (I export it from AI in 4kx4k) Format tried compressed and 16bit
This is the result: http://i.imgur.com/k9LKPr5.jpg
any help pls? Isnt there any antialiasing?
Answer by b1gry4n · Nov 04, 2014 at 04:25 AM
It looks like the resolution for the texture you are using is too large. Imagine a large image youve scaled down. The pixels in the image are fighting over the same screen space. A solution could be to make the image for that sprite smaller.
If you need to zoom in and out, try creating your own "LOD system" like the built in lod system for 3d models. As you zoom in, at a certain threshold, replace the image with a larger resolution texture. Zoomed out = smaller
Actually the problem was:
-In import settings there was option I think mip mapping or something, I did not see it before so I don`t know I guess it came with new test build 20 or something. -After I turned it on the sprite was nicely smooth ofc kinda blurry with anti-aliasing but better than jagged and pixelated.
But Yes you are right as well. I was importing sprites in 4k x 4k which was really huge.
yeh, mipmapping will make the texture lower res at a distance. Sometimes it may reduce quality in a way that is noticeable/unpleasing to look at. you can adjust it by messing with the ansio setting
It works on my problem. Smaller size. Like 128x128 for my UI buttons. Thanks.
Answer by PuzzleBuilder · May 02, 2018 at 08:30 PM
Turning on "Generate Mip Maps" solved this for me.
Yes. Turning on "Generate $$anonymous$$ip $$anonymous$$aps" and Filter mode "Bilinear" and also compression set to "None" helped my individually imported 2D sprites look good when I hit play. They look more blurred in the Scene window but when I press play they look good. Not tested on sprite sheet though.
This is not necessarily the correct solution though. You want to work with sprites that are sized correctly to the intended screen size to begin with. But it is difficult to elaborate further on this without knowing the specifics of what you are doing and what size/scale these sprites appear at in the game.
Answer by Eric5h5 · Nov 01, 2014 at 04:49 PM
Turn on bilinear filtering for the textures.
I use sprites, it`s 2D game in 2D unity settings.
So sprite renderer, sprite colliders etc.
I'm quite aware of what sprites are. They are still made out of textures. Just turn on bilinear filtering.
Sorry but did you read my original post? :D
"Tried both bilinear and trilinear 4096 size (I export it from AI in 4kx4k) Format tried compressed and 16bit"
The taken picture is with bilinear filtering ON.
All my sprites have bilinear filtering.
Thank you! Generate $$anonymous$$inimaps gets the image improved! Very nice!
YESS! This is the correct solution! Thank you very much!!
Answer by BobbyDoogle · Mar 16, 2016 at 12:10 AM
Same issue in my case it was resolved by upping the "max size" of the sprite in the import settings.
Although I yelled at the artist for making it too big : ' )
Answer by michaelmajor · Mar 02, 2018 at 11:34 PM
In my case, I needed to enable "Alpha Is Transparency" in the Advanced Options of my spritesheet in the Inspector (using Unity 5.5.4).,In my case, I needed to enable "Alpha Is Transparency" in the Advanced Options for my spritesheet in the Inspector.