This is the same code that will be going into the BinaryAssetBuilder replacement I am working on.
You can download it from https://mega.nz/file/HoEgCTiL#gcuKel5QwVO-dQD6-EBvrOupZebVUEkM7sNTpQeE2L4 and you can get the source code at https://github.com/jonwil/sagetools
It takes the following parameters:
-in (path to the input texture file to convert)
-out (path to the output texture file to create)
-type <type> (type of texture to generate where <type> can be VolumeTexture, CubeTexture or StandardTexture, default is StandardTexture)
-generatemips <true|false> (generates mip maps, default is true)
-format <format> (texture format to generate where <format> can be A8R8G8B8, DXT1, DXT1A, DXT3, DXT5, X8R8G8B8 or R5G6B5, default is DXT1)
For example, this command line:
texcompress -in in.tga -out out.dds -format DXT5 -generatemips false -type StandardTexture
will convert in.tga into an output standard texture file with DXT5 compression and no mip maps generated.
It can read the following input formats:
.jpg
.tga
.png
.dds (which is copied directly across to the output file without any changes)
The purpose of this tool is to provide a way to compress textures identically to how the SAGE SDK does it. (note that this only supports output in PC format, not XBOX or PS3 format)
Feel free to modify the source code and to distribute your modifications but if you distribute modified binaries you also need to distribute modified source code to comply with the various licenses and I would appreciate a heads up that you are doing things with my code
Any questions about this stuff or how to use it (e.g. if the instructions aren't clear), please feel free to post here or hit me up on Discord (I am "Jonathan Wilson" on most of the C&C/SAGE/modding discords)
If you want to know more about how this works internally, read the source code (or ask me questions on Discord
More tools are comming in the future.



