KhronosGroup / glTF-Sample-Assets

To store all models and other assets related to glTF
255 stars 30 forks source link

Tooling breaks when "glTF" folder is not present. #129

Open emackey opened 1 month ago

emackey commented 1 month ago

The tooling here quietly breaks when the glTF folder is not present. Specifically, the tooling issues a warning message to the console during the run, but continues processing anyway. GitHub still places a green checkmark, and it's not obvious anything has gone wrong.

The Playset model added in #116 only includes glTF-Binary and does not include a glTF folder. But the generated README.md for that model fails to list that there are extensions involved:

  "extensionsUsed": [
    "KHR_lights_punctual",
    "KHR_materials_emissive_strength"
  ],

At some point I'm sure we talked about the glTF folder always being desirable, so that we could have at least one variant that was guaranteed to be present for each sample asset, and so that visitors to this repo would not need special tooling of their own to dismantle our sample assets for better understanding. If this is really the case, we should update the CI here to enforce this. If not, we should update the CI to know how to dismantle a GLB and extract the extensions list and any other needed info from it.

DRx3D commented 1 month ago

I agree that the current operation is not correct. There was an assumption that all models contain a glTF file in the 'gltf' folder. This is used to obtain the extensions required and used for the model. The extension information has been the subject of repeated requests over the years, so it is reasonable to assume that it is important. I believe that the most reasonable course of action is to find and read the GLB to get that information. In the interim I propose that if the glTF file cannot be found or read, then the extension information in the README indicate that there was an error retrieving that information and continue with the Warning message to the log file.