-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
help! why the ktx2 not displayed? #1933
Comments
Hi! This is the issue tracker for the glTF file format, and not for any particular piece of software that uses glTF. That said, the model you shared looks OK to me and displays reasonably in https://gltf-viewer.donmccurdy.com/: If you're not able to display the model in some other application, you may need to confirm that the application supports glTF's |
OK,Thank you very much for your answer |
Hm on closer look, the textures aren't loading in three.js. There's an error showing up in the console repeatedly,
The textures themselves look fine, so perhaps we have something implemented incorrectly in three.js for the upcoming |
I've found the cause here — the textures specify sampler minFilter/magFilter values that require mipmaps, but the If this model was created by hand, you could also consider using the glTF-Transform CLI to compress textures in the entire file for you:
The result will render correctly in both engines: From the spec,
@bghgary do you know what babylon.js is doing here? I thought it wasn't possible to generate mipmaps for compressed textures in WebGL, and I don't think I want to decompress the textures in cases like this. 🤔 |
I'll also flag that the
... is this a bug in exporting software? ktxinfo
|
@Niwei could you share the steps you are taking to convert your textures to |
ok , I use
But a few days ago, one of the jpg I used |
Thanks! I wasn't able to reproduce the
three.js cannot support |
@dodgyville Thanks! I have learned a lot! |
We don't generate mimaps in Babylon.js, as you said it's not really possible. What happens is that even if the gltf file is saying to use mipmapping for the min filter, the engine overrides the value and disables mipmapping because the textures don't have mipmaps. |
I see — thanks! That does seem like a good fallback then, perhaps with a warning logged. |
I am green hand,use ktx2 not display。Please take a look for me。this model。Thank you
ktx2room
The text was updated successfully, but these errors were encountered: