Wrong componentType (too many vertices for uint8)
- Dominant language
- C++
- Stars
- 7.5k
- Forks
- 1.1k
- Avg merge
- 47m
- Merged PRs (30d)
- 1
Description
Hello,
In this file [0], the componentType of the indices accessor seems to be wrong.
problem_tile.glb
```jsonc
{
"asset":{
"version":"2.0",
"generator":"draco_decoder",
"copyright":"Google"
},
"scenes":[
{
"nodes":[
0
]
}
],
"scene":0,
"nodes":[
{
"mesh":0,
"translation":[
851227.05319905072,
4379922.724366514,
4543783.8765163999
]
}
],
"meshes":[
{
"primitives":[
{
"attributes":{
"POSITION":1,
"TEXCOORD_0":2
},
"indices":0,
"mode":4,
"material":0,
"extensions":{
"KHR_draco_mesh_compression":{
"bufferView":0,
"attributes":{
"POSITION":0,
"TEXCOORD_0":1
}
}
}
}
]
}
],
"accessors":[
{
"componentType":5121,
"count":513,
"type":"SCALAR"
},
{
"componentType":5126,
"count":314,
"max":[
53.494731903076172,
37.779499053955078,
-9.2874250411987305
],
"min":[
-69.238937377929688,
-95.882095336914062,
-92.276382446289062
],
"type":"VEC3"
},
{
"componentType":5126,
"count":314,
"type":"VEC2"
}
],
"materials":[
{
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0,
"texCoord":0
},
"baseColorFactor":[
1,
1,
1,
1
],
"metallicFactor":1,
"roughnessFactor":1
},
"emissiveFactor":[
0,
0,
0
],
"alphaMode":"OPAQUE",
"extensions":{
"KHR_materials_unlit":{
}
}
}
],
"textures":[
{
"source":0,
"sampler":0
}
],
"samplers":[
{
"wrapS":33071,
"wrapT":33071
}
],
"images":[
{
"bufferView":1,
"mimeType":"image/jpeg"
}
],
"bufferViews":[
{
"buffer":0,
"byteOffset":0,
"byteLength":1108
},
{
"buffer":0,
"byteOffset":1108,
"byteLength":3108
}
],
"buffers":[
{
"byteLength":4216
}
],
"extensionsRequired":[
"KHR_draco_mesh_compression",
"KHR_materials_unlit"
],
"extensionsUsed":[
"KHR_draco_mesh_compression",
"KHR_materials_unlit"
]
}
```
Not sure how this file was created, but it is coming from Google 3D Tiles (so, Draco is also from google, so I hope you will be able to retrieve the right team)
The file has 314 vertices, so indices can't be stored on uint8 / componentType 5121
Originally reported on Blender glTF I/O repo: [1]
[0] : https://github.com/KhronosGroup/glTF-Blender-IO/files/14599795/problem_tile.zip
[1] : https://github.com/KhronosGroup/glTF-Blender-IO/issues/2162
Contributor guide
Assessment
This issue has not been assessed yet.