Is it possible to improve the scaling method of texture importing?

¡Hello!

First time asking here - and I’ve been running Unity3D for 3 years long - so first of all thank you very much for being such a great community: you had most of my questions solved by the time I needed to ask. Thank you very much, this is just great!

That said, I have a problem I can’t find an answer for. So please allow me to explain my situation.

I’m working on a mobile/tablet game, where I’m both the programmer, designer and artist. It’s a 2D game, and I’m using TK2D and Spine. As a 2D artist, my technique is to use very high resolution PSDs (6144x8192px) to create the art, then scale it down to the final resolution.

At the beggining, I was doing the downscale manually, but recently I’ve developed a very little script that automatically sets the Max Size Texture2D Import setting to half, quarter, eighth… of the original PSD size. And it works pretty well! I feed 8K graphics to Unity and can get with no effort a 4K, 2K, 1K, HK and QK version of my game.

I plan to upload different versions of my game to Google Play, so players will get the best APK size and GPU performance possible.

But… I have a problem with the HK and QK versions, which would finely approximate to the 480x640 and 240x320 resolutions. And the problem is that the importing algorithm of Unity would not work as nicely as I would expect when downscaling this much (image is 2048x2048 - please download to watch in actual size):

So, as you can see, my expectations are that the importing process would downscale as good as Phothoshop does with the bilinear filtering, but the result in Unity just seems to be ignoring part of the information, resulting in scattered pixels here and there and texts that are quite uncomfortable to read. The problems gets even worst when game characters are involved, but I can’t disclose these just yet :slight_smile: .

I know of many solutions to my problem, like manually exporting differently sized versions of the graphics from Photoshop. I could even batch the whole process differently, both in Photoshop and Unity, but I believe the best (i.e. easier for me and most comfortable in the long run) option would be to improve the way Unity does the downsize when importing.

For me, it would be great if I could overwrite the method implementation for the importing/downsizing algorithm. Either that or change some magical settings that I just have not been able to find, of course. I don’t mind if it takes longer to import, since, in the end, I will be reimporting just when it’s time to prepare new APKs for new versions.

So, after all this long text, this is my situation and this is my question: is it possible to improve the scaling method of texture importing?

Thank you very much in advance!

Ok, just replying to myself, I found out that the minimizing method used by Unity when importing is actually very similar to the one in this TextureScale (http://wiki.unity3d.com/index.php/TextureScale) snipet.

And looks like it loses some information, since, for each new texel it only uses 4 color values and these values are aligned to pixel values. This is 99.99% of the time far more than enough, but my case is just on that 0.01% that’s left out, so I’m just implementing a system that combines Photoshop Droplets with Unity Editor Scripts to generate alternative textures, then set them to materials.

I sure hope this will work :slight_smile: . Thank you all anyway!