I was curious if you need to convert any textures that you pull from the web server to pvr prior to loading them into the iOS device. Or does iOS convert this on the fly, and if it does I would assume throwing 20 textures at it from the server would cause the poor cpu to blow up and slow the game down?
You can’t convert to PVRTC on the fly…it takes quite a while to compress on a fast desktop, so it would probably take like 10 minutes per texture on an iOS device.
–Eric
So basically the iOS device can load the PNG, but it takes up quite a bit more memory… hmm, Ill prob look for a unix command line tool to convert all the images the artists upload to the server to pvr and have the iOS specific device pull those instead…
thoughts?
The memory use is not that much of a problem actually.
You need to totally overdo it for it to become a problem on 3GS+
There’s pvrtextool that has a command line version (linux version too, I think) that lets you convert images to pvr.
won’t help cause you can’t load pvr from outside. JPG or PNG or raw bytes, thats it.
Ah, yeah, that’s right, my bad.
hmm… yea we have various items that go into our market of the game which are png’s 128x128 with alpha , it seems that 30 or so during loading slows down the game, and we get a memory warning…
Ideally we could store those in our app folder on the iOS, but we want to be able to easily update the thumbs with out having to do a new build each time for apple.
Thoughts would be create a texture atlas of our market items as a png, push it to the app, save it to the apps local dir, then convert it their to png to load? or are we stuck with anything that’s pvr needs to be in the executable?
thanks for your comments guys.
Pardon my ignorance of unity, but when you say “raw bytes” does that include PVRTC data? If so, he could still use the Imagination Technologies command line pvrtextool and then use the Imagination SDK libraries to strip off the PVR header.
If I understand correctly, you are suggesting that Unity isn’t aware of the compression? But then Unity wouldn’t use glCompressedTexSubImage2D with the GL_IMG_texture_compression_pvrtc extension; thus, it would be difficult to tell the GPU that the data is compressed (though there might be a way in Unity Pro). I guess that kind of inflexibility is the price to pay for not having to program in OpenGL (ES).
By the way: nice to see you posting here. ![]()