- Home /
only pot textures can be compressed if mipmaps are enabled
The way I understand the message- if I've checked the mipmaps checkbox & my texture is NPOT, it's even worse than without mipmaps because without mimaps at least I'd get a compression and with mipmaps I get no compression at all because they are NPOT. This is the way I understand it.
No matter if the above is true or false, 1 thing is for sure, having only or the majority of sprites to be POT is a performance boost, at least on older devices(android). The thing is that the way the game is designed, it'd be extremely hard to have all or the majority of sprites to be POT.
1) Let's say we've got 500 textures in a small 2d game. 20 of which are backgrounds and the rest- in game stuff. How many should be the normal number for POT sprites included in the total number of 500?
2) How can I make the majority of sprites to be POT, taking into consideration that they have definite size?
3) In which situation should I make sure the sprites are POT and in which it woudn't matter much?
4) How can I maximize the number of POT sprites in my game?
It's trivial to make any texture POT; change the texture type to advanced and set the non power of 2 setting to something other than "none". Or just add padding in Photoshop or whatever.
Tnx for the reply, the thing is that I'm using sprites not textures and I can't use the advanced options there.
I tried the thing that you said but I coudn't actually understand how exactly to make it work for my case. http://i.imgur.com/owOLtfv.png This is simple scene example of my project & all the gameObjects inside are being rendered on the screen with the SpriteRenderer and when I make the textures from Sprite to Advanced and apply it, I'm not allowed to use them in my scene.
I have this same issue. I'm attempting to use the image in a UI button, so it needs to be the Sprite (2D and UI)
Texture Type.
Answer by litebox · Apr 04, 2016 at 01:56 PM
You just need to use "power of 2 size of image": for exmple, 512x512 pixels, then sprite (2D and UI) will be compressed automatically.
Answer by virgilcwyile · Feb 29, 2020 at 12:36 PM
Yes @litebox is right that the image should be in the power of 2. 128x128, 256x256, 512x512 etc. I and my team created a tool to change NPOT texture to a POT texture for one of our project. We had to compress Memory Size in IOS and Android. Check it out it's free. http://bluecreazione.com/imageprocessor/
Answer by awsapps · Sep 23, 2021 at 08:47 PM
Some times Unity DOES compress image that its Length and Width are multiple of 4 (ETC2) but not a 2 power, and other times, it complains for ETC1 ( which, by the responses on this thread, is asking for a 2^a x 2^b image).
Is it possible to switch between ETC1 and ETC2 compression?
Your answer
Follow this Question
Related Questions
About MipMaps problem. 4 Answers
sprite power of two and sprite packer 0 Answers
Grass mipmaps does not switch. 0 Answers
is this a mipmap problem? 1 Answer
Android (Galaxy Tab 2): Sprites are black when mipmaps are disabled 1 Answer