# The Industry's Foundation for High Performance Graphics

1. ## Bumpmaps...

I had a question about the information stored in a .TGA bumpmap.

1. What does each of the components represent RGBA?

From a per channel preview of the image, what I gathered was that R is the x component of the normal, G is the y component of the normal and B and A I couldn't think of anything. Can someone correct me if I'm mistaken!!

2. Should the sqrt(R*R+G*G+B*B) of each pixel in the bump image be 1.0 necessarily so that all normals are of unit length?

3. Can someone point me to a website where I can find more info. on this topic?

TIA,
Nishal.

2. ## Re: Bumpmaps...

1. Usually the RGB components of a normalmap represent the x, y, and z components of a normal vector.

2. Since negative values cannot be explicitly stored in an RGB image or texture, the values in a normalmap are scaled and biased such that a value of 0.5 in a normal map represents 0, 0 on the normal map represents -1, and 1 on the normal map represents 1. As such, the RGB representation will not have a magnitude of 1.0. To undo this, one must subtract 0.5 from each componant of the normalmap and multiply the result by 2. The resulting vector should have a magnitude of 1.0.

3. Not sure about a website. . . I kinda learned this stuff all over the place. . .

3. ## Re: Bumpmaps...

Look on nvidia website for "robust bump mapping", you'll get absolutely everything explained in it.

SeskaPeel.

4. ## Re: Bumpmaps...

There is no alpha in a bump map. It wouldn't make sense anyway, since bump mapping is strictly bump mapping.

[This message has been edited by gator (edited 10-23-2003).]

5. ## Re: Bumpmaps...

You can use alpha in the bump map to encode material properties, such as shinyness. That means that you can easily make a bump map called "splotchy leather" or "rusty metal" and have it affect the light correctly.

6. ## Re: Bumpmaps...

If I have a OpenGL demo that uses dot3 bump mapping using register combiners and a cubemap,
what will happen if start using 32-bit textures, and encode the alpha channel the same way?

7. ## Re: Bumpmaps...

You can use 32bit textures in the combiners just fine with bumpmapping. The alpha won't do anything to the rgb part unless you specificaly tell it to. The RGB and A are separated so if you do

rgb {
spare0 = expand( tex0 ) . expand( tex1 );
}

it wont even look at the alpha at all because you're in the rgb portion. Of course you can always then do this

alpha {
spare0 = spare0.rgb * tex0.a;
}

if you wanted to incorporate the alpha into your prev calculation.

I hope my syntax is correct, I havn't used register combiners in quite a while now.

-SirKnight

8. ## Re: Bumpmaps...

I probably should have said that 90% of time, you probably won't be using the alpha
channel for bump mapping, so I would just ignore it.

But if you can use it for transparency, then I see that as being useful.

9. ## Re: Bumpmaps...

It's common to include a gloss map for your specular part in the alpha channel of one of your textures.

Remember that the alpha channel is not just for transparency.

-SirKnight

[This message has been edited by SirKnight (edited 10-24-2003).]

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•