Some ideas about calculating tangent space for meshes are cleaned here. It is very easy to calculate the tangent basis vectors if the vertex normal and diffuse uv sets were provided for each triangles.
Some problems may appear when several triangles are sharing the same vertex position. For each triangle they have same position, but they may have different uv values, different tangent space go though. So you could not simply add tangent vector together which comes from different triangles and average them later. Because they are different tangent values for each triangle.
The best way to address this problem is separate this vertex into several groups. Here are some criterion list here:
1) Do they belong to the same coordinate system, left hand or right hand? You could check it by whether (TxBN)*N bigger than ZERO or not.
2) Do they have the same uv values? Different uv values means they may have different tangent normal in the normal map. After such separation or grouping, you could do add and average option to find the correct result.
So at last, you may find that the vertex number will increase a lots. And take it easy, it is very normal.
本文探讨了在提供顶点法线和UV集的情况下计算网格切线空间的基础方法。重点讨论了当多个三角形共享同一顶点位置时可能出现的问题,以及如何通过分离顶点到不同组来解决这些问题,确保正确计算平均切线。

2万+

被折叠的 条评论
为什么被折叠?



