Custom textures
The info on this page is relevant for cohokum version 162W2T9 and later!
Download
Download and install information: download page or install page
General info for modders
First some general info about the texture bitmap structures that are applied in the latest version of EECH:
- Mipmapped textures should be 24bit dds files with the format R8B8G8 or 32bit dds files with the format A8R8G8B8 (in case they have an alpha layer). You can make such a bitmap out of an jpeg or bmp file with the free tool dxtex.exe which comes with the directx SDK package. Every texture can be mipmapped but this is not garantee to work, the code may not always use it. Here is an explanation about mipmapping.
Mipmapping every texture is also not useful and eats up graphics memory! For instance you will not see if the camoflage texture on a jetfighter is mipmapped because chances are that you wont see the jetfighter anyway ;)
- Plain bitmaps single layer (non-mipmapped) textures should be 24bit bitmaps and have the bmp extention.
- You can make a dds file from the bmp file by loading the bitmap in the tool dxtex (see here), then select "format->Generate mipmaps", and save it as dds file. If you want to add an alpha layer there are two ways: give it the same name as the colour texture but add "_a", for instance TERRAIN_SCRUB.bmp and TERRAIN_SCRUB_a.bmp, and dxtex will automatically load it and create a format A8R8G8B8. Else you have to select "File->Open onto Alpha channel of this texture..." and load the alpha bitmap (which should be a grey scale bitmap).
- PLEASE DO NOT use the old size indications that were added to the texture names in the past by the teximpex tool, it confuses the code:
- wrong: 66_ANTI_RADAR_PAINT-BIN-64x64.bmp
- Correct: 66_ANTI_RADAR_PAINT.bmp
- All textures (not only camouflage) can have a "season" indication (for want of a better word). This is an indication that they should be used in winter landscapes or desert landscapes. A winter texture ends with "-W" and a desert texture ends with "-D". The code will check if the campaign is a desert or winter campaign and will use the "-D" or "-W" textures if it finds them. If not the defaults are used. Examples:
- 66_ANTI_RADAR_PAINT.bmp (default)
- 66_ANTI_RADAR_PAINT-W.bmp (winter)
- 66_ANTI_RADAR_PAINT-D.bmp (desert)
- The textures are placed by the setup files in a seperate directory structure under:
\razorworks\cohocum\graphics\textures
A whole list of subdirectories are created to organize them a bit:
textures
|
|-camo <= camouflage textures
|-cockpit <= cockpit textures
|-general <= general textures
|-terrain <= all terrain textures in subdirectories
|
|-water <= dynamic water textures and waterinfo text file
|-alaska <= current warzone terrain textures
|-alexander archipelago <= current warzone terrain textures
|-aleut
|-cuba
|-georgia
|-grand
|-kuwait
|-lebanon
|-lybia
|-mars
|-taiwan
|-thailand
|-yemen
- The textures are read in this order! So if you have the same texture in different directories the last one encountered will be used.
- The textures are read when you enter the warzone (when you see the spinning helicopter) and reset when you leave the warzone. The spinning helicopter may change to the new textures because of that.
- If you have textures that do not fit in any of these or you want to try out something you can add directories of your own in the directory structure. You have to tell cohokum where to find these textures. This is done in the following way:
Add a textfile to the map directory of the warzone. For example:
\razorworks\common\maps\map11
This file must be named texturedirs.txt and looks as follows
# some comment
# more comment
dir1 = MyCamo
dir2 = terrain\something\myterrain
dir3 =
Cohokum will add \razorworks\cohocum\graphics\textures\ in foront of the name and try to read the files in them. THESE ARE READ LAST AND WILL TAKE PRECEDENCE!


Terrain textures
Originally EECH uses a black and white texture as a base texture which is given a general colour according to the terrain type (brownish for desert, greenish for swamp, greyish for stone etc.). On top of this a semi transparent texture was projected with a different colour and scale. This way different combinations of land are be made. Therefore the top texture can have an alpha layer, which determimes its transparency (0 is black is opaque, 255 is white is fully transparent). Many other textures (like trees) also use alpha layers.
A while ago I changed the code to use only the top layer for the terrain with its own colours and scale. The good news is that the effect is quite stunning (example from taiwan, guess which one is new ;) ):

The bad news is that this limits the number of land texture types to 4 but we are working on that! The terrain textures are a special bunch. After much trial and error a few rules came up:
- The maximum size possible is 2048x2048 because that is what most graphics cards can handle. However a mipmapped texture of this size is 16 Mbyte (or 22 MByte with alpha layer)! You can see that this puts a strain on the graphics cards and the rendering. We therefore decided to limit the maximum size to 1024x1024 pixels.
- The format is 24bit plain dds (so no DX1 to DX4 compression) and the colour order is RGB (format R8G8B8).
- Alpha blending for terrain textures is not used yet.
- The terrain names are fixed, so each warzone uses the same terrain texture names for now, but a snow texture for Georgia will look different from a snow texture for Lebanon because they are in different directories.
- Each terrain texture has a scale indication which will determine the resampling scale at which it is shown in the game. For instance a 512x512 bitmap that is shown at a 128x128 scale will look very detailed, a 1024x120 bitmap that is shown at a 2048x2048 scale will look a bit more blurred from close up. The textures are repeated when filling up a polygon, so a small scale will cause much repetition (which is visible from higher altitudes and may look very artificial).
The scales are put in a text file texture_scales.txt which looks like this and is put with the terrain textures in the warzone terrain texture directory. This is for instance the contents of the file in the directory \razorworks\cohocum\graphics\textures\taiwan:
# TERRAIN TEXTURES
# Relative terrain texture scales.
# values after '#' the original detail and coulorpass scales and internal names.
# Don't mess with this file if you don't know what you are doing!
TERRAIN_SEA_1 =512 # sea
TERRAIN_BEACH =128 # beach
TERRAIN_DETAIL_4 =1024 # land (moderate/low altitude)
TERRAIN_SCRUB =1024 # altered_land1, (moderate/low altitude)
TERRAIN_BARE_ROCK2 =1024 # altered_land2, (high altitude)
TERRAIN_SNOW =1024 # altered_land3, (snow, top)
TERRAIN_TREE_CANOPY_1 =256 # forest
TERRAIN_SWAMP1 =64 # forestside_bottom, must be 512x128
TERRAIN_SWAMP2 =64 # forestside_middle, must be 512x128
TERRAIN_TREE_CANOPY_LEBANON = 64 # forestside_top, must be 512x128
TERRAIN_GRG_CITY1 =512 # city1 (also used for airfields!)
TERRAIN_GRG_CITY2 =512 # city2
TERRAIN_GRG_CITY3 =512 # city3
TERRAIN_GRG_CITY4 =512 # city4 (also used for FARPs!)
TERRAIN_BW_CITY1 =512 # city1 infrared
TERRAIN_BW_CITY2 =512 # city2 infrared
TERRAIN_BW_CITY3 =512 # city3 infrared
TERRAIN_BW_CITY4 =512 # city4 infrared
TERRAIN_THAI_TRACK =12 # track
TERRAIN_DETAIL_ROAD =12 # road
TERRAIN_DETAIL_LEBANON = 64 # road_bank
TERRAIN_RIVER =256 # river
TERRAIN_HIGHLAND =128 # river_bank
TERRAIN_THAILAND_RIVER =512 #reservoir
TERRAIN_WALL_LEBANON =16 # hedge
TERRAIN_WALL =16 # wall
CH_TERRAIN_DRY_MUD1 =128 # trench
TERRAIN_PLOUGHED1FIELD =256 # field2
TERRAIN_PLOUGHED2FIELD =256 # field3
TERRAIN_MUSTARDFIELD =384 # field1
TERRAIN_CORNFIELD =256 # field4
TERRAIN_WHEATFIELD =384 # field5
TERRAIN_LIGHTGREENFIELD =384 # field6
TERRAIN_DARKGREENFIELD =384 # field7
The terrain textures must have the names that are specified in this file (e.g. TERRAIN_TREE_CANOPY_1.dds for the forert canopy).
- You can put other textures in the terrain directory, they will be read, but the scales will only be applied to the textures indicated in the file above (there are no other terrain textures used)
- To show the terrain textures to their full glory you have to set a number of options in the eech.ini file:
texture_colour = 1 # Use texture colours directly
texture_filtering = 1 # Texture blending, reacts to Anisotropic filter
mipmapping = 1 # Use mipmnapped textures (dds files).
If you use mipmapping set the anosotropic filtering setting of your card to a higher quality value (like 2x or 4x quality) otherwise you will not see the textures with their greatest detail.


