Open3D
Open3D copied to clipboard
ACCESSOR_MAX_MISMATCH validation issue in generated gltf
Checklist
- [X] I have searched for similar issues.
- [X] For Python issues, I have tested with the latest development wheel.
- [X] I have checked the release documentation and the latest documentation (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)
Steps to reproduce the bug
I use this code, that transforms one of the example point clouds into a mesh
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
- 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