KhronosGroup / KhronosGroup/3D-Formats-Guidelines

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

Open
#16 2 comments 0 reactions 1 assignee Claimed by @echadwick-artist View on GitHub
documentation
Dominant language
No language data
Stars
150
Forks
22
PR merge metrics
No merged PRs in 30d

Description

[This section](https://github.com/KhronosGroup/3D-Formats-Guidelines/blob/main/KTXArtistGuide.md#method-3-etc1s) 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](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/StainedGlassLamp/glTF-JPG-PNG), 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".)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.