## RE: [Algorithms] Skinning + Tangent vectors

 RE: [Algorithms] Skinning + Tangent vectors From: Sim Dietrich - 2002-02-28 15:54:02 ```In my experience with this, having helped implement it in several games, I can tell you that : a) You should always use the Normal instead of SxT ( this is not only cheaper, but helps with flipped textures ) b) You shouldn't bother renormalizing these vectors after transforming them, assuming you don't have significant scales c) The assumption that S & T & Normal vectors are orthonormal is a good assumption if your texels are mapped to be square. Because this is usually true, or supposed to be true, it tends should work out if you make the assumption that the tangent basis is orthonormal. -----Original Message----- From: John Harries To: Adam Moravanszky; Algorithms List Sent: 2/28/2002 6:58 AM Subject: RE: [Algorithms] Skinning + Tangent vectors :-) That should have read: Since S, T, SxT IDEALLY form an ortho-normal basis you can transform S and your normal and then perform a cross-product to calculate T. Easy in a vertex shader. John > -----Original Message----- > From: Adam Moravanszky [mailto:amoravanszky@...] > Sent: Thursday, February 28, 2002 8:53 AM > To: John Harries; Algorithms List > Subject: Re: [Algorithms] Skinning + Tangent vectors > > > Yes, this does help, as did Tom's reply. > > I don't agree with S,T and SxT forming an orthonormal basis, though. This > is only the case when we have 'perfect' texture mapping > coordinates with no > distortion -- not very likely. I believe S and T have to follow > the texture > mapping directions, even if the UV directions are not orthogonal. On the > other hand, S cross T is usually (close to) the normal, so the > optimization > in my vertex shaders is that I leave the normal away, and compute that on > the fly as > SIGNBIT * (S x T) > > --Adam > ----- Original Message ----- > From: John Harries > To: Adam Moravanszky ; Algorithms List > Sent: Thursday, February 28, 2002 3:01 PM > Subject: RE: [Algorithms] Skinning + Tangent vectors > > > Yes, you need to retransform. > > Your tangent space is defined by the vectors S, T and SxT. (Where SxT is > cross_product(S, T)). > > Note that SxT is also the vertex normal. > > S and T should be derived from the texture coordinate derivatives > only once. > > Since S, T, SxT forms an ortho-normal basis you can transform S and your > normal and then perform a cross-product to calculate T. Easy in a vertex > shader. > > Does this help? > > John > > _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 ```