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
  • Hi stacysmith apologies for not providing enough information. I'm using a third party sdk called Cocos2D-x that is c++ based and compiles to various different platforms, the renderer it uses is OpenGL. The platforms I'm targeting are Android, iOS and Windows Phone, but when I refer to ETC1 I'm talking about the Android build version specifically. The engine doesn't abstract too much away from the developer and it's perfectly feasible to control the pipeline.

    Sorry if this is a silly question but is ASTC the same as ATITC (ATC) format? as described here <supports-gl-texture> | Android Developers
    I chose ETC1 mainly because of it's universal compatibility with devices, I guess that is the same thing as "legacy reasons".

    I'm fairly sure the library for decompressing zlib is already included in Cocos2D-x, but I'm not sure how to compress them in the first place, does it have command line tools or do you write a program to do it. My textures are loaded during a loading screen before each level then unloaded at the end of the level.

    I didn't know the assets are compressed by the apk, that's really interesting. Does that mean it would be a pointless exercise to compress them with zlib only to be further compressed by the .apk. Can they be compressed twice? Compressed textures, being compressed and then compressed again lol. Sorry I'm not too knowledgable about the whole texture compression.

    I'm not sure what you mean by delete the unpacked files, you mean delete the unpacked zlib textures which are stored in the ram after they are loaded to the gpu? I'm only concerned with the size of the .apk right now not the performance.

    I will have a few sets of assets that scale according to screen size, (sd, hd, 2xhd) etc.

    I have several very large backgrounds with tileable assets that a repeated, packed up in to sprite atlases, we're talking at least 20+ (2048x2048) textures.

    Let me know what you think,

    It's really good to get an insight from a graphics expert.

Reply
  • Hi stacysmith apologies for not providing enough information. I'm using a third party sdk called Cocos2D-x that is c++ based and compiles to various different platforms, the renderer it uses is OpenGL. The platforms I'm targeting are Android, iOS and Windows Phone, but when I refer to ETC1 I'm talking about the Android build version specifically. The engine doesn't abstract too much away from the developer and it's perfectly feasible to control the pipeline.

    Sorry if this is a silly question but is ASTC the same as ATITC (ATC) format? as described here <supports-gl-texture> | Android Developers
    I chose ETC1 mainly because of it's universal compatibility with devices, I guess that is the same thing as "legacy reasons".

    I'm fairly sure the library for decompressing zlib is already included in Cocos2D-x, but I'm not sure how to compress them in the first place, does it have command line tools or do you write a program to do it. My textures are loaded during a loading screen before each level then unloaded at the end of the level.

    I didn't know the assets are compressed by the apk, that's really interesting. Does that mean it would be a pointless exercise to compress them with zlib only to be further compressed by the .apk. Can they be compressed twice? Compressed textures, being compressed and then compressed again lol. Sorry I'm not too knowledgable about the whole texture compression.

    I'm not sure what you mean by delete the unpacked files, you mean delete the unpacked zlib textures which are stored in the ram after they are loaded to the gpu? I'm only concerned with the size of the .apk right now not the performance.

    I will have a few sets of assets that scale according to screen size, (sd, hd, 2xhd) etc.

    I have several very large backgrounds with tileable assets that a repeated, packed up in to sprite atlases, we're talking at least 20+ (2048x2048) textures.

    Let me know what you think,

    It's really good to get an insight from a graphics expert.

Children