Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94268

Support gltf which contains multiple sets of texture coordinates

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.11, 5.15.4
    • Fix Version/s: None
    • Component/s: Qt3D
    • Platform/s:
      Windows

      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

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            seanharmer Sean Harmer
            Reporter:
            yifei Yi Fei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes