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

gltf-transform command suggested in KTX Artist Guide doesn't work #16

OptiStrat opened this issue Nov 7, 2021 · 2 comments

gltf-transform command suggested in KTX Artist Guide doesn't work #16

OptiStrat opened this issue Nov 7, 2021 · 2 comments


Copy link

@OptiStrat OptiStrat commented Nov 7, 2021

This section suggests that one can convert to ETC1S format all textures tied to a glTF file with:
gltf-transform etc1s input.glb output.glb --verbose

Assuming this command should work with a .gltf input as well, if I attempt to convert the reference stained glass lamp model, the command fails with the following message:

warn: Expected KTX-Software >= v4.0.0-rc1, found v4.0.0-60-g1f085d30.
debug: Texture StainedGlassLamp_grill_normal.jpg (normalTexture)
debug: • toktx --genmipmap --bcmp --normal_map --assign_oetf linear --assign_primaries none /tmp/tmp-149058-ssajk7wetT02-.ktx2 /tmp/tmp-149058-CLaOagTPHN3l-.jpg

error: • Texture compression failed:

Unless this has to do with the warning I get about expected KTX-Software version, this might technically be an issue with gltf-transform calling toktx with the wrong flags.
=> adding @donmccurdy.

(I understand that it's usually not a good idea to compress normal maps to ETC1S. I'm just doing some quick tests of the different tools available for manipulating 3D assets, with focus on "does it work (at all) in my current dev environment".)

Copy link

@OptiStrat OptiStrat commented Nov 7, 2021

The command in this section doesn't work either.

The flag --rdo-quality doesn't seem to be available anymore in gltf-transform v1.0.1 (--rdo seems to have replaced it?)

Copy link

@donmccurdy donmccurdy commented Nov 7, 2021

The command gltf-transform etc1s input.glb output.glb --verbose does work on the latest gltf-transform, KTX-Software, and the lamp model above (at least on my machine), so a few follow-up questions:

  1. What version of gltf-transform are you using?
  2. What operating system?
  3. Is KTX Software installed from prebuilt packages or built from source?
  4. After the Texture compression failed: ... at the end of your error snippet, was there any other error output?
  5. If not, can you run the command that failed (toktx --genmipmap --bcmp --normal_map --assign_oetf linear --assign_primaries none /tmp/tmp-149058-ssajk7wetT02-.ktx2 /tmp/tmp-149058-CLaOagTPHN3l-.jpg in this case) and see any other output? You may need to re-run the original gltf-transform command first to create the tmp files.

The --rdo-quality option was replaced by --rdo back in March (in KTX-Software) and so glTF-Transform was updated to include that. The two are not the same thing though, and do not take the same values. The document should probably be updated to use --rdo, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants