glTF-Validator
glTF-Validator copied to clipboard
totalVertexCount seems misleading, based on accessors rather than on buffers
Perhaps this is by design, but it seems that the reported totalVertexCount
field is perhaps misleading...
For instance, the Brainstem.gltf model reports as follows:
"animationCount": 1,
"materialCount": 59,
"hasMorphTargets": false,
"hasSkins": true,
"hasTextures": false,
"hasDefaultScene": true,
"drawCallCount": 59,
"totalVertexCount": 34159,
"totalTriangleCount": 61666,
"maxUVs": 0,
"maxInfluences": 4,
"maxAttributes": 4
Whereas the same model that has been processed using third-party tooling (which happens to make more liberal use of accessors and bufferViews) reports:
"animationCount": 1,
"materialCount": 59,
"hasMorphTargets": false,
"hasSkins": true,
"hasTextures": false,
"hasDefaultScene": true,
"drawCallCount": 59,
"totalVertexCount": 1047958,
"totalTriangleCount": 30832,
"maxUVs": 0,
"maxInfluences": 4,
"maxAttributes": 4
Note the totalVertexCount
is disproportionately large, when in actual fact the single buffer that is referenced is some 30% smaller in the second example.
I guess it is double counting where accessors are referencing the same bufferView.