I am currently working in Unity to try to create a procedural planet for a game idea I have.
I've gone down the route of building 6 faces of a cube (from scratch, vertices, triangles...) and "spherifying" them into a grid-based sphere.
How ever I have seem to run into a small issue. The seams where these faces meet are quite visible and
I'm guessing that it has to do with the normals not being correctly calculated.
When the sphere has been generated it looks really good, but when I apply the noise to give the planet some terrain
features the seams become very noticeable.
Here is an image showing the seams when some noise has been applied.
At first I thought that the problem was noise values not matching correctly. But if you look closely the vertices match each other.
At the moment the normals are calculated by Unity's mesh object using the built-in function
mesh.RecalculateNormals()
But I'm guessing that the normals are calculated in a way that doesn't work well with a spherical structure.
How should the normals be calculated? Should they be in the direction from planets center (0, 0, 0) to the vertex?
I'd really appreciate some insight into this issue.