This utility converts PNG file with transparency to 32bits TGA file (RGBA).
WHY IS IT USEFUL:
Unity converts all images into its own format.
There is a white border on the translucent parts when Unity imports PSD image (1_PSD screenshot).
If PNG image has transparency then Unity generates RGB components unpredictably (utility window screenshot). That image looks fine when drawing one to one (left part of 2_PNG screenshot) but has artifacts when used on 3D objects or used mipmaps (right part of 2_PNG screenshot).
This problem is not in TGA vs PSD, and it’s not related to compression. The problem is in how PNGs work. Transparent pixel loses its color information, and defaults to “white”. If you try to “fix” an existing PNG file, there is no guarantee that it will work by converting it to TGA. None at all.
Not really. The format pretty much can deal with colour information in the transparent areas. But some creation steps removes this information then. And some software too. Default white is a typical Photoshop problem for example. An image saved as png by Gimp can have colour informations in the transparent area. At least when you do the right steps.
Most programs have a “Save color of transparent pixels” option when saving to a format that supports transparency. It’s important to know what the RGB values are in your image despite transparency, also.
Solidify is a better solution for fidelity: Targa fixes the pixels at mip level 0, but artifacts creep in at other ones. However, Targa/this utility may be faster and more practical, and yield close enough results – much better than PSD.
What i don`t really understand is why you need to convert from PNG to TGA for that. TGA just makes sense when you have 16 Bit per channel. But the result is still 8 Bit, right?
Yeah, this little utility is great- although one thing, I’d love to see it slightly more tightly integrated into Unity. Currently, when you open the tool, you get a finder window, and have to navigate to the file to convert, and then when you save, similarly have to navigate to a save location. It does exactly what is advertised, and regarding mipmapping, surely converting the TGA into RGBA32 solves that anyway- the point is that it does the whole tedious solidify process in Unity.
I’d like to see it as a custom asset preprocessor, or at least, a right-click on a file in Unity->PNG to TGA perhaps? Something that enables you to process a batch of files would be great too.