Many people on this forum have suggested using the following tangent code (for calculating mesh tangents) at the following thread:
http://forum.unity3d.com/threads/38984-How-to-Calculate-Mesh-Tangents/page2
But several of us have found that the tangents sometimes seem to be erroneous. In my case, I’ve tested it on various cylinders with different numbers of facets, and in each case the cubemapped reflections are badly screwed up - there are abrupt changes in the reflection from one facet to the next, seemingly at random. Unity’s built-in cylinders don’t have that problem, so I assume that Unity’s internal tangent calculations work better than the abovementioned code; but for our own meshes we can’t use Unity’s built-in code.
If anyone has experience with tangents, help would be appreciated.
Surely someone must have an idea why this function doesn’t work? The odd thing is that it seems to work fine for bumpmapping but not cubemapping.