This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compressing ETC1 Texture with a library

I'm finding that ETC1 textures (.pkm) are taking a rather large amount of data up on my storage device. What options are there for further reducing the file size, such as compression with a third party like zlib, anyone know how to do that? Is there any other techniques to reduce the file size without compromising quality?

Parents
  • ASTC is a new cross platform standard, described here  ASTC Texture Compression - OpenGL.org

    There are also a couple of blog posts about it from myself:ASTC does it and ASTC Does It - Part II: How To Use It

    It's fairly new so older devices might not be compatible, that said the window of what you can reasonably be expected to support is always moving forward.

    zlib compression is the same compression used when you create a compressed folder on you PC, also known as zip. Without getting into the details of how compression works, compressing files which are already compressed has a certain degree of diminishing returns, each time you edge closer to entropy (a fancy word for the minimum possible size something can be compressed to without losing data). The compression of APKs isn't the most exhaustive compression available so you may get minor returns although it depends on the files themselves, which will already be nearer to entropy than a raw RGB file due to the texture compression.

    During my time on the Demo team we would extract assets from the APK onto the SD storage of the device the first time the application was run, then loaded the decompressed textures into the GPU (the files were still ETC compressed, but they were no longer compressed in the APK). I'm was assuming this was similar to your setup such that the assets were taking up too much space decompressed, and so deleting the SD cache after loading could help. Since the size of the APK is your concern that wouldn't help much.

    If you're sure you need all the textures and they're all appropriately sized in their atlases (which I can't really comment on, I can just assume you're being honest with yourself as to how much is needed), the only real course of action is to have the textures stored elsewhere, such as hosted on a webserver contacted by the application on the first run to download them into the SD storage.

    -Stacy

Reply
  • ASTC is a new cross platform standard, described here  ASTC Texture Compression - OpenGL.org

    There are also a couple of blog posts about it from myself:ASTC does it and ASTC Does It - Part II: How To Use It

    It's fairly new so older devices might not be compatible, that said the window of what you can reasonably be expected to support is always moving forward.

    zlib compression is the same compression used when you create a compressed folder on you PC, also known as zip. Without getting into the details of how compression works, compressing files which are already compressed has a certain degree of diminishing returns, each time you edge closer to entropy (a fancy word for the minimum possible size something can be compressed to without losing data). The compression of APKs isn't the most exhaustive compression available so you may get minor returns although it depends on the files themselves, which will already be nearer to entropy than a raw RGB file due to the texture compression.

    During my time on the Demo team we would extract assets from the APK onto the SD storage of the device the first time the application was run, then loaded the decompressed textures into the GPU (the files were still ETC compressed, but they were no longer compressed in the APK). I'm was assuming this was similar to your setup such that the assets were taking up too much space decompressed, and so deleting the SD cache after loading could help. Since the size of the APK is your concern that wouldn't help much.

    If you're sure you need all the textures and they're all appropriately sized in their atlases (which I can't really comment on, I can just assume you're being honest with yourself as to how much is needed), the only real course of action is to have the textures stored elsewhere, such as hosted on a webserver contacted by the application on the first run to download them into the SD storage.

    -Stacy

Children