- December 15, 2012 at 3:47 pm #31076
Can anyone explain how to use new (v3.40) PVRTexToolCL tool to compress textures into the old PVR v2 format?
I tried to apply -legacypvr key, but no luck. This
PVRTexToolCL -i texture.png -o texture -legacypvr -f OGL4444
makes texture with new v3 header (checked it in hex-editor).
On the other side, PVRTexToolGUI with “Save to legacy…” makes proper PVR v2 texture.
This all on Mac OS X platform.
Thanks!December 16, 2012 at 3:35 am #36404
Sorry I can’t help you with your exact problem, but one thing I did was to use the PVRTexTool from the previous SDK release. I’m not sure if you have access to it or not, but if so you might use that tool instead. I had a problem where the textures I compressed using the 3.0 SDK were having a problem. I did notice that the OGLES setting was 1.0 (using the old PVRTexTool). For whatever reason I was able to compress and use with this setting.December 17, 2012 at 11:43 am #36405
-legacypvr is the correct command to create a PVR v2 file with the new interface, however the problem is that you are using an old style format “OGL4444”. Doing this means that the new interface will be unable to interpret the data, and so will fail. Thus it will pass the command to the old interface instead. The old interface used -pvrlegacy instead of -legacypvr (the change was unintentional, but is going to be the style moving forward). If you look at the output there is probably a warning somewhere about using the legacy interface.
To generate the correct output with the new interface, you need to update your formats. OGL4444 will now be the more generic “r4g4b4a4”. I should also note that the OGL prefixed formats of the old interface flipped the texture as well – you can use -flip y,flag to replicate the old output. I believe there’s currently a bug with the flag portion however, which will be fixed in the next update (to be released shortly), so if that doesn’t work, simply omit the ‘,flag’ portion of the command.
So the command you’ll need to get what you want will be:
PVRTexToolCL -i texture.png -o texture -legacypvr -f r4g4b4a4 -flip y,flag
Hope this helps!
P.S. Blamejane, could you elaborate (possibly in a different topic) what problems you were having? I’ll gladly look at the issue and fix it asap. It may already have been fixed for release in the next update as well.October 28, 2013 at 10:26 pm #36406
I have the same problem with the current version but the command you mentioned (“PVRTexToolCL -i texture.png -o texture -legacypvr -f r4g4b4a4 -flip y,flag”) doesn’t work for me. “Compressing…” is displayed but no output was created.
Is there any way I can produce a V2 file ? Everytime I use “-legacypvr” it still outputs a V3 file.
What i need is an OGL4444 file in V2-format with dithering.November 27, 2013 at 9:48 am #36407
It looks like for some reason the 4444 format isn’t being recognised properly and is throwing an error, but not printing it out… I need to investigate this a bit more but it looks like a genuine bug. I’ll try to get a fix and get a fix to you asap.
Once I’ve got a fix ready, I’ll let you know. In the meantime, I’m afraid the only way around this would be to create it in the GUI, or if you have an old PVRTexToolCL.
TobiasNovember 27, 2013 at 9:56 am #36408
Actually forget that – you CAN encode it. The bug is actually in the error message rather than the encoder. To do r4g4b4a4, you need to specify that it’s an unsigned short normalised format – i.e. “-f r4g4b4a4,USN”. Otherwise it defaults to unsigned byte normalised, which is invalid.
Still need to fix the error message however 🙂