Graphical quality problems - Inkscape to Unity

Hello,

I will try to make it short. I drew vector graphics character in Inkscape, exported only selection of the character multiple times in various DPI’s (30, 96, 100, 128, 196, 300) to .png (rasterized) then imported to Unity, where I set various Pixels per Unit (96, 100, 1000), Filter Mode: Point (no filter), Compression: None, Max Size (2048, 512, 4096, 8192), tried different scales of the game object (0,5, 0,7, 0,8, 1, 2, 3, 4). I even tried .svg format, but it wasn’t really better - too sharp. Set Game camera to QHD, Scale 1x, tried post processing all the possible anti-aliasings (also no anti-aliasing), even build and run the project (I read it looks better when it is compiled than within Unity editor) and even tried Pixel Perfect Camera package within Unity (Assets Pixel per Unit (128, 100, 200, 300), Reference Resolution: 2560x1440, Crop Frame: none, Grid Snapping: Upscale Render Texture). I also checked some tutorials on importing 2D sprites, but no matter what it still looks bad. It is either too sharp, too blurry or with some artifacts - you can see my various attempts in the first picture, compared to beautifully looking .png picture (attached below this text) that is opened in Windows Photos outside of Unity.

I don’t know how to achieve that quality and why Unity is so problematic. Can you help me?

character

Here are just heads, because there are the differences most visible. Those 6 heads are from Unity and the 1 head is just plain .png.
unity_build_run_character_head
character_head

The vector graphics package seems abandoned in its current experimental state. Even their docs suggest not using it in production. :slight_smile:

One option is to import it into Blender3D, convert it to a mesh and use that in Unity.

I was just scribbling about this here:

:blush:

Fortunately, I didn’t trust the vector graphics package from the start when I first saw it (just my intuition), so I focused mainly on getting my rasterized graphics (PNG format) to work correctly. Vector graphics (SVG format) were just an option that I have also tried.

In the end, I figured it out on my own. After wasting several hours trying various approaches, I finally found a combination that worked for me as I wanted.

So for everyone (including me as reminder):

For QHD (2560x1440), I had to export all the graphics at 128 DPI to PNG format, import it into Unity, set the Pixels per Unit to 128, and also use a Pixel Perfect Camera, which I imported as an additional package. For the Pixel Perfect Camera I set the Pixels per Unit to 128 and the Reference Resolution to 2560x1440.

Additional note: you should also set imported graphics Filter Mode: Point (no filter) and Compression: None. In default there is also Max Size: 2048, which is mostly okay, actually you could set even less, but for me it just works, but if you have something with bigger size like 500x4000, you should set it higher like Max Size: 4096 or even higher, so it will look better.

It may seem obvious (just set everything to 128), but it wasn’t. I think I have tried setting everything on 100 DPI in the beginning, but it didn’t work (because it depends on target resolution). Many sources suggested exporting at least at 300 DPI, setting 1000 DPI in Unity for the asset, bla bla…, and mentioned nothing about the camera. Unity could be more user-friendly in this aspect.