Why, when I import texture files in PNG format does Unity turn them into garbage? I’ve recently returned to Unity and I know I’ve build many projects in the past with PNGs that looked great. Is it something specific to v3.1.0f4? I tried a lot of different settings, turning off compression, etc, but the textures a totally garbled. When I import the same textures at TGA everything looks normal.
That is just a display in inspector thing. Look at the icon on top of inspector next to the name of the image (Cone_01). Looks fine to me. Will also look fine in game if/when u use it.
Click on the RGB/Alpha button in the preview title to see the correct alpha mask.
It has to look like that, or alpha blending won’t work right. If TGAs looked fine in the preview, then they would have ugly edges when applied to a mesh.
Except that they look this way when applied to the mesh, inside the live game! And the reason the other icon looks good is because it’s a TGA file. The icon of the PNG looks equally bad. What to do?
Alpha support for PNG is limited, so it’s usually best to use a format that has real alpha anyway, like PSD, TGA, etc. If the PNG isn’t working, there’s no reason to try, just use another format.
PNG has full alpha support and no problem. If you ever used Fireworks you know that PNG actually is basically en par with PSD in many fields.
There is only one known case where it has problems and thats if you use Photoshops integrated bullshit exporter which has been total crap since Photoshop 6 an eternity ago.
With Photoshop you want to install SuperPNG (though it does not hurt in other applications with ps6 api either :)), which results in smaller, much better and unlike Photoshop, PNG standard compliant images. (photoshops output isn’t png compliant, its running on the edge of “webbrowser accepted” and thats all it focuses at, the web export)
One word of warning with image export in general: Keep in mind that unity supports the color profiles in the images, so its possible to garbage stuff just cause you forgot to export stuff without color profiles.
It’s very odd because I used the exact same setup 6 months ago to build games with full PNG support. I exported from Photoshop in the same way as I am now. I don’t think my version of Photoshop changed. I’ll try installing SuperPNG and see if that does the trick.
Regardless, there’s no particular reason to use PNGs. You might as well use PSD if you’re using Photoshop, instead of jumping through hoops trying to get PNG to work.
PNGs are THE bread-and-butter image format, so I expect them to work. I prefer them to PSD because I get quick thumbnail previews and they’re less bloated. Plus, I have games already built on PNGs and I want them to work.
You should get quick thumbnail previews regardless of image format. It doesn’t matter if PSDs are bloated or not, since the source format is never used in the build, and they are easier to work with since you can keep all layers etc., and just hit save, instead of having to export. It’s understandable that you’d expect PNGs to work if they did before though.