GIANTS Texture Tool
===================

The GIANTS Texture Tool is used to convert uncompressed source image files (e.g. png images) to optimized formats used by the GIANTS Engine.
Using the Texture Tool for GIANTS Engine is not a requirement, however it is highly recommended to be used in order to benefit from the most optimized and consistent content.
GIANTS Engine 9.0.0 does support any BC6H and BC7 dds file, however, only files generated by the GIANTS Texture Tool will be loaded without a performance and quality warning due to some technical limitations of the BC6H/BC7 format.
Also BC7 textures not created by the GIANTS Texture Tool will not trigger alpha blending or parallax mapping (i.e. they are considered to be only 3 channel textures).
BC7 is the recommended format for most 4 channel textures (BC3/DXT5 mostly don't make sense anymore). Also BC7 can be use for 3 channel textures in case the extra quality compared to BC1 is needed.
BC1/DXT1 is however still the recommended format for most 3 channel formats since it is only half the size of BC7.

There are many settings that define how a specific png image is converted to the optimized format. The tool will try to automatically find the best settings based on the png image format and the naming.
E.g. images ending with _diffuse.png are considered to contain sRGB color data that need mipmaps and should be stored as compressed BC1/DXT1 or BC7 data dependent on whether the source image has an alpha channel or not.
If the default settings don't match the desired behavior, the settings can be overwritten by creatinga .gim with the same name as the .png
E.g. texture0_diffuse.png will use the settings from texture0_diffuse.gim
It is also possible to just have a .gim without a corresponding .png file, e.g. for texture arrays, where the source image filenames are specified in the .gim file.

If a .png for some reason must *not* be converted, a .gim file containing the node <ignore>true</ignore> can be used.

See template.gim for a detailed explanation of all options.

Running the GIANTS Texture Tool:
-------------------------------
Single images can be converted by dragging a .gim or a .png onto the textureTool.exe or by running textureTool.exe <filename>
"textureTool.exe -help" will print a list of possible command line options

Also there are several helper script that cover most use cases:
-textureToolRecursive.cmd: Convert all png/gim files in a folder recursively. Simple drag&drop the folder onto the textureToolRecursive.cmd (e.g. the whole mod folder) to convert everything
-textureToolLowQuality.cmd: Convert a single png/gim file in low quality mode. Can be used when iterating on a large texture
-textureToolInfo.cmd: Prints a list of dds files in a folder recursively that were not created by textureTool and thus can be an issue at runtime.


Changelog
=========

9.0.1 (08.11.2023)
------------------
- Fixed crash when generting signed distance fields
- Fixed usage with non-ascii file paths
- Fixed crash when using downScaleFactor not equal to 1
- Improved compression quality for alpha masked textures (e.g. masked gui textures). Zero alpha is more likely to stay zero.

9.0.0 (30.12.2021)
------------------
- Initial release with support for GIANTS Engine 9.0.0 and Farming Simulator 22