I have seen several variations of normal textures. Noise maps use grey scale red and blue but not green. Units tend to use yellow/green while textures use greyscale (there are exceptions like the braxis alpha mesh). The reason is to do with how light interacts with the terrain. You will notice the diffuse textures of terrain are also quite dim. If you use the wrong normal your terrain becomes insanely reflective resulting in it being a white glare which you cannot see the diffuse through.
I have now done some extensive tests into the format for the "normal" map of terrain textures and have come to the conclusion that the red and blue channels are entirely unused.
The green channel is important, but the blue and red channels can be white, black, the same as the green channel texture, the textures inversion, it doesn't change at all. I tried all variations under multiple lighting sets.
[Edit:] My recommendation is to leave the RED and BLUE channels black, it reduces files size over having redundant data in them.
I will also note for those that don't know, the "normal" map for terrains is not a real normal map, it is something like a bump map and/or spectacular map, but is definitely not a real normal map.
[Edit:] I've messed around with the green channel and alpha channel but still don't really understand them. Both have to be there though and even a 50% grey is a poor substitute. I've tried using normal map generators, and the green and alpha channels are similar to 2 of the 3 channels of a normal map, but not a very close fit.
My eventual aim here is to be able to create a diffuse map for a terrain texture and know how to generate the normal for it correctly.
What about it? Just opened it. It has the blizzard standard white filled red channel, image in the green, black filled blue channel and image in the alpha. Not functionally different from my suggested black filled red and otherwise the same.
Thanks for pointing it out though, it clearly demonstrates the green and alpha channel images are basically embossing lit from the right and from below.
Really? Looks all yellow and red in the editor. So what affects how reflective the terrain is? For example the tychus05_briefing_xelnagaworldship_emissive when used as a diffuse becomes highly reflective with any normal added to it.
yup, thats having the red channel in full white, data in green, blue full black. There are quite a few that do that, and quite a few that have redundant data in the red channel and blue channel instead. Doesn't matter though, its only the green and alpha channels that matter. If you don't believe me, I can make you a test map with duplicates of terrain with normals in all sorts of colors and the terrain copies will all look the same.
which directory is that file in? I haven't looked at it before, but i'd be happy to figure out how reflection and specular works in terrain.
[Edit:] Found it. The answer? The emissive texture has a full white alpha channel. Diffuse maps generally have very dark alpha channels. Seems the alpha channel is basically a specular map for the terrain. Not a true reflection, but just a profile for specular brightness when lit.
The editor doesn't show the alpha very well, you could only judge by how transparent the image looked. I've been using free apps for image editing though. As for the noise maps, i'll have to take a look.
I was under the impression that the alpha channel of the diffuse maps for terrain defined how well they could blend, with solid black being smooth blending and solid white not blending at all.
A demonstration of the effect of alpha channels in diffuse terrain textures.
As you can see, they effect the brightness of the terrain when lit by world lighting.
The effect of the alpha goes away when unlit. In the unit shadows of the second image, some of that is bright alpha and some is original.
Not sure what you mean about the noise maps. All terrain sets point to the same creep noise map file which is grey scale.
I can tell you a few things about the creep texture files though. It has a true specular map for it and the edge normal map is a true normal map while the regular one is the sort used by the terrain. They also have diffuse maps which I bet work just like the terrain ones meaning you probably could mess with the alpha as in the above post.
[UPDATE]
.TGA format seems to be safe to use. I used GIMP to save the .DDS file as .tga, opened it in photoshop and found it stored the transparency data purely in the alpha channel. I added some pure white and black in there and saved it, then went back to gimp, saved in .dds, then opened that and saved it back as .tga. The second .tga looked the same as the first, black and white added to the alpha where I left it, color channels untouched.
Id still recommend leaving the alpha not totally black, but working in .dds or .tga seem to be safe in this regard.
Something new to address:
.PNG format does not support saving color info for pixels that are totally transparent. .DDS does, but not .PNG
This is important as .PNG is otherwise a good format to work in with textures when not converted into .DDS
This is also important because specular maps for terrain texture tend to be very dark. If you allow the alpha (which is used by SC2 as the specular map) to go totally black anywhere, and you save a working copy in .PNG like that, the color info in that pixel is gone.
The way I work with the texture files now is to use a program called Aorta to compose an RGB image with a greyscale image into an RGBA image which can be saved as either .PNG or .DDS, as .PNG i run into this issue and will now make sure all alpha channels I generate are at least a value of 1 in every pixel just in case.
IN SHORT: Make sure all alpha channels are not totally transparent.
I've been poking around in terrain textures, figuring out how the texture and normal work and have noticed they come in two varieties.
Any idea why some normals for terrain textures are grey scale while other use 100% red and 0% blue leaving just the green channel?
I have seen several variations of normal textures. Noise maps use grey scale red and blue but not green. Units tend to use yellow/green while textures use greyscale (there are exceptions like the braxis alpha mesh). The reason is to do with how light interacts with the terrain. You will notice the diffuse textures of terrain are also quite dim. If you use the wrong normal your terrain becomes insanely reflective resulting in it being a white glare which you cannot see the diffuse through.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
So if I am making a new terrain texture, how do I know which channels the normal needs to use?
Well I cannot help you there. I advise trial and error.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
I have now done some extensive tests into the format for the "normal" map of terrain textures and have come to the conclusion that the red and blue channels are entirely unused.
The green channel is important, but the blue and red channels can be white, black, the same as the green channel texture, the textures inversion, it doesn't change at all. I tried all variations under multiple lighting sets.
[Edit:] My recommendation is to leave the RED and BLUE channels black, it reduces files size over having redundant data in them.
I will also note for those that don't know, the "normal" map for terrains is not a real normal map, it is something like a bump map and/or spectacular map, but is definitely not a real normal map.
[Edit:] I've messed around with the green channel and alpha channel but still don't really understand them. Both have to be there though and even a 50% grey is a poor substitute. I've tried using normal map generators, and the green and alpha channels are similar to 2 of the 3 channels of a normal map, but not a very close fit. My eventual aim here is to be able to create a diffuse map for a terrain texture and know how to generate the normal for it correctly.
So how does that explain the Braxis Alpha Mesh normal?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
What about it? Just opened it. It has the blizzard standard white filled red channel, image in the green, black filled blue channel and image in the alpha. Not functionally different from my suggested black filled red and otherwise the same.
Thanks for pointing it out though, it clearly demonstrates the green and alpha channel images are basically embossing lit from the right and from below.
Really? Looks all yellow and red in the editor. So what affects how reflective the terrain is? For example the tychus05_briefing_xelnagaworldship_emissive when used as a diffuse becomes highly reflective with any normal added to it.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
yup, thats having the red channel in full white, data in green, blue full black. There are quite a few that do that, and quite a few that have redundant data in the red channel and blue channel instead. Doesn't matter though, its only the green and alpha channels that matter. If you don't believe me, I can make you a test map with duplicates of terrain with normals in all sorts of colors and the terrain copies will all look the same.
@DrSuperEvil: Go
which directory is that file in? I haven't looked at it before, but i'd be happy to figure out how reflection and specular works in terrain.
[Edit:] Found it. The answer? The emissive texture has a full white alpha channel. Diffuse maps generally have very dark alpha channels. Seems the alpha channel is basically a specular map for the terrain. Not a true reflection, but just a profile for specular brightness when lit.
So without using third party programs (using just the data editor), how can people tell which textures have a white alpha channels?
And since you are doing normals, what can you figure out about noise maps used by creep. They seem to use blue,red and greyscale.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
The editor doesn't show the alpha very well, you could only judge by how transparent the image looked. I've been using free apps for image editing though. As for the noise maps, i'll have to take a look.
I was under the impression that the alpha channel of the diffuse maps for terrain defined how well they could blend, with solid black being smooth blending and solid white not blending at all.
@JackRCDF: Go
make two copies of a texture with full white and full black alpha channels and the same normal map and see for yourself what happens.
A demonstration of the effect of alpha channels in diffuse terrain textures. As you can see, they effect the brightness of the terrain when lit by world lighting. The effect of the alpha goes away when unlit. In the unit shadows of the second image, some of that is bright alpha and some is original.
@DrSuperEvil: Go
Not sure what you mean about the noise maps. All terrain sets point to the same creep noise map file which is grey scale.
I can tell you a few things about the creep texture files though. It has a true specular map for it and the edge normal map is a true normal map while the regular one is the sort used by the terrain. They also have diffuse maps which I bet work just like the terrain ones meaning you probably could mess with the alpha as in the above post.
If you look under the Terrain Texture Sets data type you find a field for the creep noise map which determines the movement of the creep surface.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@DrSuperEvil: Go
Indeed, and as I said, every texture set has that field pointing to the same file as a noise map, a 256x256 greyscale .dds file.
[UPDATE] .TGA format seems to be safe to use. I used GIMP to save the .DDS file as .tga, opened it in photoshop and found it stored the transparency data purely in the alpha channel. I added some pure white and black in there and saved it, then went back to gimp, saved in .dds, then opened that and saved it back as .tga. The second .tga looked the same as the first, black and white added to the alpha where I left it, color channels untouched. Id still recommend leaving the alpha not totally black, but working in .dds or .tga seem to be safe in this regard.
Something new to address:
.PNG format does not support saving color info for pixels that are totally transparent. .DDS does, but not .PNG
This is important as .PNG is otherwise a good format to work in with textures when not converted into .DDS
This is also important because specular maps for terrain texture tend to be very dark. If you allow the alpha (which is used by SC2 as the specular map) to go totally black anywhere, and you save a working copy in .PNG like that, the color info in that pixel is gone.
The way I work with the texture files now is to use a program called Aorta to compose an RGB image with a greyscale image into an RGBA image which can be saved as either .PNG or .DDS, as .PNG i run into this issue and will now make sure all alpha channels I generate are at least a value of 1 in every pixel just in case.
IN SHORT: Make sure all alpha channels are not totally transparent.
You considered adding this information to the wiki?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg