PVRTC textures & compression tool

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Post Reply
NazguL
Kobold
Posts: 33
Joined: Tue Mar 09, 2010 2:17 am

PVRTC textures & compression tool

Post 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*
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: PVRTC textures & compression tool

Post 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.
NazguL
Kobold
Posts: 33
Joined: Tue Mar 09, 2010 2:17 am

Re: PVRTC textures & compression tool

Post 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*
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: PVRTC textures & compression tool

Post by masterfalcon »

That's definitely a good point. Perhaps I'll take a look at this tomorrow night.
highflyers007
Gnoblar
Posts: 3
Joined: Fri Oct 19, 2012 7:17 pm

Re: PVRTC textures & compression tool

Post 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.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: PVRTC textures & compression tool

Post by masterfalcon »

Don't worry, I'm already on it.
User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126
Contact:

Re: PVRTC textures & compression tool

Post 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.
aoikonom
Gnoblar
Posts: 23
Joined: Tue Aug 07, 2012 11:05 am

Re: PVRTC textures & compression tool

Post 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?
Post Reply