5
$\begingroup$

I am turning instances on a template into copies in a glTF file. When I import that glTF file into Blender again, the number of vertices has doubled.

enter image description here

The number of faces also shows as double, but interestingly, the number of tris matches.

I can't see what is causing this. There is an array modifier creating the stack of objects inside the tower, but it seems to be applied correctly. There are no other modifiers, or constraints, or parenting. But when the glTF is imported, and the object that is that stack of rings is edited, and all vertices are selected and then merged by distance with Ctrl + M, almost 15,000 vertices are removed, reducing the total count by more than half.

What could be causing this?

$\endgroup$

1 Answer 1

9
$\begingroup$

glTF is a last-mile format. It stores its mesh data in a ready-to-load-onto-the-GPU kind of state.

But the graphics hardware doesn't want the same vertices that artists want to see in Blender. At the hardware level, there are "vertex attributes" for things like normal vectors, UV coordinates, etc., that must be specified per-vertex, not per-face. Likewise, quads and N-gons are not welcome at the hardware rasterization layer of many devices, including mobile devices, which generally accept only triangles at that layer.

So a finished, exported glTF will be fully triangulated, with all discontinuous UVs and all discontinuous normals separated into co-located vertices. This way, when the glTF arrives on a client device for rendering, it should not require the client to spend much in the way of cycles or battery power processing the raw mesh data. It should just load into the local graphics API and render immediately.

This does mean that if you load one back into Blender though, you'll end up with these un-merged verts, and any faces that weren't triangles will be cut into multiple faces.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .