Hey guys, I've recently started learning 3D at University and I have some questions when it comes to file formats that my teacher couldn't really answer for me.
I notice that when I save a file, with no need for transparency, as a TGA it's vastly larger in size than if I save the same file as PNG. If I flip back and forth between these two I notice no difference in quality.
Is PNG advisable at all to use or does 3D Software have problems with it (or other problems?). At the moment we're using Maya 2009.
While I'm at it most of our books seem to use and recommend using TIFF as opposed to what seems to be the more commonly used TGA, my teacher couldn't really give me an answer here either as to which is preferable.
Replies
But as already mentioned, it depends what you use the images for.
So if I have a scene which will not be used in a game engine but rather as a short movie the difference between PNG and TGA wouldn't be anything other than a difference in size?
And for in-game usage the usage depends on the engine itself, for what it's optimized for?
-Adam
It's like a flattened PSD, you can count on every pixel bieng where you placed it when you open it up. If you're going to be importing and compressing the textures later for use in an engine considering they normally have their own compression method. You probably do not want to compress already compressed textures. which is why TGA is preferable most of the time. You can also count on the alpha channel always being a seperate channel instead of being written in one of three other crazy ways that allow for compression.
The box may say PNG but the contents could be different:
There are many ways to write and read PNG's there isn't a set format, especially when it comes to alpha/opacity information. For example you can save a transparent PNG from max a few different ways but photoshop will translate it when it opens it and save it in a slightly different format even if you only open/save.
Now here's another kicker, older versions of photoshop open and save PNG's and TGA's differently than newer versions which was different than the way other programs would be saving them. Maya, Max, After Effects, Shake, Toxic, Gimp, XnView, ACDSee ect... Can often read a few different kinds of PNG's but they may export them slightly differently also.
Conclusion:
PNG might be smaller (because its compressed) but you need to be consistent in the way they are created, not all PNG's are created the same way. Which could lead to a few hours of head scratching as to why one PNG imports fine but others don't.
You want to feed you're engine the highest quality you can with the highest amount of consistency possible.
Feed it a bunch of random stuff, pieced together from all over the place and its going to puke.
http://developer.nvidia.com/object/photoshop_dds_plugins.html <-- dds plugin for PS
its pretty cool since you can take control over your mip maps, editing, sharpening them etc
So if you wanna save some HD space, use PNG! Otherwise its not relevant.
I've never heard of .DDs before to be honest, I'll see if it comes up when we get past basic projects and into actual game related things.
Thanks again guys.