How calculate tangent vector for the second uv channel?

btw I did end up finding another way of doing this that fixed the viewing angle problem 100%, but it is a bit more expensive. It also reduces the faceting in some cases. It is based on this math:

http://www.thetenthplanet.de/archives/1180

Generating the Tangent and Binormal looks like this:

463900cd83068b00137d04444bc434bba41248e0.jpeg
(EDIT there was a messup in the graph, fixed)

You can also just use the nodes “T” and “B” directly by just normalizing each of them. The current setup normalizes them to the largest one instead of individually which solves a minor issue with viewing angles. I tried to also add the “T” and “B” comments to the modified versions of them at the end but my build has a bug that made new comments not show up. But the nodes to the far right are still the T and B they are respectively connected to.

To use it you still need the use the transform as above with these vectors.

btw, the biggest problem with my ‘simple’ version, is that it will be very wrong if you go stand next to a wall and look straight up. It is basically assuming the geometry faces the camera and it will be wrong by the angle difference. In many cases it won’t be a problem and is about half the cost of the “correct” version.