3DModels:Textures: Difference between revisions

From Spring
Jump to navigationJump to search
Bruski (talk | contribs)
No edit summary
mNo edit summary
Line 24: Line 24:




[[Category:Units]]
[[Category:Unit development]]

Revision as of 14:28, 15 March 2006

Textures are stored in the UnitTextures directory. 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

Ota style one texture per face has only 2048x2048 pixels of space for all the textures to be stored which can caues problems for mods with a large number of different textures. However there is unlimited space for s3o style textures which can be upto 2048x2048 pixels each, although you will probably only need this much for the most detailed units, 512x512 or 1024x1024 would normally suffice.

The UV mapped textures can be named what you want but need to be linked to the s3o file by loading it in UpSpring.

Logo Textures

Unknown value in spring, edit later
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!). End unknown value


Reflections

Unknown value in spring, edit later
To make a texture reflect its environment, you must create a Targa file with an alpha layer with a program such as the GIMP or 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. End unknown value

It should be noted that some image editors have trouble setting alpha layers to 100% and cause Spring to display the image as completely black, hence it is suggested you make it about 99%.

Conversion from .gaf

In Total Annihilation textures were stored in /Textures/*.gaf. If you're porting an old TA mods, there will be hundreds of textures to convert to Spring format. 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.