This feature has been introduced with version 0.20, with the purpose of automatically process and convert textures files provided as PNG (Portable Network Graphics) into DDS (DirectDraw Surface) texture files.
Workflow
The Texture Cooker will only convert 8-bit PNG files that are following the following naming convention:
*.color.png
*.normal.png
*.data.png
Example of textures that would be converted to BC7 sRGB
The automatic conversion happens as soon the game has to load a texture file that matches the requirements mentioned above.
During the conversion process, a temporary texture will be applied to the object(s) using that texture. The texture will appear once the conversion has completed.
Locating the converted textures
The converted texture files will always be located inside Userfolder/<gameVersion>/temp
, at the same relative location of your original texture file. (Learn more about the userfolder here
)
If the original file is at
levels/GridMap/test
the converted file will be found in
Userfolder/<gameVersion>/temp/levels/GridMap/test
Usage in mods
When publishing a mod, only include the converted DDS texture files with it. Do not include the original PNG texture files!
Place the converted texture files in the same location of the originals, no other changes are required. Even though your materials file will be pointing to the original PNG file, the game will automatically detect the converted DDS files (if exists) and load it instead.
Materials.json
When manually specifying textures in a main.materials.json
file (e.g. creating a skin for a vehicle), point to the PNG texture file in the texture path. The game will automatically use the converted DDS texture file if it exists, otherwise it will first proceed to convert the PNG.