Re: Bump mapping
- From: "Phil Taylor" <ptaylor@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Apr 2005 09:11:37 -0700
yes thats the basics. I believe I included shader asm for this.
its important to realize this is a texture-based lighting technique, and you
are not using vertex data per se.
"Gary Nastrasio" <garynastrasio@xxxxxxxxxxx> wrote in message
news:e8%23aGs8RFHA.4028@xxxxxxxxxxxxxxxxxxxxxxx
>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
>>
>>
.
- References:
- Bump mapping
- From: Gary Nastrasio
- Re: Bump mapping
- From: Phil Taylor
- Re: Bump mapping
- From: Gary Nastrasio
- Bump mapping
- Prev by Date: Re: vertex buffer optimizing
- Next by Date: Re: vertex buffer optimizing
- Previous by thread: Re: Bump mapping
- Next by thread: Using StateBlocks
- Index(es):
Relevant Pages
|