Those triangles probably aren’t connected. Meaning they were side by side because of the position of their vertices and not because their triangles share the same vertex index.
Like triangle 1/2/3 and 4/5/6 are side by side but not like 1/2/3 and 2/3/4 or something similar.
From what I see your generation code makes several normalized faces that separate when you move the vertices around.
I’m not sure it’s going to be easy to fix at all.
In your generation code, you may edit the triangles at the seams to make sure they are interconnected, or modify the pushing code to make sure separation doesn’t happen by making adjacent vertices equal in position. Either way, if my assumptions are correct, it’s going to be a tough ride.
Looks like lighting is not being shared across different areas of the mesh. Topologically, any spherical mesh must have at least one discontinuity, a seam where vertices are duplicated, yet belong to either side of the seam. If you change one side, you must also change the other side.
I’m not exactly sure it would be the cause, since the seams cast a shadow below. I do agree on the topology of the sphere though, I remember seeing something like that on a math channel. So the problem can be mitigated but not prevented entirely.
you need to move the shared vertex positions as a pair so you don’t physically rip a hole in the mesh
you need to recompute the lighting on either side of the seam so there is no discontinuity in the lighting, eg, you need to “re-fake” the original smoothing, even when it spans disparate verts
So basically:
-find all the vertices that need to be “connected”
-make them move together
-make them move in the correct direction by giving them the same normal and correct normal.
That looks like you’re manipulating a vertex on the other side of the mesh. We don’t know how you determine which vertices belong together. However it seems you’re doing something wrong. If it’s always the same vertex, maybe you always included vertex 0 or something?
Yeah it’s so weird because It’s happening for only vertex 0 but I’m not quite sure why it keeps getting selected as you can see here (blue sphere is the vertex 0): https://i.imgur.com/gvcaR4f.gif
I’m still trying to look but I can’t detect anything in my code that could cause this. Is it because I’m Raycasting so constantly that it picks up vertex 0?
Also, is there anything significant about vertex 0 other than being the first vertex of the mesh?