Today I tried to use the ktx batch scripts located in the official babylon.js repo to optimise some large textures.
The tool gave the following error once for every file:
Error: Invalid values chosen for Encode Format. Please see -help for valid parameters.
At the end there would ever only be the original pngs, the astc, dxt, and etc2 versions.
I think etc1 are missing intentionally, but the script seems to error for pvrt unintentionally.
Is this a know problem? Is there a better easy to use batch encoder maybe using ktx2?
2017, good times! The batch script ends up calling this script for every file.
I know it used to do pvrtc files. This is calling a command line program of a company which owns the pvrtc format. I did notice that there is a comment that the files must be square. I have not done this or downloaded their tool in a very long time. Maybe they changed the args. Best thing to do is to follow their advice and add a -help on line 36. When they list the parameters do a compare with the line.
Yeah it seems like the CLI has changed, but even going with their own documentation it doesnt seem to work yet, Ill test further and open a Pull Request once I fixed the issue.
Out of curiosity, is there a more modern tool for similar batch encoding?
There are other tools, but if you want pvrtc, this is the only thing. Astc is taking over though. I have a 2014 Era iPad. Its gpu supposedly does astc, but I don’t think there’s an extension to expose it.
Quest supports astc, so that is all I care about anymore. You need a addin to do that with this tool.