Texture files are saved as dds.
Textures are used for several things:
- Model Textures
These are used for the way models look.
- Image Textures
These are used for buttons and other images.
- Terrain Textures
These are used for the way terrain look.
Model Textures[edit | edit source]
There are 4 kinds of texture:
Shader Tutorial (Dead Link)
Image Textures[edit | edit source]
There are several kinds of textures for these:
Image is not altered.
An image divided as follows: all rows have the same width [TopLeft][TopRight][BottomLeft][BottomRight] 4 columns this row. size not adjusted. [Top] 1 column repeated to fit width [Bottom] 1 column repeated to fit width [Right] 1 column, turned 90 degrees, repeated to fit height [Left] 1 column, turned 90 degrees, repeated to fit height [Filler][Unused][Unused][Unused] 4 columns only 1 used. Filler is stretched to fill the background [Unused] this row isn't used. [Unused] this row isn't used.
An image divided as follows: [TopLeft][TopRight][BottomLeft][BottomRight][Top][Bottom][Left][Right][Filler][Unused] 10 columns, each same size. corners are not changed. Top/Bottom turned 90 degrees, repeated to match width. Left/Right repeated to match height. Filler is stretched to fill background.
An image divided as follows: [Left][Right] 2 columns: these are not altered [Filler] Filler is stretched to fill background.
An image divided as follows: [TopLeft][TopRight][BottomLeft][BottomRight] size not adjusted. [Top] scaled to fit width [Left] scaled to fit height [Bottom] scaled to fit width [Right] scaled to fit height [Center] scaled to fit width and height
Terrain Textures[edit | edit source]
Terrain textures use two files to define their appearance. The first is a normal map, and the second is a diffuse map. Both files are expected in the .DDS format. The diffuse map has two parts. The red, green, and blue channels define the expected color and appearance of the texture. The diffuse map also has an alpha channel though and this defines the specular map for the terrain texture. The specular map adds white to the diffuse when lit by the map's ambient lighting. As such, its effects depend on the map's lighting and are not seen in shadows on the terrain texture. The second file, the normal map, gives the effect of bumpiness to the texture much as other normal maps. The format for the image is not the same as other normal maps though. Standard normal maps have three color channels used. The terrain texture normal map only uses two channels of information and places the information usually found in the red channel in the alpha channel instead. To convert a normal map for use in terrain textures then, you would move the red channel into the alpha channel, leave the green channel alone, and then black out the red and blue channel. Blizzard created normal maps often will leave the red and/or blue maps either white, black, or with the same info as the green channel. For file size reasons I suggest leaving it black.
Some notes about working with the .dds file format. The format supports having an alpha channel that is totally black while retaining information in the color channels. This is against the norm for most formats as the alpha channel defines transparency and most formats define completely transparent areas (which have a totally black alpha channel in that area) as having no color information. This means that allowing the alpha channel in an image to be black means deleting the color information in that area. This is undesirable as specular maps for terrains are very dark, often totally black, therefore creating areas in the color channels that get totally deleted. The .TGA image format seems to be safe from this effect as it stores the alpha channel in a similar way to the .DDS files. Therefore if you are not working with the image directly in .DDS format via GIMP or Photoshop with plugins, then converting to .TGA and back to .DDS should be a safe way to work with the format.
Edit[edit | edit source]
- Using OpenSource Program GIMP with dds plugin.
- NVIDIA offers a plugin for windows versions of Photoshop plugin for CS5.
- Mac users have a few other programs available for opening and converting .DDS files besides GIMP such as AORTA and Graphic Converter
Import[edit | edit source]
After Import, move files to "Assets/Textures" Another way of going about importing files is to change the .SC2Map extension of the map file to .MPQ and use one of the many tools out there to unpack it. At this point you may add and move around as many files as you want and then repack the folder into an .MPQ file and then change the extension back.