   Calculating per-vertex tangents,binormals
  Before you answer:this is not about how to calulate the tangents and binormals from vertex positions and texcoords but creating "numVertices" tangents,binormals(per-vertex) from "numTriangles/3"(per index) tangents,binormals.I just discovered that my 3d-modelling package(maya) exports 3 tangents and 3 binormals per triangle that means that each vertex has more than 1 of them,so i have to combine them somehow. I thought i could just interpolate all the vectors for a vertex but it didn't work correctly(maybe i did something wrong with my code). I'm wondering if interpolating is even the right way to go(that's a question).For testing if my values are correct i wrote a shader that creates a matrix from the tangent,binormal and normal, multiplied the uv coords with it(in fact i don't know if that matrix is for converting tangentspace to worldpsace o the other way round but i tried both ways) and substracted the position of the vertex in worldspace. if everything worked fine everything should be black, but my mesh is quite colourful.my code://ok we got 3 tangents,binormals per face,which is not what we want.//(we want 1 tangent,binormal per vertex)indexedTangents.resize(pos.size()); //so first resize the output vectors:indexedBinormals.resize(pos.size());for(int i=0;i<tangents.size();++i) //for all tangents(/binormals){vector3 tangent;vector3 binormal;int index=Indices.at(i);    //get the vertex indextangent=tangents.at(i);//get the tangentbinormal=binormals.at(i);    //and the binormalint k=0; for(int j=0;j<tangents.size();++j) //now we have to find all the other tangents(/binormals) with the same vertexindex{if(index==Indices.at(j)) //ok we have found one{tangent=tangent+tangents.at(j);  binormal=binormal+binormals.at(j);k++;}}tangent=tangent/k;binormal=binormal/k;indexedTangents.at(index)=tangent;indexedBinormals.at(index)=binormal;}edit:typosregards,m4gnus   
  3 tangents 3 binormals 3 normals per triangle?whats wrong with that1 tangent 1 binormal 1 normal per vertex of that trianglemakes 3 of each   