Hi everyone,
I am currently thinking if it makes sense to create some kind of specification for texture packs. Texture packs become more and more relevant for the emulator scene. PS1, PS2, PSP, N64, GameCube, Wii, DS, 3DS, Saturn, Dreamcast, Xbox etc. are all consoles which are using texture packs to improve the quality of games.
However the emulator scene is very fragmented concerning texture packs.
- Nintendo64 with the plugin GlideN64 uses the formats HTS and PNG.
- PS1 with duckstation uses DDS and PNG.
- PS2 with PCSX2 uses DDS and PNG.
- GameCube/Wii with Dolphin uses DDS and PNG.
- PSP with PPSSPP uses BASIS and PNG
- Dreamcast with Flycast uses DDS and PNG
- Nintendo3DS with Citra/Azahar uses PNG
- etc.
What is equal on all emulators is PNG, because of the texture dumping. Each emulator dumps the texture in PNG. So editing the textures in this format is easy and user friendly. However distributing high-resolution textures becomes a challenge.
- Texture packs have a big size.
- On mobiles it cannot be used due to the large size.
- Sometimes the transcoding creates stutters
- DDS formats are outdated
- Converting DDS back to PNG is difficult and lossy.
- Tools are always different.
Actually the same happened with GPU compression formats and this is why Khronos developed the KTX2 format. So my idea was to create a specification to cover the dumping, converting, distribution and editing of the High Res Texture Files based on the KTX2 format.
KTX2 files are a texture container like DDS. A KTX2 file contains several versions of the texture (uncompressed, compressed, normal map, occlusion map) and is future proof. In addition the loading times of those textures are much faster, because it is already transcoded on the fly on most GPUs (mobile, pc, embedded system). Moreover if emulation gets more advanced the KTX2 file can also contain normal maps, occlusion maps etc. So the management of High-Res Texture Files becomes easier.
The Idea is, to keep the dumping in a png format, but to distribute the High Res Texture Packs as KTX2 files, compressed in a Zstandard File. The creator of the pack can disctribute the KTX2 files in various versions:
- Full-Size (contains KTX2 files in PNG in _BLOCK uncompressed format)
- Fast-Loading (contains KTX2 files in ETC1S format)
- High-Quality (contains KTX2 files in UASTC format)
https://docs.vulkan.org/samples/latest/samples/performance/texture_compression_basisu/README.html
The KTX2 files are then clustered in a zstandard file due to real time access. So the user has to handle only one zstandard file which contains various high-res textures in KTX2 format.
The benefit would be for texture creators and developers. Libraries can be created, tools to edit KTX2 files (export, edit and import textures) can be created, the tools stay the same for all consoles/emulators.
Compare it with the CHD format for compressing isos or disc images. A standard which everyone can use and which should simplify everything.