For iPhone game development, I switched from PNG format to PVRTC format for the sake of performance. But PVRTC Any reason why it happens this way and how I can avoid this.. If PVRTC compression is blindly doing 4bpp conversion (1024x1024x0.5) irrespective of the transparencies in the PNG, then whats the compression we are achieving here..
I have 100s of these 1024x1024 images in my game as there are numerous characters each doing some complex animations.. so in this rate of 512KB per image, my app would get more than 50MB.. which is unacceptable |
||||
feedback
|
9
|
In general, uncompressed image data is either 24bpp (RGB) or 32bpp (RGBA) flatrate. PVRTC is 4bpp (or 2bpp) flatrate so there is a compression of 6 or 8 (12 or 16) times compared to this.
A requirement for graphics hardware to use textures natively is that the format of the texture must be random accessible for the hardware. PVRTC is this kind of format, PNG is not and this is why PNG can achieve
PVRTC compression is carried out on 4x4 blocks of pixels at a time and at a flat bit rate so it is easy to calculate where in memory to retrieve the data required to derive a particular texel's value from and there is only one access to memory required. There
PNG compression does not work at a flat bitrate and is more complicated to retrieve specific values from; memory needs to be accessed from multiple locations in order to retrieve a single colour value and far more memory and processing would be required every
So for offline storage (the size of your application on disk), PNG is smaller than PVRTC which is smaller than completely uncompressed. For runtime memory footprint and performance, PVRTC is smaller and faster than PNG which, because it must be decompressed, If you want to reduce the storage footprint of PVRTC you could try zip-style compression on the texture files and expand these when you load from disk. |
||||
feedback
|
1
|
PVRTC (PowerVR Texture Compression) is a texture compression format. On devices using PowerVR e.g. most higher end mobile phones including the iPhone and other ARM-based gadgets like the iPod it is very fast to PNG is lossless compression. PVRTC is lossy compression meaning it approximates the image. It has a completely different design criteria. PVRTC will 'compress' (by approximating) any type of artwork, giving a fixed bits per texel, including photographic images.
PNG does not approximate the image, so if the image contains little redundancy it will hardly compress at all. On the other hand, a uniform image e.g. an illustration Its apples and oranges. |
||||||||||||||
feedback
|
0
|
dramatically reduce your memory consumption. If you images are, say, 64x64, then you can place 256 of them on a 1024x1024 texture in a 16x16 arrangement. With a little effort, images do not need to be all the same size, just so long as you keep track in the code of the rectangle in the texture that each image is at. This is how iPhone game developers do it. |
||
feedback
|
0
|
I agree with Will. There is no point in the question. I read the question 3 times, but I still don't know what Sankar want to know. It's just a complain, no question.
The only thing I can advice, don't use PVRTC if you mind to use it.It offers performance gain and saves VRAM, but it won't help you in this case. Because what you |
||||||||
|
you mean that you have animation sequences saved as 1024x1024 PNGs? – Will Nov
6 '09 at 19:16
most of them are 1024x1024 sized PNGs.. altho mostly it has gotta to do with the PVRTC requiring the images to be in square.. otherwise they can be smaller sized PNGs.. – Sankar Nov
9 '09 at 5:22