---
title: "How to remove duplicate vertices from a GLB file"
description: "A GLB splits vertices at UV seams and hard edges on purpose. Merge real duplicates by distance in your 3D editor; the needed splits return on export."
canonical: https://appliedmanifold.com/mesh/remove-duplicate-vertices-glb/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

1.  [Home](https://appliedmanifold.com/)
2.  [meshfx](https://appliedmanifold.com/mesh/)
3.  GLB duplicate vertices

meshfx // GLB WELD

# How to remove duplicate vertices from a GLB file

You remove real duplicate vertices from a GLB by merging by distance in your 3D editor and exporting again, and some repeated positions will remain. glTF stores one vertex per unique mix of position, normal and UV, so the exporter splits vertices at every UV seam and hard edge. Only overlapping vertices with matching data are waste.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [meshfx docs →](https://appliedmanifold.com/docs/mesh/)

pyrofx effects work today, and new accounts start with $5 of usage.

**MODULE // meshfx AVAILABLE**

meshfx measures faults, checks repairs and makes LODs for a triangle budget. meshfx runs on the hosted API: try it in the [Playground](https://appliedmanifold.com/playground/).

-   glTF vertex: position plus normal, UV and more
-   Splits at seams and hard edges are needed
-   Real duplicates: same data, unconnected faces

01 // WHY

## Which duplicates in a GLB are real

A GLB is indexed: triangles point into a vertex list, and each vertex carries all its attributes at once. Where two faces share a position but need different UVs or normals, the file must hold two vertices, so the GLB vertex count is always higher than the count in your 3D editor.

Real duplicates match in every attribute yet belong to faces that are not connected. They show as a crack or a shading seam where no UV seam exists.

02 // HOW TO

## Merge and export a clean GLB

1.  Import the GLB into your 3D editor. If the importer offers to merge vertices, turn it on.
2.  Run Merge by Distance with a threshold near 0.0001 m, which glTF meters make easy to set.
3.  Mark sharp edges or use smooth by angle so hard corners stay crisp.
4.  Check that the UV seams are still where you want them.
5.  Export a new GLB. The exporter splits vertices again where UVs and normals require it.

meshfx measures holes, flipped faces and non-manifold edges. Each repair is checked against the source and undone with a warning if it moves the surface too far. Hosted meshfx runs are available in the Playground.

03 // CHECK

## Compare vertex counts in three.js

Log the vertex count of each mesh before and after, with the GLB loaded through GLTFLoader.

count-vertices.js

```
gltf.scene.traverse((o) => {
  if (o.isMesh) console.log(o.name, o.geometry.attributes.position.count);
});
```

04 // RELATED

## Related pages

-   [glTF and GLB AvailableglTF is an open 3D format for meshes, materials and animation, and GLB is the same data packed into one binary file.](https://appliedmanifold.com/learn/glb-gltf/)
-   [Duplicate vertices AvailableWeld duplicate vertices with Merge by Distance at a small threshold, then restore sharp edges so shading stays crisp.](https://appliedmanifold.com/mesh/remove-duplicate-vertices/)
-   [OBJ duplicate vertices AvailableOBJ needs only one v line per position, so merge by distance in your 3D editor and export to drop repeated vertices.](https://appliedmanifold.com/mesh/remove-duplicate-vertices-obj/)
-   [STL duplicate vertices AvailableSTL repeats every corner per triangle, so weld it with Merge by Distance right after import before any repair or smoothing.](https://appliedmanifold.com/mesh/remove-duplicate-vertices-stl/)
-   [Non-manifold edges AvailableFind non-manifold edges, merge duplicates, delete interior faces and fill holes by hand in any 3D editor before export.](https://appliedmanifold.com/mesh/fix-non-manifold-edges/)
-   [meshfxmeshfx reads an input model, repairs surface faults and compiles reduced GLB levels of detail for Godot, three.js or any glTF loader.](https://appliedmanifold.com/docs/mesh/)

[All pages in meshfx →](https://appliedmanifold.com/mesh/)

[← USD n-gons](https://appliedmanifold.com/mesh/fix-ngons-usd/)[OBJ duplicate vertices →](https://appliedmanifold.com/mesh/remove-duplicate-vertices-obj/)

05 // FAQ

## GLB duplicate vertex questions

[All questions →](https://appliedmanifold.com/faq/)

**README.REMOVE\_DUPLICATE\_VERTICES\_GLB**

### Why do duplicate vertices cause shading or export problems in a GLB?

Unconnected duplicates break smooth shading into seams and make the mesh count as open. They also add vertices the engine processes for nothing.

### How do I merge by distance without damaging a GLB's UVs?

Merge positions in your 3D editor where UVs sit on face corners and survive the merge, keeping the threshold small.

### How do I check a GLB's vertex count in three.js?

Traverse `gltf.scene` after GLTFLoader loads it and read `geometry.attributes.position.count` on each mesh.

### How do I weld overlapping vertices in a GLB game model?

Merge by distance in your 3D editor and export again. A GLB has no weld setting of its own, so merge before export.

## Explore meshfx outputs

Inspect compiled meshfx outputs and their reports. Hosted meshfx runs are available in the Playground.

[Get Free API Key](https://console.appliedmanifold.com/sign-in?next=/api-keys) [meshfx →](https://appliedmanifold.com/docs/mesh/)

[All effects, guides and explainers →](https://appliedmanifold.com/effects/)
