Skip to main content
2 of 3
added 193 characters in body
Krupip
  • 260
  • 1
  • 11

How to stop blender from generating duplicate vertices on export?

Yes, I know, use mesh -> clean up -> remove by distance. I did that, and in blender, it appears as if things are all fine and dandy, I made 3 cubes and made pyramids at the end, total vertex count is 18, makes sense to me. Export object as gltf, and I get... 84 vertices...

enter image description here

This is the GLTF report

enter image description here

gltf image, and my blender:

enter image description here

You can see in the bottom corner, 18 verts....

And for the final touch, here's the output from my tiny_gltf loader c++ program, which outputs vertices, and says the number of vertexes and indexes.

{NORMAL: 1}
{POSITION: 0}
{TEXCOORD_0: 2}
COUNT 84
INDCOUNT 96
(1, 1, -1)
(1, 1, -1)
(1, 1, -1)
(1, 1, -1)
(1, 1, -1)
(-1, -1, 1)
(-1, -1, 1)
(-1, -1, 1)
(-1, -1, 1)
(-1, -1, 1)
(-1, -1, 1)
(3, 1, -1)
(3, 1, -1)
(3, 1, -1)
(3, 1, -1)
(3, -1, -1)
(3, -1, -1)
(3, -1, -1)
(3, -1, -1)
(3, 1, 1)
(3, 1, 1)
(3, 1, 1)
(3, 1, 1)
(3, -1, 1)
(3, -1, 1)
(3, -1, 1)
(3, -1, 1)
(1, -1, -1)
(1, -1, -1)
(1, -1, -1)
(1, -1, -1)
(1, 1, 1)
(1, 1, 1)
(1, 1, 1)
(1, 1, 1)
(1, -1, 1)
(1, -1, 1)
(1, -1, 1)
(1, -1, 1)
(1, -1, 1)
(1, -1, 1)
(4, 0, -0)
(4, 0, -0)
(4, 0, -0)
(4, 0, -0)
(-3, 1, 1)
(-3, 1, 1)
(-3, 1, 1)
(-3, 1, 1)
(-3, 1, 1)
(-3, -1, 1)
(-3, -1, 1)
(-3, -1, 1)
(-3, -1, 1)
(-3, 1, -1)
(-3, 1, -1)
(-3, 1, -1)
(-3, 1, -1)
(-3, 1, -1)
(-3, -1, -1)
(-3, -1, -1)
(-3, -1, -1)
(-3, -1, -1)
(-3, -1, -1)
(-1, 1, 1)
(-1, 1, 1)
(-1, 1, 1)
(-1, 1, 1)
(-1, 1, 1)
(-1, 1, 1)
(-1, 1, -1)
(-1, 1, -1)
(-1, 1, -1)
(-1, 1, -1)
(-1, -1, -1)
(-1, -1, -1)
(-1, -1, -1)
(-1, -1, -1)
(-1, -1, -1)
(-1, -1, -1)
(-4, 0, 3.01992e-07)
(-4, 0, 3.01992e-07)
(-4, 0, 3.01992e-07)
(-4, 0, 3.01992e-07)

Look at all those duplicates! how do I stop blender from ruining my meshes on export?

EDIT: This doesn't really answer my question, but I found a temporary work around by copying the vertices on the mesh and deleting the old one. Is this just a really bad bug or something?

Krupip
  • 260
  • 1
  • 11