Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualBacterius

Posted 05 May 2013 - 04:39 AM

the middle vector of the matrix will be what?

 

The bitangent smile.png but that matrix is incorrect either way.

 

The "normal" way (no pun intended) to generate this matrix is to know the face or vertex normal in advance from the model (though you can calculate it from the vertices if you want) as well as the bitangent, and compute the missing vector by crossing the two and possibly flipping the sign of the resulting vector depending on your coordinate system. And, no, you can't make both vectors up, if you need the correct TBN matrix (not just the normal) then you need to obtain the bitangent somehow and that is from the model's u-v coordinates or other equivalent source as linked above.

 

As your matrix is now it has zero information about the actual texture of the object, so it can't possibly be a texture space to world space matrix. You see the problem?


#3Bacterius

Posted 05 May 2013 - 04:37 AM

the middle vector of the matrix will be what?

 

The bitangent smile.png

 

The "normal" way (no pun intended) to generate this matrix is to know the face or vertex normal in advance from the model (though you can calculate it from the vertices if you want) as well as the bitangent, and compute the missing vector by crossing the two and possibly flipping the sign of the resulting vector depending on your coordinate system. And, no, you can't make both vectors up, if you need the correct TBN matrix (not just the normal) then you need to obtain the bitangent somehow and that is from the model's u-v coordinates or other equivalent source as linked above.

 

As your matrix is now it has zero information about the actual texture of the object, so it can't possibly be a texture space to world space matrix. You see the problem?


#2Bacterius

Posted 05 May 2013 - 04:36 AM

the middle vector of the matrix will be what?

 

The bitangent smile.png

 

The "normal" way (no pun intended) to generate this matrix is to know the face or vertex normal in advance from the model (though you can calculate it from the vertices if you want) as well as the bitangent, and compute the missing vector by crossing the two and possibly flipping the sign of the resulting vector depending on your coordinate system. And, no, you can't make both vectors up, if you need the correct TBN matrix (not just the normal) then you need to obtain the vector somehow and that is from the model's u-v coordinates or other equivalent source as linked above.

 

As your matrix is now it has zero information about the actual texture of the object, so it can't possibly be a texture space to world space matrix. You see the problem?


#1Bacterius

Posted 05 May 2013 - 04:35 AM

the middle vector of the matrix will be what?

 

The bitangent smile.png

 

The "normal" way (no pun intended) to generate this matrix is to know the face or vertex normal in advance from the model (though you can calculate it from the vertices if you want) as well as the bitangent, and compute the missing vector by crossing the two and possibly flipping the sign of the resulting vector depending on your coordinate system.

 

As your matrix is now it has zero information about the actual texture of the object, so it can't possibly be a texture space to world space matrix. You see the problem?


PARTNERS