3DModels:Textures: Difference between revisions
No edit summary |
|||
| Line 17: | Line 17: | ||
==Conversion from .gaf== | ==Conversion from .gaf== | ||
In Total Annihilation textures were stored in /Textures/*.gaf. There is an easy way to automatically extract all the texture from all the .gaf into well named .bmp : Download [http://www.planetannihilation.com/bsr/downloads/GAFDump.zip | In Total Annihilation textures were stored in /Textures/*.gaf. There is an easy way to automatically extract all the texture from all the .gaf into well named .bmp : Download [http://www.planetannihilation.com/bsr/downloads/GAFDump.zip GAF Dump]. Then run GAFDump.exe, from inside the folder your textures are, and with the '-B' commandline option. | ||
Revision as of 13:30, 1 September 2005
Textures are stored in the UnitTextures\tatex subdirectory. They may be Windows .BMP format at 24 bit color depth, or a Targa .TGA file in 32 bit (alpha layer) color depth.
Rules for textures
Spring only has support for 2048x2048 pixels worth of textures installed at any given time. However, the game sorts the textures on this sheet (which only exists while the game is loaded) very well, so if you follow a few simple rules the texture limit will be no problem:
- Keep textures limited to dimensions that are base-2 numbers, such as 8x8, 16x16, 32x32, or 64x64. They may also be oblong, 64x32 for example.
- Keep your textures as small as possible while still looking good. You can use a texture which is 256x256 pixels, for example, but a set of those would quickly eat up the available space.
- Don't make "shaded" textures like Cavedog did for Total Annihilation; let Spring handle the shading instead.
For Spring to read your textures, they must also be named properly. For example, if you use the texture "MetalTexture1" on your 3do file, the texture must be named "MetalTexture100.bmp".
Logo Textures
In the case of logo textures, you must edit the file teamtex.txt in the UnitTextures/tatex directory. It is easy to understand. Just add the name of your texture to the list, without the "00" as previously detailed. For example, if you wanted to add ArmLogo00.bmp to the team color list, you would put ArmLogo in the teamtex.txt file. As team colors are sequential, you must have a file for each different color. If you have ArmLogo00.bmp, there must also be an ArmLogo01.bmp, ArmLogo02.bmp, etc which match the colors of the other team textures available (it would look weird if the paint job was blue but the logo was red!).
Reflections
To make a texture reflect its environment, you must create a Targa file with an alpha layer with a program such as Photoshop. Targa textures follow the same rules above as bitmaps, however, Spring will display reflections on the texture in game if the user has that graphics option enabled and available to him. In the alpha layer itself, a darker shade will reflect less, whereas a lighter shade will reflect more.
Conversion from .gaf
In Total Annihilation textures were stored in /Textures/*.gaf. There is an easy way to automatically extract all the texture from all the .gaf into well named .bmp : Download GAF Dump. Then run GAFDump.exe, from inside the folder your textures are, and with the '-B' commandline option.