Re: Bump mapping
- From: Gary Nastrasio <garynastrasio@xxxxxxxxxxx>
- Date: Sat, 23 Apr 2005 02:09:33 -0400
I just found and read the article which was very helpful. Just for clarification and to see if I understand per pixel lighting, I will never need to specify a normal in terms of world space...
struct MyCustomFVF
{
D3DVECTOR position;
D3DVECTOR normal;
D3DVECTOR tangent;
D3DVECTOR binormal;
};So when I create my vertices, I should not be putting in my normals, but rather transform each vertex to tangent space and calculate the tangent, binormal and normal vectors based on the tangent basis. Is this anywhere near correct?
Thanks,
Gary
Phil Taylor wrote:
did you hunt down my Per Pixel Lighting article on MSDN?
"Gary Nastrasio" <garynastrasio@xxxxxxxxxxx> wrote in message news:OKHrVR4RFHA.3880@xxxxxxxxxxxxxxxxxxxxxxx
Hi, I have a few questions using bump mapping.
Here are the parts I understand:
- the normal map has red (x-axis), green (y-axis), and blue (z-axis) colors in it, which determine the normal direction
- how to translate from model space to tangent (texture) space
Now here's what I don't understand:
1) Why is it necessary to convert to tangent space to get another normal for a vertex; does this mean each vertex will have a normal in object space and another, different, normal in tangent space?
2) How does my normal map actually relate to my tangent and binormal vectors? Moreover, how does this relate to calculating the values per pixel, since the the tangent and binormal vectors only exist for each vertex?
I've been reading all day about this, but those are 2 points I just can't figure out.
Thanks for any help,
Gary
.
- Follow-Ups:
- Re: Bump mapping
- From: Phil Taylor
- Re: Bump mapping
- References:
- Bump mapping
- From: Gary Nastrasio
- Re: Bump mapping
- From: Phil Taylor
- Bump mapping
- Prev by Date: Re: Graphics Engines
- Next by Date: Re: 3DS Loading problems...
- Previous by thread: Re: Bump mapping
- Next by thread: Re: Bump mapping
- Index(es):
Relevant Pages
|