Jump to content

  • Log In with Google      Sign In   
  • Create Account


Tangent Binormal Normal


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 zonozz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 08 June 2013 - 10:28 AM

Hi Everyone !

 

I review the code written before, I just forgot one theory of  "normal mapping" tech.

 

From lighting theory point, When I need to lighting a object, object must has normal information, that's enough.

 

But in "normal mapping" tech, why I need tangent and binormal ? If I caculate lighting using normal map's data straight, is that really wrong ? 

 

I make a water demo with high light, that is using 2 normal map, I using those data for lighting straight, the vision result I cant see something wierd ? Is that wrong in theory ?



Sponsor:

#2 GuardianX   Crossbones+   -  Reputation: 1498

Like
1Likes
Like

Posted 08 June 2013 - 11:03 AM

You need tangent and binormal in bump mapping because they, alongside normal vector, construct the basic coordinate system in which real normal to the surface point lies. You need it to emulate very small "fake relative to the light" cliffs of this surface.



#3 C0lumbo   Crossbones+   -  Reputation: 2216

Like
5Likes
Like

Posted 08 June 2013 - 12:04 PM

You might actually get away without the whole NBT thing for your water plane if you're lucky, because your water is (presumably) axis aligned and your world space coordinates happen to match the texture space coordinates (or maybe you've fudged the sign and swizzle to make it match), you're essentially doing world space normal mapping instead of object space normal mapping.

 

It's probably quite an effective optimisation actually, but you should document why it works, because to a certain extent you just got lucky. If you need to tilt or reorient your water plane, then it'll stop working.


Edited by C0lumbo, 08 June 2013 - 12:05 PM.


#4 phil_t   Crossbones+   -  Reputation: 3319

Like
2Likes
Like

Posted 08 June 2013 - 03:24 PM

Yeah, that'll can work fine for a flat water plane, because your water surface normal/binormal/tangent will just end up being the identity matrix.

 

But, say, if you introduce physical waves (where the water vertices are actually displaced), then you'll need to figure out the proper normal/binormal/tangent to get things to look right.



#5 MJP   Moderators   -  Reputation: 11038

Like
2Likes
Like

Posted 08 June 2013 - 05:36 PM

A water plane aligned with the XZ plane isn't going to match the coordinate space of a tangent-space normal map unless you swap Y and Z. You will probably also need to negate on or both values depending on how your coordinate system is setup.


Edited by MJP, 08 June 2013 - 05:48 PM.


#6 Jason Z   Crossbones+   -  Reputation: 4911

Like
1Likes
Like

Posted 09 June 2013 - 12:48 PM

A water plane aligned with the XZ plane isn't going to match the coordinate space of a tangent-space normal map unless you swap Y and Z. You will probably also need to negate on or both values depending on how your coordinate system is setup.

 

That's a good point, but even so, he still won't need to use a tangent + bitangent.



#7 zonozz   Members   -  Reputation: 158

Like
0Likes
Like

Posted 13 June 2013 - 11:47 AM

Oh, guys, thank you all !

 

I think I've remind the reason about that, I read the old book just now, and the 1st chapter is about physical wave. There is information about tangent & binormal theory.

 

Book - GPU Gem 1 By nVIDIA






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS