A couple of months back zbrush generated a wierd, very green normal map. at the time i had never used zbrush so didnt know what to expext. since then i have never seen anything like it. today my programmer told me that was the correct normal map for direct x and that the blueish one that both photoshop, and 3d studio max generate(that happens to be the only kind i ever see anywhere) are incorrect for the purposes of direct x in games. is my programmer crazy or is it possible that max and photoshop do not produce normal maps "correctly"? are there different kinds of normal maps?
Replies
If he is telling you tangent space is incorrect for games he is VERY wrong. Tangent space is the only type of normals mapping that can be applied to deforming meshes iirc.
Thats just a guess though, I don't really know much about this kind of stuff.
EDIT: Didn't see EQ's post. Chances are he's correct, and I'm an idiot.
There is probably other engines that are similar.
Jay, I'd love to see an example of a BF2 world-space character map, if you have one lying around. I'm with EQ tho, might just be some fancy tech thingy.
old paper from a guy, also shows how world-space normalmaps can be used on deformable characters (basically you just need to rotate the light vector a bit different than in tangent if I remember well)
C:\Program Files\EA GAMES\Battlefield 2\mods\bf2
then go into the archive Objects_client.zip, navigate to \soldiers\Us\Textures and poke around. Anythign "_os" is object space.
**oh.. and just a disclamer that messing with archived files in the BF install may mess up you're ability to play online. You may want to make a copy of it first.***
This gives you a good tradeoff with compression and detail, and makes the normal map look green instead of purple.
So, we shift the red into the alpha channel and it gets a whole 16bits all to itself.
It's worth noting that you could theoretically store another map in the old red channel - like a simple spec map or a gloss map.
I seem to recall something about having to duplicate the green channel into all three RGB channels, because the Nvidia compressor figures in the differences between all three when it compresses each one. So if they're the same exact data, you get less artifacts. Alpha is apparently compressed totally separate.
Good one Rick.
http://www.rsart.co.uk/2006/08/27/green-tangent-space-normal-maps-2/
Full version of my answer here, with extra details
http://www.rsart.co.uk/2006/08/27/green-tangent-space-normal-maps-2/
[/ QUOTE ]
"So, we move the red data into the alpha channel and it gets a whole 16bits all to itself, leaving the green with 6 bits and blue with 5 bits."
I think that 16 should be a 6. Yes I am a stickler.
EDIT: I could be wrong of course.
You are wrong. It might be 8, but it's either 16 or 8.
[/ QUOTE ]
I apologise. I am indeed wrong.