I have a garment trimesh (python trimesh library), and want to uniformly select about half of the vertices and use these vertices to form a coarse garment mesh (still triangle mesh). The correspondence between the vertices of the original mesh and the coarse mesh is necessary.
For now, I have obtained the corresponding relationship perm like below, but I don't know how to use the obtained vertices to form a new mesh.
radius = np.sqrt(gar_restPose_mesh.area / (2 * vertC1_num))
coarse_gar_verts, mask = trimesh.points.remove_close(ori_gar_verts, radius)
perm = np.argwhere(mask).flatten()
Do you have any idea? Or a new pipeline to achieve this?
I have also tried to use
_, face_indices = trimesh.sample.sample_surface_even(gar_mesh, coarse_gar_vert_num)
coarse_gar_mesh = gar_restPose_mesh.submesh([face_indices])[0]
