Page 1 of 1

PVRTC textures & compression tool

Posted: Fri Oct 26, 2012 8:44 pm
by NazguL
Hello,
I've been looking for a way to load and use a PVRTC texture inside Ogre Android, is there a specific tool to convert into PVRTC file readable for Ogre?
I am currently using the PVRTexTool from Imagination but the conversion to .pvr file doesn't seem to be loaded by Ogre.
I'm getting the error of "This is not a PVR file" coming from the PVRTCCodec::decode and the reason is that PVR_MAGIC != pvrTag ... Even if I remove the Header check I get a segfault after that, so I'm suspecting that my PVRTexTool conversion to PVRTC is actually faling/wrong/not readable for Ogre... While if I use one of the Tests/Media/ogreborderUp_pvr*.pvr files it works fine.

Side questions:
- currently I'm simply modifying the .material file to look for a .pvr file instead of .jpg, is there anything else I would need to setup in the code?
- is PVRTC2 supported?

Thanks,
A*

Re: PVRTC textures & compression tool

Posted: Fri Oct 26, 2012 10:43 pm
by masterfalcon
Not sure about PVRTexTool. But I've used Apple's texture tool like this:

Code: Select all

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/texturetool -e PVRTC -f PVR --bits-per-pixel-2 -m -o out.pvr inputfile
At the moment PVRTC2 is not supported. Mostly because we haven't had a chance or hw to test on yet.

Re: PVRTC textures & compression tool

Posted: Thu Nov 01, 2012 12:18 am
by NazguL
Thanks, using the texturetool from a Mac it works.
However I can see that the header file generated with texturetool and PVRTexTool is different - I'm not sure where this texturetool with PVRTC extension is coming from, but to me Ogre should be able to open the PVRTC files generated from the PVRTexTool since this is Imagination's proprietary encoding.

A*

Re: PVRTC textures & compression tool

Posted: Thu Nov 01, 2012 8:24 am
by masterfalcon
That's definitely a good point. Perhaps I'll take a look at this tomorrow night.

Re: PVRTC textures & compression tool

Posted: Fri Nov 02, 2012 7:14 pm
by highflyers007
I was trying to get the pvrtc textures from the Imgtec tool to get it working, but I cant seem to find the exact files where I can change the pvrtc decoding. Could you give me some directions for this and also some documentation on how pvrtc headers differ for the Imgtec tool and texturetool, if you have any.

Thanks a lot.

Re: PVRTC textures & compression tool

Posted: Fri Nov 02, 2012 7:27 pm
by masterfalcon
Don't worry, I'm already on it.

Re: PVRTC textures & compression tool

Posted: Sun Nov 04, 2012 3:50 am
by masterfalcon
Just pushed changes to the 1.9 branch. Only files created with the PVRTexTool are supported now.

But the following has been added:

1. Cubemaps
2. Mipmaps
3. Preliminary PVRTC2 support. Since the GL spec isn't available I don't know what the format enums are.

Enjoy! And let me know if there are any issues.

Re: PVRTC textures & compression tool

Posted: Wed Apr 17, 2013 1:50 pm
by aoikonom
I am using Ogre 1.8 in windows. Which tool can I use to convert images to pvrtc since PVRTexTool format is not recognised and Apple's texturetool is for Mac?