Image resources compression problem after upgrading to Unity 4

Hello!

Upgraded to Unity 4.1.5f1 / Windows 7 (was Unity 3.7) and faced to some STRANGE bug. I have a lot of JPG images in Resource folders of project.

On many of this images “compression” property set incorrect after the project conversion to Unity 4 format.

And, I am not able to set up the correct compression!

For example: I select image, in inspector select “DXT1” format, click Apply - and in Preview see that images has the: “RGB-24” format.

OK, I select “DXT5”, click “Apply”. Now Image compressed to “ARGB 32” format!

See the screenshots.

Target platform: Android. There were no any problems on Unity 3, the generated APK file size was 42MB, but now it’s 176Mb because of incorrect image compression!

How to fix it?

P.S. I have investigated that this bug is appears when “Non Power of 2” field is set to “None”. If I select any other value - everything is working OK. But, I need this field to be set to “None” (I need to know the real image size and proportions) and it worked fine in Unity 3!

Is it possible to fix by some way?



Nobody knows about this problem?

The sole solution is to downgrade?

Many optimized compression texture formats have requirements about the texture’s dimensions. I don’t know anything in particular about DXT but most sources online agrees DXT have to be power of two.

We might be more strict to enforce it in 4.0, probably due to some problems that has been encountered. I recommend writing an import script that stores the dimensions for you and imports it as power of two.

** SOLVED **

I have found the solution. To make the compression work image resolution (both sides) must be just divisible by 4.

It’s a little strange that nobody here knows it yet :slight_smile: