When I download them they are RGBA format. To conserve memory I want to change them into PVRTC. How can I do this?
(comments are locked)
|
|
It's not going to happen, there is no functionality to compress to PVRTC at runtime, and it would take an extremely long time to do it anyway. (It's time-consuming enough on a desktop CPU, never mind mobile.) Wow...then how am I going to deal with memory issues?
Feb 17 '11 at 11:33 AM
rudolfwm
Use smaller textures?
Feb 17 '11 at 09:54 PM
Eric5h5
Yes, Im doing that. However the quality of the texture is such that I cant go any lower.
Feb 18 '11 at 07:37 AM
rudolfwm
I have an idea: can I not save those textures (theyre on my webserver) in the PVRTC format?
Feb 18 '11 at 07:38 AM
rudolfwm
No, they can only be JPG or PNG. See the WWW.texture docs.
Feb 18 '11 at 08:01 AM
Eric5h5
(comments are locked)
|
|
I have managed to solve this for Android. I think the same method can be applied for iOS as "the beef of the code" is relying upon standard OpenGL API. I've uploaded a functional demo of my solution to this problem: There are two projects:
One thing I'd like to ask from you: When one (or some) of you guys port this to iOS (I haven't yet taken the time), please send me a copy of the code (or post here)! The idea:
At the time of writing, I didn't have a PowerVR equipped Android at my hands but I've made it working with PVRTC4 the same way some time ago. It's just about making sure that ...
All in all, I think the code is fairly straight-forward, easy to read (not that elegant, though) and shows the common pitfalls to avoid. I hope this helped, please let me know! Wow, that's great. Thanks for sharing. +1
Oct 21 '12 at 11:10 PM
Bunny83
(comments are locked)
|
|
I found the answer in the documentation (of course): Texture2D lTexture = new Texture2D(lWidth, lHeight, TextureFormat. your format here, false); // assign the downloaded image to the main texture of the object www.LoadImageIntoTexture(lTexture ); Actually, this results in lTexture converting to ARGB32!!!!!! any ideas???
Feb 17 '11 at 11:15 AM
rudolfwm
I'm facing the same issue here. Please look at http://answers.unity3d.com/questions/184840/download-and-use-pvrtc-texture-ios.html#answer-217133
Feb 14 '12 at 08:10 AM
codehead
Still no answer? Is it impossible? LoadImageIntoTexture does work with DXT1/5 on desktop, but not with PVRTC on iOS (and DTX1/5 are not supported)...
Oct 21 '12 at 03:34 PM
luisanton
(comments are locked)
|
