The Stanford models don't come with normals, so naturally they need to be generated. At least the two highest-resolution models produce normals of all 0 with recalculateNormals, maybe the two lower ones too, didn't test.
When I replace the cross-product and normalization with some higher-precision code, the normals are correct:
Code: Select all
static vector3df cross64norm(vector3df a, vector3df b) {
vector3d<long double> newa(a.X, a.Y, a.Z);
vector3d<long double> newb(b.X, b.Y, b.Z);
vector3d<long double> newc = newa.crossProduct(newb);
long double len = newc.X*newc.X + newc.Y*newc.Y + newc.Z*newc.Z;
newc /= sqrtl(len);
return vector3df(newc.X, newc.Y, newc.Z);
}