Description / Download
This is a PowerShell script for Windows with a GUI made from .NET Forms that makes use of the command line options of several external programs. Leveraging these programs, the script can perform a variety of functions for custom textures. It can be used to convert textures to different formats (PNG, DDS, JPG, TIF, TGA), and supports a wide range of DDS formats: BC1-BC7, RGBA8, ARGB8, L8, A8, and LA8. The script automatically handles mipmaps which can be manipulated or disabled, it can auto-repair many issues found in DDS headers, and can seamlessly rescale textures and apply advanced upscaling filters.
This texture tool was designed for Dolphin emulator texture packs, so many of the core features revolve around Dolphin. Over time it has become powerful enough to manage many types of texture packs, and also convert/create "phyre" textures from The Legend of Heroes: Trails of Cold Steel series and Final Fantasy X/X2 HD remaster. The tool has a built-in help menu that covers everything it can do in detail.
NOTICE: If Microsoft, Google, Discord, or any other corporation flags my script as a "virus", I can assure you it is NOT a virus and does not do anything nefarious. All of the code is completely visible by editing the script with any standard text editor. Anyone who has the appropriate knowledge can verify that there is nothing going on that does anything that will harm your PC, steal information, etc. My only goal is to create something that people will find useful for their projects. It's really annoying these companies are trying to control the flow of software for "the greater good", when in reality it just gives them a stranglehold on who gets to create and share software.
Download - Mirror - Changelog - Archive
Preview:
Installation and Setup
ImageMagick is the only hard requirement to use this script, although certain features will not be available without the required program. The script has built-in documentation, which can be accessed by pressing the Help button. If you are new to using this script, I do suggest going with the Easy Installation Method as it is the easiest to get everything up and running.
Easy Installation Method:
Basic Installation Method:
Supported DDS Programs
• ImageMagick - Default. Can create DXT1, DXT5, and ARGB8. Creates very low quality DXT1/DXT5 DDS textures. Uses magick.exe.
• DirectX TexConv - Can create DXT1, DXT5, BC7, and ARGB8. Lower quality DXT1/DXT5 textures, high quality BC7 textures. Uses texconv.exe.
• Compressonator - Can create DXT1, DXT5, BC7, and ARGB8. Highest quality BC7 textures. Fails creating some textures. Uses CompressonatorCLI.exe.
• Cuttlefish - Can create DXT1, DXT5, BC7, and ARGB8. High quality BC7 textures at a reasonable speed. Uses cuttlefish.exe.
TexConv is required to create BC7 textures, use the script's Image Viewer, and convert BC7 textures to other formats. Compressonator is capable of these tasks, but randomly fails with some images.
If confused on which program to install and use, I suggest all of them. If a program fails to create a texture, it will fall back to another one and continue to do so until the image is created.
Compressonator or Cuttlefish should be selected within the tool when creating most DDS images, but TexConv is still required for when Compressonator fails to create an image.
Other Supported Programs
The following programs are used to apply an upscaling filter to textures.
• xBRZ ScalerTest - Allows upscaling textures with the xBRZ filter.
• Waifu2x-Caffe - Allows upscaling textures with waifu2x filter (nvidia cards required for full speed).
• Waifu2x-CPP - Not as powerful as waifu2x-caffe, but supports OpenCL (faster than using CPU for AMD users).
• ESRGAN - Enhanced Super-Resolution Generative Adversarial Networks.
• SFTGAN - Recovering Realistic Texture in Image Super-resolution by Deep Spatial Feature Transform.
• Python v3.9.x - Multi-platform scripting language. Required to use ESRGAN and SFTGAN upscaling filters. Only v3.9.x is supported at the moment.
The following program has multiple uses such as extracting textures from a game disc, optimizing PNG images, and combining split-RGBA images.
• Dolphin Texture Extraction Tool - Too hard to summarize everything it can do here, but know it's required for at least three operations.
The following programs can be used to optimize PNG textures.
• OptiPNG - Attempts to reduce the file size of PNG images.
• OxiPNG - An alternative to OptiPNG that supports multi-threading for better performance.
• Pingo - From my personal testing, this one seems to yield the best compression for PNG images.
• ECT - Supports a number of image formats, but only used for PNG in CTT-PS.
The following programs are used to create materials for Ishiiruka Dolphin.
• Ishiiruka Tool - Required to work with material map textures, and create them from materials.
• Material Map Generator - Generates materials from color textures that can be combined with Ishiiruka Tool.
The following programs can be used to unpack PKG files for The Legend of Heroes: Trails of Cold Steel I and II.
• Kiseki PKG Sharp - This is the best PKG tool which supports recompressing PKG files.
• PKGTool - An alternate PKG tool, this one is only mentioned if having issues with the one above.
None of these programs are required to use the script, but they are needed to unlock the features they support.
Features
• Convert textures between formats. Supports PNG, DDS, JPG, TIF/TIFF, and TGA image formats.
• Generate Dolphin Resource Packs. Can create new packs, modify existing packs, and generate a JSON file.
• Leverage all the functionality of the Dolphin Texture Extraction Tool. Extract textures, merge/split RGBA, and finalize.
• Rescale all textures at a fixed integer scale. Use original or current dimensions. Filter only upscale/downscale.
• DDS can be created as BC1 (DXT1), BC2 (DXT3), BC3 (DXT5), BC4, BC5, BC6, BC7, R8G8B8A8 (RGBA8), B8G8R8A8 (ARGB8), LA8, L8, A8.
• Scan textures for a variety of issues (scaling factor, aspect ratio, unven scale, missing mipmaps, not HD, duplicate, and bad DDS dimensions).
• Copy textures identified with issues to a folder for manual fixing, or auto-repair most textures using scale and aspect thresholds.
• Missing mipmaps are automatically generated. Custom mipmaps can be provided or the script can be forced to generate new ones.
• The type of DDS mipmaps generated (internal/external) can be configured. This can also apply to TIF/TIFF images to create layered images.
• Combine multiple textures into a single image, or split them into multiple images with special features for N64 Zelda textures.
• Create material maps from color, bump, spec, nrm, and lum textures. This requires linking the script to Ishiiruka Tool.
• Rescale/Convert already combined material maps (the generated nrm texture). Also requires Ishiiruka Tool.
• Optimize PNG image sizes with OptiPNG, OxiPNG, ECT, or Pingo. For textures, you should use "Finalize" from Texture Extraction Tool.
• Apply various upscaling filters to all textures including Point, xBRZ, Waifu2x, ERSGAN, and SFTGAN.
• Add a custom command line interface (CLI) program that the script doesn't support to make use of its looping logic.
• And much much more! Refer to the built-in "Help" button for more information.
CTT-PS Useful Links
Compression Flags: Creating DDS textures with multiple compression types in a single run.
PNG Alpha Manipulation: Weird Alpha in PNG Textures - and an option to manipulate it!
Texture Watermarks: Names overlaying textures to identify their location in-game.
Material Textures: Creating materials that can be turned into material maps.
Material Maps: Creating material map textures for Dolphin Ishiiruka.
Combine/Split Images: Combining multiple images into a single image, or splitting an image.
OptiPNG/OxiPNG: Why it should only be used with this script for Dolphin textures.
Process Selected: The super secret option that nobody knows about.
Phyre Textures: Working with textures from The Legend of Heroes: Trails of Cold Steel I and II.
BC7 DDS Format: The beginning and my initial failure.
• Part 1: I know almost nothing.
• Part 2: Custom mipmaps for BC7!
• Part 3: BC7 becomes a reality.
Metroid Font Textures: Retexture thousands of fonts in minutes!
Custom CLI Programs: Import any program that accepts command line input into CTT-PS.
Split/Combine Color Channels: Split images into several images based on the RGBA channels, then put them back together.