Unity's Mesh.vertices doesn't seem to connect all vertices. Why?

Yesterday I ran into a problem where I wanted to move some vertices of my model. However, when moving some around, I notice they seem to be detached from vertices in the exact same position. It happens to all sorts of models. Models I import from 3ds Max (default objects and self created ones) but also the default Cube object from Unity.

Here is my example:


When I run through Mesh.triangles for this specific model, these are the vertex indices associated:

triangle 0: 0, 1, 2
triangle 1: 3, 2, 1
triangle 2: 2, 3, 4
triangle 3: 1, 5, 3
triangle 4: 5, 1, 6
triangle 5: 7, 6, 1
triangle 6: 4, 8, 2
triangle 7: 9, 2, 8
triangle 8: 8, 4, 10
triangle 9: 10, 11, 8
triangle 10: 12, 8, 11
triangle 11: 11, 10, 13
triangle 12: 13, 14, 11
triangle 13: 15, 11, 14
triangle 14: 14, 13, 16
triangle 15: 17, 3, 5
triangle 16: 18, 16, 13
triangle 17: 19, 13, 10
triangle 18: 20, 10, 4
triangle 19: 21, 4, 3

As you can see, some vertices are neglected. Vertex 0 for instance is ONLY used in triangle 0. However, if you look at my image it’s on top and shared by others. Vertex 1 is perfectly shared. Now if I want to move vertex 1, this happens, which is what I want!

However, when I move the neglected vertex 0 I get this:

And when I move neglected vertex 15:

I get this in all models I import (tried .FBX and .MAX). And each model seems to have some “unconnected” vertices floating around. Seeing I want to move vertices around along their normals this creates a weird “explosion”-like behaviour, because their normals are based on them being solo, thus moving OUT instead of as a group as in my example of moving vertex 1.

I’ve also tried looking into the importer, but nothing came out of that. How can I make sure all vertices are “connected”?

If the vertices dont also share uv and normals then they will be duplicated, from your first image it looks like the uv mapping is causing the problem.

Hey SpookyCat, thanks for your reply. I’m actually trying to build the displacement modifier you made in Mega-Fiers (don’t worry, no commercial intensions, just for a hobby project ;)) so you might be the perfect person to ask. How did you handle this problem in Mega-Fiers where UV’s are not connected?

“For each vertex where position equals target vertex”, move those too?!