Dunbar:
It depends on the engine. Console games use proprietary formats typically. Unreal Tournament games use UTX, Quake and Doom 3 engine games use JPEG and Targa, just for an example. If you browse the directories of your favorite Sega Dreamcast games, you’ll find PVR (power vr) files. To make a joke, I’ll just say that the most common used file format for texture maps is PSD… After all, that’s where they come from anyway, right?
Targas are used because they are lossless files. The 32-bit targa includes an alpha channel which allows you to create transparencies. Some have said that a compressed format such as JPEG is better because the file size is smaller and therefor it would use less video memory, but that is wrong. A pixel is a pixel, and when a graphic is called, it doesn’t matter if it’s 20KB or 200KB in file size, it will still take the same amount of video memory, and if the engine is robust enough, it will call the file and discard of it when needed, so you don’t have to worry about temporaries flooding the river, so to speak.
The average sizes, as I believe have been mentioned, are multiples of 2 or 32. I would say the most common resolution used in console games today is 256x256. You use the size according to what you’re doing… For example, if you were making a palm tree, you would use a repeating texture, probably 256x256 for the trunk, a 32x32 texture for the dates at the top of the tree, and a 512x512 targa with an alpha channel with multiple leaves on the map for the leaves. (Alternatively, you could use one single map, which is probably the best way to go.)
Diffuse is the most common texture map. Alpha is second, normals would be third. I can’t think of many games using diffuse off the top of my head, as it would be a waste for the renderer to process something you could calculate in advance. Remember, every layer you add to a shader, adds multiplicatively to the render time… 1 layer for example could take 1ns, 4 layers could take 4ns… 4 layers, 2 of which are special formats, perhaps an environmental map and an alpha transparent, could take a considerable amount of more render time to complete the frame.
Edit: Oh and Dunbar, since you’re asking these questions, I think it’s obvious to assume that you’re just getting interested in becoming a part of the industry right now, so it will most likely take you years to get to the level you want to get to. Let me make this suggestion: Work ahead, meaning… Some people can make great textures that are as tiny as can be, but their work doesn’t look as great on a larger scale. In four years, we’ll be using 2048x2048 as the standard texture for every game, regardless of the item the texture will be used on. Every shader will have many layers and it will look more like the material browser in 3D studio max, than a shader script. Familiarize yourself with this sort of stuff, and you’ll be set for the future. A lot of people will have a hard time converting to the newer, more detailed order of things. “But why would a character need to have a 2048x2048 texture for his pocket watch?” Well, why not? I can tell you one thing about the future of games… Detail is always added. Game systems typically have a five year life cycle, and we are nearing the end of the current crop of systems. The same goes for computer graphics, every five years there is a massive exodus to the new standards. 2004 will bring DOOM 3 and Half Life 2, a dramatic leap forward in comparison to the current PC games available… These games will look like absolute kindergarten material in just four years, so think ahead, my friend.