in the md2 code of the engine, if calculateNormals is called, it creates a 3dplane for every triangle in the mesh and assigns the indices for that triangle the normal of the plane:
what I've got:
//.....................normal1.....normal2
//................................ \../
//................................. \/
//........................90deg /\90deg
//................................ /..\
//.....................plane1 /.....\ plane2
What I need:
//....................................|normal 1 and 2
//....................................|
//..........................90deg /\90deg
//.................................. /..\
//.......................plane1 /.....\ plane2
would someone know a way to average the normals for a group of indeces comeing from the same vertex? something similar is done in the terrain node code. Any help would be really appreciated.