2 years ago

#73741

test-img

Jaysmito Mukherjee

How to remove duplicate vertices from a mesh?

I am using assimp to import a mesh created using blender.

Here is the code for that:

Assimp::Importer importer;

// And have it read the given file with some example postprocessing
// Usually - if speed is not the most important aspect for you - you'll
// probably to request more postprocessing than we do in this example.
const aiScene* scene = importer.ReadFile(path,
    aiProcess_CalcTangentSpace |
    aiProcess_Triangulate |
    aiProcess_JoinIdenticalVertices |
    aiProcess_SortByPType);

Now this works find but the problem comes when i try to deform the mesh by making small changes in vertex positions of the mesh like.

verts[i].position += verts[i].normal * noise(verts[i].position);

The problem is that the common points un triangles are made of separate vertices thus the mesh breaks up like:

enter image description here

What can i do so that there are no duplicate vertices

c++

3d

mesh

vertex

assimp

0 Answers

Your Answer

Accepted video resources