Shared vertices for terrain mesh

I have a procedural terrain mesh with many vetrices and triangles, using four triangles per quad (how excessive that is, by the way?), with middle one having mean height of four aruond it to prevent “saw” effect on some ridges.

Initially I have wanted to make low-poly voxel-like mesh, possibly with greedy meshing, but that was too memory-expensive. I also had one whole mesh of 200x200 quads as a prototype, so I had to change 16-bit to 32-bit format (proceduralTerrainMesh.indexFormat = IndexFormat.UInt32;).
In this case shared vertices looked strange, and this mesh needed to be sharp anyway, also unique vertices with sharp normals are more convenient to divide into several mesh instances, allowing for culling and 16-bit index format.

With shared vertices:


With unique vertices:

In this case there is no question that shared vertices are no good, I guess.

As this approach was too expensive, I decided to have bigger quads, smooth mesh.
But in this case on the contrary shared vertices look better.

With unique vertices:


With shared vertices:

But in this case I guess there would be a problem to divide this mesh into pieces, a juncture will be visible?
How is it better to proceed?
Is it a good practice to have shared vertices on the terrain mesh?
I guess for a smooth mesh it would make sense to use two triangles per quad too.

Best regards.

So I did divide my single mesh into separate smaller ones, and I have visible seams, as expected.


I did try to make similar normals for individual meshes at the borders, but the seams stand out anyway…

There is an option to have unique vertices, then these seams will not stand out as much, as they will be everywhere X)


Maybe there is a way to make this mesh appear smooth as whole?

For now I sort of like the stylized look of mesh with upward normals, maybe I will go with that.

Also it is possible to just use single mesh, even though there will be no culling and maybe 32-bit format for larger scenes…

there shouldn’t be seams if you did the normals correct. The better way is to just sample the normals from a normal texture in your fragment shader. This is how the default unity terrain works when gpu instancing is enabled on the terrain. Also, why not just use the built in terrain system?

Thank you for the reply.

Which way the normals are correct? If vertices are shared, maybe the normal direction for the vertices at the seam should be averaged between meshes?
In a sense normals are more correct with unique vertices, when the normals for all the vetrices of triangle are facing the same way as the face. That way there are no “seams”, but the resulting mesh is not “smooth”.

I did not quite get the part about sampling from normal texture… I believe I do not have a normal texture?

Regarding the terrain system - I do not use it because I feel there is more control over meshes, their generation works with DOTS/ECS, Entity instances of these meshes should have a good performance.
I do not know terrain system good enough to determine will I be able to procedurally control it the same way or better.