KhronosGroup / KhronosGroup/glTF-Sample-Environments

sheen.ktx2 is not a valid ktx2 file.

Open
#6 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Batchfile
Stars
101
Forks
13
PR merge metrics
No merged PRs in 30d

Description

https://github.com/KhronosGroup/glTF-Sample-Environments/blob/master/helipad/charlie/sheen.ktx2 has an invalid data format descriptor. Probably any other file written by "UX3D SlimKTX2 v1.0" is also invalid. The problems are:

  1. The DFD gives its length as 0 although the KTX2 file header gives the correct byte length.
  2. The color model is UNSPECIFIED but the KTX v2 spec requires RGBSDA.
  3. All BYTES_PLANE fields are 0
  4. The DFD has 0 samples.

The libktx reader uses the DFD in order to avoid a big switch on the VkFormat so the invalid DFD causes it to return an error when trying to load this file.. The three.js loader also uses the DFD info and I'm sure other software does too.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with helipad/charlie/sheen.ktx2 and compare its data format descriptor with the KTX v2 specification. Check how libktx reports the invalid descriptor, then correct the asset or regenerate it so the descriptor length, color model, byte-plane fields, and samples are valid and the file loads successfully.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.