I made some tiles such as Walls within a graphic software and saved them as PNG with a good quality.
In Unity I imported the tiles (pictures) and used them in a Tilemap.
I have a simple script that can zoom in/out using the mouse scroll.
The problem is when in runtime I zoom out a bit, the quality of tiles gets weird and sometimes some borders of walls are not shown as you can see in the picture.
I tried to take some screenshots in different situations as you can see below:
I also tried to use the 2D Sprite Atlas. It didn’t solve the problem as well.
This is the settings of my imported Wall tile. Again I also tried every possible Wrap Mode, Filter Mode and so on.
this is normal behaviour think about it like this:
your screen has x amount of pixels to display your sprites
on the perfect configuration all sprites take 1 pixel
you have 1 green pixel next to 1 black pixel
now you zoom out by x2, now your 1 green pixel and 1 black pixel need to be shown as 0.5pixels
but 0.5 pixels is not possible to be shown so unity has to choose if it shows the green pixel or the black pixel
thats the gist of what is happening, you could change your filter mode to bilinear and it would show a dark green pixel by blending the black and green pixels but you probably dont want that in a pixel art game
just remember pixel art games used to have a fixed zoom for this reason, if you think about old school pixel games you wont find any that let you zoom out
Thanks for these useful information. I actually don’t have a Pixel Art game. I’m trying to make a sample project such as Oxygen Not Included, Prison Architect and Rim World. I’m not really sure if I’m saying this correctly but I think these games are not Pixel Art games, right? If they’re Pixel Art games, then why they don’t have this problem? How can I make the graphic of my sample project to be like those games to not getting weird by zooming out? I used the Inkscape to make some Walls in 32x32px and use them in Unity Tilemap autotile.
I appreciate if you can tell me what softwares are used in 2D industry games to make such arts like in those games that I named.
the graphics are probably done in photoshop, alternatives for free version are (gimp or paint.net)
inkscape is a vector graphics software which is not ideal for unity since they will be converted to raster graphics anyway to be used in unity
as for the rest, you are right that those arent pixel art, if you want to go for that style make your sprites a bit larger, instead of 32x32 make it 64x64 or 128x128
also if that still gives problems try switching your import settings from filter mode point to bilinear
another thing, always try your zoom in a full screen build, if you are looking on the small window of the unity editor it will be more prone for that problem, as I said the less pixels there are in the screen the more content will have to be cut out and since the editor window is so small there are very few pixels which will create more artifacts than a zoom out with full screen
I heard that Inkscape is a good tool for making 2D game assets because like you said it’s a vector graphic software and it gives me the ability to make my assets in any sizes and then export them as png in any size I want. But of course I’m an amateur designer and cannot say anything 100% sure about such things.
I’m going to try it again with 64x64px or maybe 128x128px like you said to see what the result is.
But I think I should not only change the size, but also make those borders a bit wider because currently the borders are 1px wide and if I only make the Walls bigger with the same borders, then I will probably see the same problem.
nono that feature of vector graphics is meant for physical printing, for logos or other designs that must be printed on shirts or billboards, for games you should use raster graphics
you ofc can use the vector graphics anyway but there is not much point to it
I did another test and made a 64x64px tile which has 3 times wider borders. It means the first Wall had 1px border and the new one now has 3px wide black border.
Now I’m able to zoom out a bit more but still the same problem exists!
I also tried both Filter mode: Bilinear and No Point. To make sure about the screen size I even built it as exe file and tested it separately.
I just don’t know what is missed here and what must be done to not get this weird behavior.
Games like Oxygen Not Included, Prison Architect and Rimworld don’t have this problem, even when the screen is zoomed out at maximum!
An example: At this level I think the screen is zoomed out like 10x