Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: firmamentcloud on September 27, 2014, 12:45:20 PM

Title: Why not support Atlases as PNGs in fanal build
Post by: firmamentcloud on September 27, 2014, 12:45:20 PM
i find (ture colour)Atlases texture is not compress!
i know ture colour will use more memory , but i just want to bring my built size down
it will make my moblie game decrease more than half size!
it's very important,because we have very beautifule picture~
 :'(   :'(
Title: Re: Why not support Atlases as PNGs in fanal build
Post by: ArenMook on September 27, 2014, 07:20:08 PM
PNG is a compression algorithm used for files. "Truecolor" method determines what the texture will be in video memory.

It doesn't matter whether the file is TGA, PNG, or JPG -- when the texture goes into your videocard, it will all take the same amount of memory.
Title: Re: Why not support Atlases as PNGs in fanal build
Post by: firmamentcloud on September 28, 2014, 04:56:00 AM
But in unity final build to android or ios , .apk or .api  install file will very very big!
Title: Re: Why not support Atlases as PNGs in fanal build
Post by: Nicki on September 28, 2014, 08:16:52 AM
The final build is zipped on iOS and similarly packed on Android, so having them in true color makes very little difference download size wise vs manually loading in PNGs.

If you want to try it, put a huge png file into Resources and rename its last name from .png to .bytes and load it in with this: http://docs.unity3d.com/ScriptReference/Texture2D.LoadImage.html

In practice, you won't gain much.
Title: Re: Why not support Atlases as PNGs in fanal build
Post by: Wisteso on September 28, 2014, 04:45:15 PM
In practice, you won't gain much.

Absolutely correct, as far as the initial transmission from the app store to the user. IPAs, APKs, and PNGs all use some variant of Huffman based compression, AFAIK. However,I think IPAs get decompressed/extracted during installation, which means not using PNG will result in a higher post-install size. I think...

My app's IPA is roughly 15MB, however, the install size is about 125MB, most of which is probably due to uncompressed graphics. Though uncompressed graphics also means noticably faster load times.
Title: Re: Why not support Atlases as PNGs in fanal build
Post by: Nicki on September 29, 2014, 12:43:13 PM
Yeah, Wiesto, that's exactly right.
Title: Re: Why not support Atlases as PNGs in fanal build
Post by: firmamentcloud on October 08, 2014, 04:17:42 AM
The final build is zipped on iOS and similarly packed on Android, so having them in true color makes very little difference download size wise vs manually loading in PNGs.

If you want to try it, put a huge png file into Resources and rename its last name from .png to .bytes and load it in with this: http://docs.unity3d.com/ScriptReference/Texture2D.LoadImage.html

In practice, you won't gain much.



I just want to compression NGUI atlas , I used your suggest : convert atlas to ".bytes" , and load when start game, but it dose't work , maybe need NGUI function support