Mesh normals create square pattern on surface
4. Srpen 2024 v 17:12
Whether I import a smooth shaded mesh from Blender or I generate a mesh in Unity manually using Unity's built in normal calculation function, I get a square grid pattern showing for the shading of my mesh (red line highlights a couple of the squares).
Each square outline is where a quad is located.
Is this normal? Is there any way that I can make this appear more smooth?
Edit:
Each point on the triangle exists only once. Points are shared between triangles. They are created with a simple loop:
List<Vector3> vertexList = new List<Vector3>();
for (int z = 0; z < zSize; z++)
{
for (int x = 0; x < xSize; x++)
{
Vector3 v = new Vector3(0, 0, 0);
v.x = (x * vertexSpacing) - vertexSpacing;
v.z = (z * vertexSpacing) - vertexSpacing;
v.y = Mathf.PerlinNoise(v.x + g.transform.position.x, v.z + g.transform.position.z);
vertexList.Add(v);
}
}