Skip to content
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 / KTX2 Support #1896

Open
Carandiru0 opened this issue Apr 5, 2023 · 9 comments
Open

KTX / KTX2 Support #1896

Carandiru0 opened this issue Apr 5, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@Carandiru0
Copy link

Currently .png and .jpeg are the only options supported on export.

I'm requesting that KTX2 be added to that list, which is the format to support/complete the gltf pipeline.

PNG's and JPEG's cannot be used in game development. The raw highest quality (including HDR formats) is used instead.

There would be no need for conversion or transcoding, as the textures should be natively supported for display and usage in Blender as a whole. Simply referencing the existing texture file (.ktx2) would be the most logical.

On export the .ktx2 textures that were referenced by the model in Blender should be the exact same textures used on .gltf or .glb export, referenced in the uri's of that format for example. The textures should be untouched.

Thanks! This is really needed for game-development pipeline, as there is currently no defined support for KTX/KTX2 files - anywhere!

Khronos should weight in on this one, why the huge delay between supporting KTX or KTX2 with GLTF or GLB?
Your formats should work together! Which they would, if someone implemented it, can a developer at Khronos review this issue and then understand that for Khronos, this state is currently unacceptable. Huge opportunity!

Thanks again!

@julienduroure
Copy link
Collaborator

Hello,
This feature is definitively something we want to add.
For now, Blender does not manage KTX textures, so integrate it in this addon is not an easy task.
There are some discussion about the best way of doing.

@julienduroure julienduroure added the enhancement New feature or request label Apr 5, 2023
@donmccurdy
Copy link
Contributor

100% agree, I would like to see Blender support import/export of KTX2 textures.

That said, if you are doing game development: the ideal number of tools that should process your glTF files — after export from Blender and before the files arrive in the game runtime — is non-zero. Along the same lines as your request in #1895, we try to export Blender scenes to glTF as accurately as possible, and that alone is a huge task. Trying to not just export accurate 3D files, but also fully optimized 3D files is a much larger task, and ultimately not possible in any DCC tool or file format I'm aware of today.

glTF is different from most 3D formats for the simple fact that it can be optimized for use in a game runtime, but I'd encourage you to use at least one processing tool (in addition to Blender) for that purpose. Several options worth considering include:

All of these support KTX2 compression in glTF 2.0 files.

@Carandiru0
Copy link
Author

Carandiru0 commented Apr 6, 2023

I was hoping to have no intermediate step between Blender exporting a .gltf to the game engine using it, which I have working with a simple workaround that replaces the extension to be the same filename + .ktx2 in the reading of the gltf model texture uri's.

I think that the most ideal pipeline is one that uses Blender and that's it! Efficient and simple, no file format conversion or other such nonsense. Complex Pipelines and using multiple different tools seems rather the opposite!

I do have a unique implementation however, the .gltf is voxelized in-engine, where voxels (tiny ones) are rendered rather than the polygonal model. This is cached to a .v1xa file, which is a internal engine format for voxels with animations / sequences.
With high resolution voxels, rendering in game, well the end result is just awesome.

Thanks again for looking into this.

@donmccurdy
Copy link
Contributor

donmccurdy commented Apr 6, 2023

I believe what's required for this feature would likely be:

  1. Add support for KTX2 in OpenImageIO (see: KTX format AcademySoftwareFoundation/OpenImageIO#2329)
  2. Upgrade version of OpenImageIO in Blender
  3. Update this addon to use the new OpenImageIO + Blender APIs

This would require support from the OpenImageIO and Blender maintainers, it is unlikely that we can simply introduce KTX2 within this addon ourselves.

@Carandiru0
Copy link
Author

fair enough, thank you for the clarification.

@donmccurdy
Copy link
Contributor

I do think it's worth keeping an issue open to track interest in this feature — similar to #1308. Let's reopen if that's OK?

@julienduroure
Copy link
Collaborator

Yes, sure, let's do that.

@Bug-Reaper
Copy link

KTX2 textures are huge boost for GLTFs especially for certain scenarios I have where loading-textures blocks the main-thread.

Even something that used the opensource KTX2-CLI-tool to convert texture images as they're exported could be pretty nifty.

@Jeggery
Copy link

Jeggery commented Jul 15, 2024

so integrate it in this addon is not an easy task

Why is it not easy? Is there any difficulty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants