Bad quality in game mode 2D sprite

Hello guys,
I have a small problem. In Scene mode, my sprite has the correct quality, just like it should. But in Game mode, it looks sus (has poor quality). I don’t know why, but I believe someone here could help me. If more details are needed, I’ll be happy to provide them. Thx for any response.

image settings:

scene mode:

game mode (zoomed):

game mode (zoom 1x)

In game mode the sprite is probably taking less pixel space than its actual resolution, and therefore it has to be scaled down, losing some detail in the process. Zooming in will not fix that, as that zoom occurs after the sprite has already been scaled down. Either make the sprite object bigger in the game or draw a lower resolution image for it. Also make sure that the pixels per unity match the values you want.

Okay, so if I understand it correctly, I now have two options — either make the object bigger or draw a smaller image. But I actually need the character to appear small on the screen, so do you think that if I make the object bigger and also zoom the camera out, the quality should be good, or will it still look bad?
And also, how exactly should I set the pixels per unit?

this happens because of a very simple mechanic

imagine that your screen only has space to display 2 pixels (2x1 screen size)
now imagine that you have a sprite that is 1 pixel (1x1 size)

what hapens now if you take your sprite and you display it on the middle of the screen? position = 0.5x

since a pixel cannot be divided into half, the engine will now have to decide what to do, here are some options:
1 - it displays your pixel on the left side
2 - it displays your pixel on the right side
3 - it displays your pixel on both sides
4 - it doesnt display your pixel
5- it displays a color on both sides, but different color than your pixel(anti alias)

so you see, here i listed 5 things that can happen, but none is what you wanted, which is to display a pixel on an invalid location.

This will get even worse if you now take your 1x1 sprite and you use unity to reduce the scale of the sprite to half, now its even worse, your sprite now occupies less space than 1 pixel. Even if you try to display that sprite dead center on a valid location, 1 pixel cannot be divided in half, so how should your 0.5 size sprite be displayed on 1 pixel screen size?

what happens to your sprite here is an extrapolation of the logic i described, your screen doesnt have enough pixels to fit your sprite in the location and scale you placed it, and so it removes and adds pixels randomly where they fit

you can research more on this with the keyword “pixel perfect”

in general if you want a quick fix you just have to change the orthographic size of your camera until your sprite appears large enough that these deformations can look acceptable

imagine if you pulled back your camera even more, eventually your sprite would become just a brown pixel right?

2 Likes

So if I understand it correctly, the image is too big to be scaled down that much, which means my only real option is to redraw it smaller, right?
And yeah, the more I zoom the camera out, the more the pixels start to disappear.
For example, when I use a resolution of 1920×1080 and the character has a scale of 1,1,1 (x, y, z), it looks great — but I need it to be much smaller. I could either zoom the camera out or scale the object down, but both of those options end up deforming the image.
So, thinking logically, the best option for me would probably be to draw a smaller version of the image.
And maybe instead of using Krita, I could try Inkscape.

Making the object bigger and then moving the camera further away will just result in the same thing. The issue is that when the frame is rendered, the sprite in the game is occupying much less screen pixel space then the actual image resolution, so some pixels have to be stripped.

The most ideal solution is to redraw the sprite in a lower pixel resolution. However you can also try changing the filter mode of the sprite in its inspector settings. Right now it’s set to point, which will just exclude pixels where necessary and will produce quite ugly results. Bilinear filtering will try averaging out pixels which will probably look better in your case.

Yeah okay, I understand now — thank you very much for the help <3.
Probably just one last thing: is it better to use Krita or Inkscape in your opinion?

1 Like

Welcome! I have not used any of those so can’t help you with that, I still just use plain old GIMP haha.