Forums Aritcles
SEARCH:
LOGIN:
Register Register Register Contact Us
Go Back   Game Artist Forums > Game Art > Support
Register FAQForum Rules Members List Calendar Mark Forums Read
Reply
 
LinkBack Thread Tools Display Modes
Old 08-29-2008, 05:02 PM   #1 (permalink)
Senior Artist
ShoT's Avatar
ShoT's User Activity: 0/10
161 - 8
Normal Map Alpha

Hey guys, I was just importing a model into UT3, and I have a question, under compression settings, I've seen something called NormalMapAlpha. So naturally, I am curious as to what this actually is, can anyone elaborate?
__________________
ShoT is offline   Reply With Quote
Old 08-29-2008, 05:19 PM   #2 (permalink)
Game-Artist.net Staff
Talon's Avatar
Golden Star Winner of Speed Texturing 
Talon's User Activity: 9/10
2,770 - 470
It's for if the texture is a normal map with an alpha :P

I assume it's supposed to swizzle the channels to compensate for it because normal maps can suffer badly from regular compression (but really, I haven't noticed any difference between any of the compression settings).

By that I mean that in DXT compression, the red channel gets compressed more than the green and blue. But a red channel is really important for a normal map while the blue channel isn't. So they get swapped around for being stored, then swapped back when loaded up. Alpha channels don't get compressed (they remain 8-bit, unless you use DXT3 which drops it down to 1-bit).
__________________
> My Portfolio
> Hull-Breach Lead Modeler
> Supporter of good crits.

Last edited by Talon; 08-29-2008 at 05:22 PM.
Talon is offline   Reply With Quote
The Following User Says Thank You to Talon For This Useful Post:
Old 08-29-2008, 07:43 PM   #3 (permalink)
Senior Artist
ShoT's Avatar
ShoT's User Activity: 0/10
161 - 8
Yeah, I guess I kind of overlooked the obvious...
__________________
ShoT is offline   Reply With Quote
Old 08-30-2008, 08:35 AM   #4 (permalink)
Senior Artist
Xoliul's Avatar
Xoliul's User Activity: 6/10
460 - 59
Oh hey Talon I didn't know the switching thing happened. Just now I was really puzzled by Flatout: Ultimate Carnage's normal maps. They have the actual red channel in the green channel, and the actual green channel in the alpha, red and blue are just plain black. Was really wondering why they did this but the compression seems the answer. I do wonder why they don't use any blue channel at all then.
Xoliul is offline   Reply With Quote
Old 09-02-2008, 10:55 AM   #5 (permalink)
Senior Artist
Ghostscape's User Activity: 3/10
265 - 50
Quote:
Originally Posted by Xoliul View Post
Oh hey Talon I didn't know the switching thing happened. Just now I was really puzzled by Flatout: Ultimate Carnage's normal maps. They have the actual red channel in the green channel, and the actual green channel in the alpha, red and blue are just plain black. Was really wondering why they did this but the compression seems the answer. I do wonder why they don't use any blue channel at all then.
With the two channels you can compute the third on the fly. Since a normal is a normalized vector, if you have two parts of it you can find the third with some simple math.
Ghostscape is offline   Reply With Quote
Old 09-02-2008, 12:23 PM   #6 (permalink)
Game-Artist.net Staff
Talon's Avatar
Golden Star Winner of Speed Texturing 
Talon's User Activity: 9/10
2,770 - 470
Yeah, blue can be generated. As far as I'm aware it's not 100% accurate and it's a wee bit of a slowdown. So blue being technically the least important channel gets it in the neck for the sake of filesize.

Ben Mathis has a neat rundown of DDS compression types on his site; Ben Mathis - Freelance Artist
__________________
> My Portfolio
> Hull-Breach Lead Modeler
> Supporter of good crits.
Talon is offline   Reply With Quote
Old 11-27-2008, 06:45 PM   #7 (permalink)
New Artist
palafoxx's User Activity: 0/10
15 - 0
I'm a NWN2 modder and I've seen that all the diffuse+alpha maps have normal +alpha maps too... I really don't understand what's doing the alpha channel in a normal map. It looks like a kind of bump map or something...

If it's really useful, what's the best way to do a good alpha layer for a normal map?

RegaRDsss
palafoxx is offline   Reply With Quote
Old 11-28-2008, 04:32 AM   #8 (permalink)
Senior Artist
wolfsage's Avatar
wolfsage's User Activity: 4/10
121 - 14
Quote:
Originally Posted by palafoxx View Post
I'm a NWN2 modder and I've seen that all the diffuse+alpha maps have normal +alpha maps too... I really don't understand what's doing the alpha channel in a normal map. It looks like a kind of bump map or something...

If it's really useful, what's the best way to do a good alpha layer for a normal map?

RegaRDsss
Grey scale height maps are added to Normal maps in the Alpha channel for Parallax Bump mapping in Unreal Ed

I imagine its the same process in the engine your using. A Parallax map really emphasises the height of a Normal map. You can create one using the Nvidea filter in Photoshop or I got quite good result from copying the Blue channel into the Alpha and using that. Although in Unreal you have to apply the Parallax map differently to a Normal map as the math behind it uses a different algorithm,
__________________
www.wolfsage.co.uk
wolfsage is offline   Reply With Quote
Old 11-28-2008, 05:12 AM   #9 (permalink)
Game-Artist.net Staff
Talon's Avatar
Golden Star Winner of Speed Texturing 
Talon's User Activity: 9/10
2,770 - 470
You might find that in NWN2, the alpha in the normal map is for specular highlights, not for parallax.

I don't think there is any parallax in NWN2.
__________________
> My Portfolio
> Hull-Breach Lead Modeler
> Supporter of good crits.
Talon is offline   Reply With Quote
The Following User Says Thank You to Talon For This Useful Post:
Old 11-28-2008, 06:37 AM   #10 (permalink)
Senior Artist
Natace's User Activity: 0/10
162 - 11
Seems to be a bit of a mixed result here, and I believe that it all depends on how the game engine is programmed to read a normal map texture.

I know that for some game engines, such as the XRay engine for stalker, the alpha channels are switched around and instead of the usual blue colour you would see on a normal map, the blue is actually green, like shown in the image below:
http://image.hazardstrip.com/ss/tuts/2724.jpg

This is APPARENTLY done by swapping the channels around in the format below:
Red > Blue
Green > Alpha 1
Blue > Green
Alpha 1 > Red

The ones on the left being the channel of the normal map, and the ones on the right being what the channels on the left are swapped to.
After that process is done, the format of the image is changed back to RGB format again.

I have found that I have been unsuccessful with this process so i'm guessing there was a typo somewhere in the tutorial provided showing how to do this, so as I said, it was apparently done via that method.

With a normal game you would have 3 textures, Diffuse, Bump/normal and specular, however I have only recently learnt that with the XRay engine, the specular map can be added to the alpha channel of the normal map and still do a similar if not BETTER job than using a seperate greyscale specular texture, hence only 2 textures would be required rather than 3 or something along those lines.

I took a comparison shot in Maya using mental ray, showing a basic 512x512 tile texture that has been tiled/repeated.
The texture on the left of the image shows a render with a diffuse and a normal with the specular texture on the normal textures alpha 1 channel.
The one on the right however shows the diffuse with a normal (that does not have a specular for it's alpha), and a specular texture which is seperate.


I am certainly not a PRO at texturing, since I am really only just getting into doing normal maps and all of that, but I do believe that the picture on the left looks like the light reflects more realistically than the one on the right.
The one on the right tends to highlight the crevaces in between the tiles more, however in terms of reflectivity of light, it is rather dull in comparison.

I don't think that either of them look bad, and it would be difficult to decide which is more realistic, however due to the engine I am working with requiring the specular map to be stored in the alpha of the normal map, I guess i'm stuck with the result on the left, which i'm not really complaining about

I also just read Talons comment about NWN, and it seems that it's engine uses normal alpha's in the same way.
Natace is offline   Reply With Quote
The Following User Says Thank You to Natace For This Useful Post:
Reply

Bookmarks
Digg del.icio.us StumbleUpon Google
Thread Tools
Display Modes




All times are GMT -5. The time now is 11:14 PM.


Powered by vBulletin® Version 3.7.0 Beta 4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0
Copyright © 2006-2008 Game-Artist.Net