glTF-Compressor icon indicating copy to clipboard operation
glTF-Compressor copied to clipboard

Option to compress standalone textures?

Open mokargas opened this issue 2 years ago • 3 comments

The tool is fantastic!

However, is it possible to enable the ability to upload textures not attached to a GTLF model and compress them via the tool?

mokargas avatar Jan 21 '24 11:01 mokargas

Hello, I'm glad that you find it useful.

Unfortunately, the tool does not currently support texture compression for standalone images.

A quick workaround is to use the bare minimum GLTF model and add all the textures that you wish to compress.

I'm including a a minimal GLTF file that you can use to compress multiple textures quad.zip. It definitely isn't the most elegant solution.

I don't know what image types you require, but for KTX2, the KTX repo offers compression tools that operate on standalone textures.

ViNeek avatar Jan 22 '24 09:01 ViNeek

@ViNeek Thanks for the update

I currently use toktx CLI to compress my textures to KTX2 as typically I ship my GLBs as geom only (without materials applied due to use case of multiple models and dynamic materials done in code).

My idea for wanting to do this within the tool is the ability to compare them visually after compression - it would be a little easier and faster than my current workflow to dial in the sweet spot between fidelity and compression. Typically I evaluate a texture's use based on the model's final use in the scene (e.g might have webp, or ktx, or png)

mokargas avatar Jan 22 '24 10:01 mokargas

My idea for wanting to do this within the tool is the ability to compare them visually after compression - it would be a little easier and faster than my current workflow to dial in the sweet spot between fidelity and compression. Typically I evaluate a texture's use based on the model's final use in the scene (e.g might have webp, or ktx, or png)

Yes the comparison tool is great. You say you want to evaluate based on the model's final use in the scene. glTF is a way to provide your model to the tool so it can render it and display your textures.

Without the model, just comparing 2 images, I think the comparison tool will be much less useful.

MarkCallow avatar May 07 '24 09:05 MarkCallow