- February 6, 2014 at 8:27 pm #31611
i am using PVRTexTool 4.1.3 (SDK build 3.2@2628132).
If I import a TGA with an explicit alpha (saved in PS CS6 with 32-Bit) and open it in the PVRTexTool, it removes any pixel information where the Alpha is 0.
I think this might be because photoshop is saving it premultiplied?! But there is no option to change this behaviour and save with a straight alpha, afaik.
Then I tried to use the Tool in PVRTexTool “Edit individual Channels” to merge RGB and A from two files together:
If I open the first RGB File and then try to add an alpha from another file. Nothing happens.
If I create a new and blank texture, and try to get the RGB data from a file and the alpha from another, it just copies the Red Channel into the new file.
I think this is not supposed to work like that and it’s a bug.
Could you please fix this or support another option during TGA import to get proper RGB info and the explicit Alpha so we can encode some different information in one texture? like Diffuse (RGB) and Specular Map (A).
Is it perhaps possible with the Commandline Tool of PVRTexTool?
Thank you a lot!
PhilippFebruary 10, 2014 at 9:50 am #38404
TGA files are flat files – if the RGB has been pre multiplied away by Photoshop, there’s no information in the file to get those values back.
There’s nothing in the TGA loading code which should cause this to happen, though the GUI relies on Qt’s loading code for TGAs (which admittedly isn’t great), and I can’t say whether it’s doing anything weird. The CLI tool uses its own proprietary code, which I’ve run against a TGA test suite that it passed with flying colours – so you may get better results if you run it through that first.
I just tried the channel mixer in the GUI, and it’s misbehaving in the way you’ve suggested. I’ll file a bug and make sure it’s fixed for the next release. You can do this via the CLI tool as well, and afaik that code is working correctly. If you need any help using the command line version, please let me know!