ACCESSOR_MAX_MISMATCH validation issue in generated gltf
- Dominant language
- C++
- Stars
- 14k
- Forks
- 2.6k
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 6
Description
### Checklist
- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).
### Describe the issue
I am trying to generate a glTF file from a mesh, and while the output file works in a few visualizers the Khronos Group validator warns of an issue with the generated file:
"code": "ACCESSOR_MAX_MISMATCH",
"message": "Declared maximum value for this component (2087) does not match actual maximum (463).",
"severity": 0,
"pointer": "/accessors/0/max/0"
This is the file generated by the script, it remains the same if I update to the dev snapshot wheel (always Python 3.9 on Linux 64 bit)
[mesh.gltf.zip](https://github.com/isl-org/Open3D/files/8098122/mesh.gltf.zip)
### Steps to reproduce the bug
I use this code, that transforms one of the example point clouds into a mesh
```python
import open3d as o3d
pcd = o3d.io.read_point_cloud("Open3D/examples/test_data/fragment.ply")
voxel_grid = o3d.geometry.VoxelGrid.create_from_point_cloud(pcd, voxel_size=0.5)
vox_mesh = o3d.geometry.TriangleMesh()
voxels = voxel_grid.get_voxels()
for v in voxels:
cube = o3d.geometry.TriangleMesh.create_box(width=1, height=1, depth=1)
cube.paint_uniform_color(v.color)
cube.translate(v.grid_index, relative=False)
vox_mesh += cube
o3d.io.write_triangle_mesh("mesh.gltf", vox_mesh)
```
### Error message
No error message, the problem is within the generated file.
### Expected behavior
_No response_
### Open3D, Python and System information
```markdown
- Operating system: Linux (Fedora 35)
- Python version: Python 3.9.10
- Open3D version: 0.14.1+a1cbc21
- System architecture: x86
- Is this a remote workstation?: no
- How did you install Open3D?: pip
```
### Additional information
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.