-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KTX textures in model are not loading properly #12397
Comments
A first diagnosis step could be to drag-and-drop one of the models into the glTF validator at https://github.khronos.org/glTF-Validator/ to see whether it contains any errors, and to look at the Developer Console (by hitting F12 in Chrome or FireFox) to see whether it prints any error messages. If there are no errors or messages: Can one of the models be shared? (Maybe publicly, but in doubt, privately?) |
Thanks @javagl for the tip! @jak983464779 To confirm the model's validity, please run it through the glTF-Validator tool and let us know the results. |
gltf.zip |
The model does generate some error messages. These should be fixed. But these errors are unrelated to the issue here. And unfortunately, the issue seems to be somewhat more fundamental. CesiumJS simply does not display some of the KTX textures. I pulled out two textures (one that is displayed, and and that is not displayed) and put them on unit squares: In the left part, there is a completely black square for that glTF in CesiumJS (below the visible one - a bit hard to see in the screenshot) Here are the glTF files and the test sandcastle: CesiumJS 12397 KTX texture not displayed 2025-01-08.zip From looking at the basic properties of the KTX files, there was nothing that could explain the different behavior for me: But interestingly, when running
🤪 Specifically, the error one that one that worked is
The output attached here, just for convenience... _info_texture_01-broken.txt EDIT: One random thought that I had was that it might be the combination of that KTX file having MipMaps, and not being square at the top level. That's not a profound or justified guess, but just ~"the only 'structural' difference'" that I saw between these files... |
Strangely enough, I modified gltf samplers to display textures normally。
|
So there's more evidence that it is related to the MipMapping. I wondered whether there is any connection to #9876 (see the bottom of that PR for some related issues/PRs that came up recently). At least, I could imagine that the fix for this issue may affect a similar area of the code. EDIT: Just for convenience: The screenshots suggest that it did not work for The MipMap levels of the texture look fine, though: |
What happened?
Loading a gltf model Some textures do not load properly, and some textures can be displayed
in threejs:
Reproduction steps
...
Sandcastle example
No response
Environment
Browser: chrome
CesiumJS Version: 1.124
Operating System:
The text was updated successfully, but these errors were encountered: