Do sprite atlases double-compress sprites?
If I imported a texture with default settings (automatic compression) and then put that in a sprite atlas, it seems that Unity compresses the image twice, resulting it very poor quality.
Me and other Unity developers I know have always assumed that sprite atlases are based off the original (uncompressed) versions of sprite atlases - so for example if I set a sprite atlas to uncompressed, the results will always be a high quality atlas.
So if Unity does in fact double-compress sprites in atlases by default, is there a way to disable that? Sure I could manually set every source sprite to uncompressed as a workaround, but that's hard to maintain on large projects with hundreds of sprites.
Answer by Todd-Wahoske · Feb 09, 2020 at 01:14 AM
I was noticing the same double compression issue on my project (2019.2.12f1)
I ended up making all the original textures uncompressed sprites RGBA 32 bit (on iOS and Android) and then compressing only the sprite atlas per platform: Compressed ASTC 6x6 block - iOS and RGBA Crunched ETC2 - Android.
Not sure if this is the best way to go? I'd assume the project would only load the compressed sprite atlas and never the original base textures inside my sprite atlas folder. But I worry about things a lot and would like some sort of verification from a more knowledgeable person if said person exists.
Does anyone have a better answer or advice for not getting double compression in a non-legacy Sprite Atlas? -Thanks
I am also curious if the base textures get included in the build if a Sprite Atlas is used. If so, that would increase the size of the APK / IPA unnecessarily. I hope someone can confirm if this is the case or not.
Answer by LilGames · Feb 27, 2020 at 03:36 PM
I recently discovered the same issue and have been fixing it by setting source sprite compression to "None" and then setting the atlas compression according to the results I want. Note that the same issue seems to happen if you make Master and Variant atlases. Don't compress your master and then configure the variant.
My UI just went from mungey ugly to CRISP and SHINY!
Your answer
Follow this Question
Related Questions
Question for @Mavina , What Program? 1 Answer
Sprite Atlas - preview not working 1 Answer
Sprite packer with loaded resources 1 Answer
Solved: Why is there such a drastic difference in build sizes between local and cloud builds? 1 Answer
Why are some of my atlased sprites contributing to non-atlas build-size? 0 Answers