- Home /
PPU, Canvas Size and Pixel Perfect pixel art sprites.
Hi there, I'm trying to remove squashed/elongated pixels in my sprites for a 2D pixel art game in Unity.
Unity Version 2019.2.8f1.
My target resolution is 1920 x 1080.
I have drawn all sprites on a 200 x 200 pixel canvas using Asesprite.
I have removed compression, set filter mode to Point and set the Pixels Per Unit (PPU) to 64, for all sprites in the game.
I have set the camera arbitrarily to 3.7, and this produces results that appear very good, although there are occasionally noticeable elongations.
I have tried using a script to set the orthographic camera size to 1080 / 64 / 2. I have to double scale when doing this, and the results are good for the most part, but there are still noticeable artifacts (as if an entire pixel wide line across the screen is missing in places.
It's worth noting that while I use a 200 x 200 asesprite canvas, my sprites could easily fit within a 128 x 128 canvas instead.
Just wondering if anyone had any suggestions for resolving this so that the sprites are perfect. I am not so far along in development that complete reworking of all sprites isn't possible.
EDIT It seems that, for some reason, the only sprite that isn't working is the death animation. Just to clarify, the sprites are drawn in the centre of a 200 x 200 pixel asesprite canvas. The PPU is 64, and I slice each sprite at 200 x 200. Because the death sprite is the only one where the sprite falls lower than the base standing point for all sprites (like, where they stand up from), it seems to have elongated pixels etc. I've fixed this by having transforming within the animation in Unity, but it's still a mystery to me why this behaviour happens!
Thank you :)
Your answer
Follow this Question
Related Questions
Poll which line of code app is stuck at? 1 Answer
creating a game? 3 Answers
Programatically creating entire Unity games 2 Answers
Apps crash in development build 0 Answers
Can i create a virtual globe in unity? 0 Answers