It brutally appeared to me that DDS textures generation for MSFS are quite painful.
If you're working on a complete asset that you're going to build with the SDK anyway, it's not a problem. But if you're simply working on a livery, maybe you don't want to create a whole package and build it all the time.
This toolbox uses "Compressonator CLI" (freeware available here https://github.com/GPUOpen-Tools/compressonator/releases) to handle PNG <> DDS conversions.
And "imagemagick" (freeware available here https://imagemagick.org/script/download.php#windows) to detect PNG channels depth (8-bit or 16-bit) and handle the Composite "Join" and "Split" operations. Go for this version : ImageMagick-7.1.0-portable-Q16-x64.zip which contains all the required executables.
You can convert a single PNG file or all the PNG files of a folder to apporopriate DDS textures + JSON descriptors:
- It auto-detects if the PNG source has an alpha layer and depending on the type of texture (Albedo, Composite, Normals), it selects the appropriate DDS compression (BC1, BC3, BC7, BC5_S) and writes the correct JSON tags.
- For now, 16-bits textures are ignored.
Exactly the opposite. Converts DDS files (a complete folder or a single file) to PNG.
You can generate a correct DDS.json file for a given DDS file or all the DDS files of a folder.
Generates a Composite RGB file with Ambient Occlusion/Roughness/Metallic channels from any PNG given as input or any suitable files in a given folder.
- You can specify any of the 3 channels as the argument. The script will find the others if your files are named as expected and located within the same folder. (xxx_AO.PNG, xxx_ROUGH.PNG, xxx_METAL.PNG).
Separates the RGB channels of a composite PNG file to 3 standalones PNGs. Or does the same for all COMP files within a given folder.
- These files will be suffixed with _AO.PNG, _ROUGH.PNG and _METAL.PNG
- The script checks first if these files don't already exist and will throw an error if any of them is present.
- it works on Windows 10/11
- You need to be able to run unsigned PowerShell scripts
- You will need to have Compressonator CLI (freeware) and set the path to "compressonatorcli.exe" in the $compressonatorPath variable of PNG2DDS.ps1 and DDS2PNG.ps1.
- And finally, you need to have ImageMagick (freeware) and set the path to the folder containting all executables in the $magickPath variable of PNG2DDS.ps1, DDS2PNG.ps1, Join-COMP.ps1 and Split-COMP.ps1.