Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.12.11, 5.15.4
Description
When loading a gltf (using the animated-skinned-mesh example) which contains 2 sets of texture coordinates, the unintended set of texture coordinates is used for texture mapping, hence rendered incorrectly. Primitives in the gltf defined as below
"primitives": [ { "attributes": { "WEIGHTS_0": 6, "JOINTS_0": 5, "TEXCOORD_0": 3, "POSITION": 2, "TEXCOORD_1": 4, "NORMAL": 1 }
,
Looking at the below clip of code:
QString GLTFGeometryLoader::standardAttributeNameFromSemantic{ ............ ........... if (semantic.startsWith(QLatin1String("TEXCOORD"))) return QAttribute::defaultTextureCoordinateAttributeName();
It is suspected that currently only one set of texture coords can be loaded, and the latter loaded one will overwrite the former loaded one.
If reverse the bufferView pointed to in respective accessor, it can get the correct texture mapping and the gltf will be rendered correctly.
The gltf file (provided by the customer ) is proprietary but can be provided for debugging purpose, please email me privately