Incorrect texture with a specific .glb file
Describe the bug A specific .glb file texture is not correctly read.
To Reproduce Steps to reproduce the behavior:
- Download and extract https://gitlab.kitware.com/-/project/13/uploads/fea9fbb682124cc6105016ffc7d70f19/glbviewer.7z
- Open the file using
f3d --no-config suzanne.glb
Expected behavior A clear and concise description of what you expected to happen.
System Information:
- OS: Any
- GPU and GPU driver: Any
F3D Information
Paste the content of f3d --version or f3d-console.exe --version on Windows: 3.3.0
Additional context
VTK issue: https://gitlab.kitware.com/vtk/vtk/-/issues/19846
the material says
"pbrMetallicRoughness": {
"baseColorTexture": { "index": 0, "texCoord": 1 },
so UVs should be read from TEXCOORD_1 but could they be wrongly read from the default TEXCOORD_0 instead?
Let's swap the buffer views for TEXCOORD_0 and TEXCOORD_1 to check:
"attributes": {
"POSITION": 0,
"NORMAL": 1,
- "TEXCOORD_0": 2,
- "TEXCOORD_1": 3
+ "TEXCOORD_0": 3,
+ "TEXCOORD_1": 2
},
"indices": 4,
"material": 0
see unpacked gltf version: suzanne-gltf.zip
So I guess the first thing to investigate would be whether texCoord is properly handled all the way in VTK's importer/reader
Nice, thanks for the investigation @snoyer !