I have an application on the PC that is writing mesh data and a light map to a web server. Then, I have an iPhone application which uses the www class to download the mesh info (from a text file) and light map texture (from .png). I’ve created a new texture2D, and would like to use TextureFormat.PVRTC_4BPP_RGB, but it says that I’m not allowed. Apparently, this is because PVRTC compression is a tool in Unity.
I believe the 1024x1024 RGB light map that i’m trying to load at run time is killing my app.
So, I’m wondering if I can use the pvrTex tool http://www.imgtec.com/PowerVR/insider/powervr-pvrtextool.asp to compress the image before it gets loaded to the web server. I don’t see anything about loading .pvr files from www though. Does anyone have experience with this?
Thanks in advance.
You already have texturetool installed:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool
Not sure if you can load pre-compressed pvr images via the www class, although I don’t see why not. It seems like it would be possible.
Thanks for that.
Problem is, I need the texTool on the PC side. The application on the pc side creates the texture then loads it to the web.
I actually just got the texTool working on the PC, and it created a new .pvr file for me. But it didn’t work using www. I got the dreaded red question mark.
You can not load pvr from the web as you will find out in the docs: file:///Applications/Unity%20iPhone/Unity%20iPhone.app/Contents/Documentation/Documentation/ScriptReference/WWW-texture.html
You can load only PNG or JPG through WWW
Also you can’t use pvr on anything but the iphone hardware. That means not even in the Unity iPhone editor you are able to use PVR.