3DModels:Textures: Difference between revisions

From Spring
Jump to navigationJump to search
Gnome (talk | contribs)
No edit summary
 
Gnome (talk | contribs)
No edit summary
Line 1: Line 1:
Textures are stored in the <b>UnitTextures\tatex</b> subdirectory. They may be Windows .BMP format at 24 bit color depth, or a Targa .TGA file in 32 bit (alpha layer) color depth.
Textures are stored in the <b>UnitTextures\tatex</b> 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:
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:


Line 9: Line 10:
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".
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 <b>teamtex.txt</b> in the <b>UnitTextures/tatex</b> 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!).
In the case of logo textures, you must edit the file <b>teamtex.txt</b> in the <b>UnitTextures/tatex</b> 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.
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.

Revision as of 11:01, 29 August 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.