# tangent, binormal...

This topic is 4899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

hi, i surfed now for couple of hours in the net because i wanna know how to calculate the tangent of a vertex, i already (took a long time) that the binormal/bitangent is the dotprod of the normal and the tangent, but how can i calc the tangent? if anyone got good tutorials or websites to look at please post, thanks in advance for your help and time, greets tgar

##### Share on other sites
I think the binormal is the cross product of the tangent and the normal (not the dot product). The tangent can be computed as a function of the texture coordinates, but depending on what you're doing there's other ways of computing it (such as with terrain).

##### Share on other sites
First off, its actually tangent, and bitangent to be totally correct, although it doesn't really matter as long as you do the same thing. A face normal is the cross product of the tangent, and bitangent. I believe in terms for normal mapping, you want the tangent to follow one axis, ie - X, and the bitangent to follow the other - Y or Z depending on the system you chose. Best wait till someone with a bit more mathematical knowledge comes along unless you are satisfied with my answer.

##### Share on other sites
sorry, my fault, yes it is the cross prod [oh]

thanks for the replies,

greets
tgar

##### Share on other sites
Quote:
 Original post by Richy2kHeres a picture I drew to help visualise it:

That's a great explanatory picture Richy. Most people have trouble drawing 3d directions and lines but I see you don't. [smile]

##### Share on other sites
Quote:
Original post by staaf
Quote:
 Original post by Richy2kHeres a picture I drew to help visualise it:

That's a great explanatory picture Richy. Most people have trouble drawing 3d directions and lines but I see you don't. [smile]

Was that sarcasm or were you actually being honest? I would have mocked up a model in Blender but it would have taken longer, besides my picture is accurate enough to a degree...

Addition: This topic could really go nicely as an article, a lovely article on normals, tangents, bitangents, etc, to answer all the nitty gritty 3D maths questions.

PS: Yes I know there is an article on height map normal calculation, but thats just one small thing that it covers.

##### Share on other sites
Quote:
Original post by Richy2k
Quote:

Was that sarcasm or were you actually being honest? I would have mocked up a model in Blender but it would have taken longer, besides my picture is accurate enough to a degree...

I was being honest. I see a lot of geometry-related figures drawn by other students and most are less than intelligible unless you get them explained to you. Drawing geometry by hand is a rare trait it seems.

##### Share on other sites
seeing the picture from richy2k couldn t you simply generate the binormal(bitangent) and tangent by rotating the base axis vectors accordingly?

you have got the normal

now find out the dominant axis component

x > y and x > z -> dominat axis is the x axis

so find the angles you need to rotate the x axis vector to match the normal and apply these rotations to the y and z axis vectors

any idea if that would work ?

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 29
• 16
• 11
• 10
• 11
• ### Forum Statistics

• Total Topics
634112
• Total Posts
3015585
×