How good is directx normal calculation
Hi;
I've created a small (5 vertex by 5 vertex) heightfield mesh with adjacency information.
The mesh is flat in the x-z plane, with a single overhead light.
I raise a single point in the cente of the mesh, thus creating a small four-sided pyramid. I then recalculate the normals using mesh.computenormals.But instead of getting a symettrically shaded pyramid, I get an asymmetrical mess. The pyramid is fine, but the shading is wrong.
As far as I can tell, this is actually the directx normal calculation going wrong -- perhaps because it doesn't use weighted vertices?
I've attached a picture of the result here. Does anyone know why it looks like this? Is the default normal calculation really that bad or did I mess something up?
Here is how I modify the mesh:
Vertices(12).Y += 1
Mesh.SetVertexBufferData(Vertices, LockFlags.None)
Mesh.GenerateAdjacency(0.01, Adjacency)
Mesh.ComputeNormals(Adjacency)
And here is the awful result:
http://img241.imageshack.us/my.php?image=imageqw4.jpg
Regards...

