1
\$\begingroup\$

I'm trying to make an 64x64 tilemap using Super Tilemap Editor & Unity but my tiles looks terrible. I did my research about pixel perfect 2D and all of the solutions were for pixel art, they didn't work for me.

I have the following tileset I made in Adobe Illustrator as an example

enter image description here

Tiles looks like this when placed in game (1x zoom)

in-game

I'm pretty sure they're not 64x64 in game, they also look pixelated probably because they're smaller than they actually are on camera.

So my question is, how can I calculate the correct camera size for 64x64 tiles and do I have to make any changes in order to make sprites look pixel perfect? I'm currently using 1080/64/2=8.4375 (vertical resolution / PPU / 2) as camera size.

\$\endgroup\$
1
\$\begingroup\$

Even if your game uses a 2d art style which is not traditional pixel art, it can benefit from pixel-perfect rendering.

There used to be some convoluted tricks you had to employ to achieve pixel-perfect drawing of 2d sprites. But most of those are now obsolete, because since a couple versions Unity has a pixel-perfect camera.

Download the 2D Pixel Perfect package through the package manager. It comes with an alternative camera component, the "Pixel Perfect Camera" which solves a lot of common issues with tilemap rendering. As per the guide above, you also need to make sure that all your 2d image assets have the following import settings:

  • Pixels Per Unit: Must be the same value for all sprites. I recommend to use your tile size, so one tile is one unit wide.
  • Filter Mode: Point (no filter)
  • Compression: None
| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Your game won't be very accessible if you're trying to set the camera size. If what you want is the pixel like look then when importing your sprites you'll want to change your pixels per unit to have them scale differently within the unity engine. You have them set to 64, but you can make it any size you want. Just figure out what looks good on your camera. Modern pixel art games rarely tie the camera to your pixel size. You'll also want to set your filter mode to "point". This will stop unity from smoothing when scaling your texture. If all your assets in your game are like this consider looking up AssetImporter. Unity gives you tools to automatically set these settings when importing assets.

EDIT: Misunderstood the part about changing the size of the camera. Disregard that. I think you're just missing the "point" filtering

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.