Re: Bump mapping

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
>>
>>

.



Relevant Pages

  • Re: Bump mapping
    ... D3DVECTOR position; ... 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, ... Why is it necessary to convert to tangent space to get another normal ...
    (microsoft.public.win32.programmer.directx.graphics)
  • Re: bump mapping, tangent space, ARGH!
    ... Calculating the S and T tangent space vectors. ... > its per-face normals. ... assumptions about the surface the polygonal mesh is approximating. ... > Any tips/tricks on how to debug tangent space calculation, ...
    (comp.graphics.api.opengl)
  • Re: lighting problem on surface
    ... You need to define a normal per vertex for proper smooth lighting. ... and, read the FAQ, 1.0F and 0.0f are not proper texture coordinates, you are going off the ends of texture. ... Is this code with normals OK? ...
    (comp.graphics.api.opengl)
  • Re: tangent space for normal mapping
    ... I'm confused about the math. ... and bitangent correctly for triangle normal, but now I need to make them ... Can I simply do as I did for normals, ... tangent and bitangent among shared vertices? ...
    (comp.graphics.algorithms)
  • Re: Tangent for 3D vectors
    ... I need the formula to calculate tangent for 3D ... there are actually two normals so you have to know how to set up the ... throttle) into the tangent PLANE of the ground. ... If D is the normalized direction vector, T is your thrust scalar and N ...
    (comp.programming)