Procedural mesh artifacts.

I have written my own terrain generation and when I generate terrains, I get these patches of dark areas occurring whenever there is a “hard” edge.

Like this:

There is a group of 9 quads which are less lit than the others.
alt text

I create the verts, triangles and UV’s, then I call RecalculateNormals().

I can confirm the following:

  • There are no duplicate vertices.

What am I missing? Thanks in advance.

It sort of looks to me like the triangles aren’t sharing normals at the vertexes. Have them share normals where you expect the faces to look smooth.