-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
GLTFExporter unable to process compressed texture #24321
Comments
Related:
As the error message suggests, GLTFExporter cannot export compressed textures. If we were to fix this, I believe the steps would be:
Note that the process is lossy — GLTFExporter cannot reproduce the original compressed KTX2 file in any case, and I don't see a practical way around that. So I'm undecided about whether we should go this direction. |
Looking at the OP's workflow, it might be better to not create the compressed texture first and then using it for export. In general, the compression should be applied during the export or after it with a tool like Nevertheless, I understand there are situations where compressed assets are loaded and users want to include it in other workflows (not just for rendering). A new helper would be a good start although the docs should highlight the mentioned consequences. |
Exporting a scene is only a small part of our application, users typically place various objects in an interactive scene and we provide the option to render the scene in high quality on a server. Therefore we would like to optimize the interactive experience by decreasing the memory footprint. Unfortunately we can't implement compressed textures right now until there is a solution for GLTFExporter. |
If I were building such an application, my advice would be to keep a source-of-truth outside the three.js scene graph and update it directly — treating the three.js scene as a "view" into the source scene, but never fully overwriting that with a serialized three.js scene graph. This is basically what glTF-Transform/View provides. The "source" could be a glTF file, or something custom. Nevertheless I think support for converting THREE.CompressedTexture to THREE.Texture makes sense to include, and #23321 is a good start. |
Closing since with the merge of #23321 the original runtime error should be fixed. |
Describe the bug
When trying to export a scene that contains a material that uses a compressed texture format an error will occur and the export will fail. Format number is 36492 which I believe is COMPRESSED_RGBA_BPTC_UNORM_EXT: https://www.khronos.org/registry/webgl/extensions/EXT_texture_compression_bptc/
To Reproduce
Steps to reproduce the behavior:
Screenshots
Platform:
The text was updated successfully, but these errors were encountered: