Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong componentType (too many vertices for uint8) #1086

Open
julienduroure opened this issue Nov 7, 2024 · 1 comment
Open

Wrong componentType (too many vertices for uint8) #1086

julienduroure opened this issue Nov 7, 2024 · 1 comment

Comments

@julienduroure
Copy link

Hello,

In this file [0], the componentType of the indices accessor seems to be wrong.

problem_tile.glb
{
  "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] : KhronosGroup/glTF-Blender-IO#2162

@julienduroure
Copy link
Author

Hello,
Any news on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant