Skip to content

[Bug] glTF parser fails on non-indexed geometry and KHR_mesh_quantization #2489

@nokonoko1203

Description

@nokonoko1203

Module and/or Feature

@luma.gl/gltf - glTF parser (createScenegraphsFromGLTF)

Description

When loading 3D Tiles containing quantized point cloud data using Deck.gl's ScenegraphLayer, luma.gl throws an error.

There are two issues:

  1. Non-indexed geometry not supported - glTF files without primitive.indices (such as point clouds) cause getVertexCount not implemented error because the function was never implemented.

  2. 16-bit x3 vertex formats not supported - glTF files using the KHR_mesh_quantization extension with 16-bit x3 vertex formats (uint16x3, snorm8x3, etc.) cause errors.

Expected Behavior

The glTF parser should:

  • Calculate vertex count from attributes when indices are not present
  • Support WebGL-only 16-bit x3 vertex formats for KHR_mesh_quantization

Steps to Reproduce

  1. Load a glTF/GLB file that:

  2. The glTF parser throws an error

Environment

  • Framework version: luma.gl 9.x / deck.gl 9.x
  • Browser: Any (WebGL backend)
  • OS: Any

Logs

deck: initialization of ScenegraphLayer({id: '3d-tiles-scenegraph-[...]'}):
getVertexCount not implemented
Error: getVertexCount not implemented
    at GLTFInstantiator.getVertexCount
    at GLTFInstantiator.createPrimitive
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions