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

Support skipping individual textures during ktx compression #1017

Closed
mwbeene opened this issue Jul 8, 2023 · 5 comments · Fixed by #1037
Closed

Support skipping individual textures during ktx compression #1017

mwbeene opened this issue Jul 8, 2023 · 5 comments · Fixed by #1037
Labels
feature New enhancement or request package:functions

Comments

@mwbeene
Copy link

mwbeene commented Jul 8, 2023

There have been several cases where I'd like to skip textures individually when using ktx compression. Skipping entire slots can solve the problem visually but leads to larger files than necessary since some textures of that slot type look fine compressed.

I'm imagining something like this:
--skip "{myTextureName1,myTextureName2}"

Currently, if I want to achieve this I need to export my model as a gltf, run toktx on individual textures, then re-link them into my gltf. This can be particularly painful when trying to iterate quickly, especially since my particular software has been designed to work with glb files.

@mwbeene mwbeene added the feature New enhancement or request label Jul 8, 2023
@donmccurdy donmccurdy added this to the Backlog milestone Jul 9, 2023
@donmccurdy
Copy link
Owner

In certain other operations I've included a pattern option. This would be a RegExp for script authors, or a glob for CLI users. Something like:

--pattern <pattern> Pattern to match textures, by name or URI.

gltf-transform etc1s in.glb out.glb --pattern "!{myTextureName1,myTextureName2}"

If that option were added to etc1s and uastc commands, would that work?

@mwbeene
Copy link
Author

mwbeene commented Jul 11, 2023

Yes, I think this would work great!

@pavel-mazhuga
Copy link

@donmccurdy is there a problem with excluding a file which name contains spaces? For example, --pattern="!{floor.greece_batch - test_CyclesBake_COMBINED}" doesn't work. What did I miss?

@donmccurdy
Copy link
Owner

@pavel-mazhuga I'm not aware of a limitation related to spaces. If it helps, the globbing library used here is micromatch: https://github.com/micromatch/micromatch. It might be easier to match just a specific substring in the texture you want to omit, if possible.

@pavel-mazhuga
Copy link

Thanks, gonna try it.

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

Successfully merging a pull request may close this issue.

3 participants