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...
This is the GLTF report
gltf image, and my blender:
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?
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.
Q: Is this just a really bad bug or something?