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 » Fri Oct 26, 2012 8:44 pm

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*
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: PVRTC textures & compression tool

Post by masterfalcon » Fri Oct 26, 2012 10:43 pm

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.
0 x

NazguL
Kobold
Posts: 33
Joined: Tue Mar 09, 2010 2:17 am

Re: PVRTC textures & compression tool

Post by NazguL » Thu Nov 01, 2012 12:18 am

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*
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: PVRTC textures & compression tool

Post by masterfalcon » Thu Nov 01, 2012 8:24 am

That's definitely a good point. Perhaps I'll take a look at this tomorrow night.
0 x

highflyers007
Gnoblar
Posts: 3
Joined: Fri Oct 19, 2012 7:17 pm

Re: PVRTC textures & compression tool

Post by highflyers007 » Fri Nov 02, 2012 7:14 pm

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.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: PVRTC textures & compression tool

Post by masterfalcon » Fri Nov 02, 2012 7:27 pm

Don't worry, I'm already on it.
0 x

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: PVRTC textures & compression tool

Post by masterfalcon » Sun Nov 04, 2012 3:50 am

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.
0 x

aoikonom
Gnoblar
Posts: 23
Joined: Tue Aug 07, 2012 11:05 am

Re: PVRTC textures & compression tool

Post by aoikonom » Wed Apr 17, 2013 1:50 pm

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?
0 x

Post Reply