Dynamic water textures
A while ago I added dynamic water effects. I simply use the fact that each game cycle the texture settings are read! In stead of showing the same texture for water I reset the water texture to a different texture each 100 game cycles. These textures are slightly different and create the effect of flowing waves. The top grey scale textures are semi transparent (they have an alpha layer) and are shown over the bottom texture. These water textures are read from the directory \razorworks\cohocum\graphics\textures\terrain\water when you enter the warzone. The ses textures for instance look like this:
etc 
The grey scale textures are from some free add-on pack of MS flightsim and the colour image I took on the ferry to the UK! In tghe water directory there is a text file waterinfo.txt with the information needed to display the effect properly:
#water info file for eech version 162w2 and further by gotcha, 050818
#dynamic water textures, texture 1 is BOTTOM texture,
#texture 2 is DYNAMIC TOP texture
#alpha: transparency of dynamic texture
#added to exsisting alpha(+255 is transparent,-255 is obscure)
river1= riverbot.dds,100,64 # bottom, delay factor, scale
river2= rivn,2,0,49,0,32 # dynamic, 1=bmp/2=dds, start, end number, alpha, scale
sea1 = seabottom.dds,100,256 # bottom, delay factor, scale
sea2 = sea,2,1,16,0,128 # dynamic, 1=bmp/2=dds, start, end number, alpha, scale
reserv1 = reservoir1.dds,100,128 # bottom, delay factor, scale
reserv2 = asea,2,1,16,-10,64 # dynamic, 1=bmp/2=dds, start, end number, alpha, scale
This means the following: riverbottom.dds is the colour bottom texture, the nember of game ccylles between switching is 100, the scale of the bottom texture is 64. The partly tranparent top texture series has filenames rivn00.dds to rivn49.dds with no extra alpha blending tuning (value 0) and a scale of 32.


Cockpit textures
The cockpit
textures is what started all this texture modding a few years ago. Just for fun here are pictures of the brushed up
Apache,
Havoc,
Comanche
and
Hokum cockpits.
The textures for the Apache and Havoc cockpits are made from
the original textures supplied with Enemy Engaged - Apache-Havoc, and edited
with Adobe Photoshop and the great free viewer XnVIEW.
Sceenshots
COMANCHE |
HOKUM |
with new textures  |
with new textures  |
original textures
 |
original textures
 |
|
original

|
|
new textures

|
|


Links
Handy links when you do texture modding:
Tools that I use
- Xnview: what can I say? by far the best free image viewer that is out there. Beats commercial packages like ACDSee hands down, makes irfanview look like an amateur mess. Excellent support (you can guess that I am a fan)
- Redfield plugins for photoshop: free plugin package for Adobe Photoshop, you must have the seamless filter
- DxTex: free tool to convert from and to dds files, you have to download the MS Directx SDK package to get it. BTW: this tool has some handy commandline parameters!
- Tileviewer: Ampsoft free tool to view your e tiled to check for seamlessness and repetitiveness
- Explorer2: two pane explorer, very very powerful
- NSIS: freeware package to create those neat setup files, excellent support and documentation, large community
Satellite imagery
Material texture links

