BufferGeometryUtils.mergeVertices() is not working as expected

Greetings !

Making algebraic surfaces in my MathView, I can’t merge vertices with BufferGeometryUtils.mergeVertices(). Increasing tolerance gives nothing, but large holes in the surface. Here is an example:

The same pillow in Z-Brush after geometry subdivision:

At the same time Z-Brush function “Weld Points” do it well.
How do I merge all surface points in Three.js the same way ?

Maybe your boundary vertices are too different and cannot be merged?

Merging compares not only positions, but also normals and uvs. So if the uv’s at both sides of the seam are different, then the vertices will not be merged even if their positions are identical.

One way to merge it to ensure all data is the same (especially the uvs). Another way is to delete the normals and uvs, merge, and then recreate them.

3 Likes

Another good idea to try - thanks !

Just a small remark:

and all other custom attributes.

3 Likes