lesson 45
I have found very difficult to calculate face normals for the lessons heightmap loading part , I calculated something like this
for(int nIndex=0;nIndex<m_nVertexCount;nIndex+=3)
{
CVec v1=m_pVertices[nIndex+2]-m_pVertices[nIndex];
CVec v2=m_pVertices[nIndex+1]-m_pVertices[nIndex];
CVec n=Cross(v1,v2);
m_pNormals[nIndex]=Normalize(n);
}
hm.... come to think more of it I think I found what the problem is
---sorry for not using proper english , I'm from latin roots
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement