This is a simple mod to reduce texture memory use by compressing/resizing them to DXT1 & DXT5. This performs the compression to as many textures as possible on game load. This will include ALL textures, including mods.
Credit to Sarbian for demonstrating how to go about compressing/modifying textures as they are being loaded.
MORE credit to Sarbian for demonstrating DXT compressed loading.
Even MORE credit to Sarbian for implementing the multithreaded portion of DXT compression!
Credit to ecat for demonstrating/suggesting a caching mechanism for faster loading.
MORE credit to ecat for suggesting multithreaded compression.
Credit to Faark for the idea of pre-loading textures.
Credit to Green Skull for the wonderful donation of additional configs.
Credit to Kerbas_ad_astra for the donation of additional configs.
This mod allows you to save LOTS (hundreds of MB to a couple GB!) of memory on textures!
The first load will take a VERY long time (can be upwards of an hour) and it might take multiple runs if you are close to the memory limit. So sit back and let it load, if it crashes, just bring it up again. Eventually it will load fully. Exit, then load again. It will then load VERY fast, and fully utilize DXT compression/loading.
If you have any issues, we will need your output_log.txt file from KSP_Data folder. Please don't post an issue without it.
What Basic does:
- Compresses all textures to DXT format
- Generates mipmaps for all textures.
- Only resizes normal maps to 1/2 size, with a max of 512x512.
What Aggressive does:
- Compresses all textures to DXT format
- Generates mipmaps for all non-normal map textures.
- Rresizes all textures to 1/2 size, with a max of 256x256 for normal maps.
If you use the Aggressive version, you should have no need for texture reduction packs on any mods! If you do use texture reduction packs, you may have to edit configs to specify normal maps.
BoulderCo/textureCompressorConfigs/textureCompressor.tcfg to alter the paremeters. Documented within.
More configs (thanks to Kerbas_ad_astra)
Folders use regex matching for advanced folder handling
Everything under ActiveTextureManagement
Multithreading, Uncompressed, & Fixes for huge textures
Fixed weird bug with EVE and other mods. DOES NOT need to re-cache textures.
DXT caching instead of PNG.
Duplication fix, min size, & extension based loader disable.
fixed undefined folders issue
Sarbian figured out how to override KSP's texture loading altogether.
KSP broke the previous loading mechanism, so now loading is forced to be considerably slower.
License, B9, Squad Fix
Fixed configs for EVE.
Added more configs from Green Skull.
Pre-loads textures at startup to save time/memory.
Will speed up loading times considerably.
2-15-1: Added KSO config.
REALLY fixed normalmaps. For real this time guys.
Now using a dynamic cache mechanism (as suggested by ecat on KSP forums).
.1: Added PlanetFactory config.
Fixed mipmap setting for normalmaps.
Added enable option in configs.
Moved to regex config parsing.
Due to regex parsing, merged folder and specific texture parsing.
Updated config files to match.
Renamed config files to not interfere with .cfg loading.
Edited exceptions for warpplugin(interstellar) and JSI.
Added GC code to clean while loading.
Added tons of new configs.
Updated the config loading to be less sensitive to incomplete configs.
Added more advanced folder control
Fixed issue with textures that aren't managed (but still compressed) by plugin.
Added KSPX config
Added AIES_Aerospace config
Added documentation to BoulderCo/textureCompressorConfigs/textureCompressor.cfg
2-9: AVOID USING, WAIT FOR UPDATE (requires a game load and restart if coming from 2.0-2.4)
UPDATE: A glitch has been discovered that can cause parts that do not have configs to not be loaded.
Fixed TGA reading.
Added PorkWorks config (habitat pack)
2-8: (requires a game load and restart if coming from 2.0-2.4)
Moved to new config mechanism
Fixed minor *_NRM.tga file issue.
2-7: (requires a game load and restart if coming from 2.0-2.4)
Changes to handle normal maps properly.
2-6: (requires a game load and restart if coming from 2.0-2.4)
Added tiny texture protection from compression/resize.
2-5: (requires a game load and restart if coming from 2.0-2.4)
Moved to a method that does NOT require disk changes to be made. Will automatically revert textures back.
Created two different profiles for re-sizing/compression (basic/aggressive)
With the aggressive settings, when running with KW and B9 I'm running at just over 1.5Gb without texture reduction packs.
Remove alpha dropping. Messes up normal maps.
Added explicit folder selection, to add a mod, the path has to be added to the folder list in the config. B9 and KW are added as defaults.
To convert textures back to mbm, simply remove the folder from the list.
Hotfix to remove normalmap converion.
Hotfix to actually apply texture resizing.
Allows users to manage all aspects of texture loading.
Increases start-up considerably in some cases, but allows LOTS of memory to be saved in the process.
Config allows many texture parameters to be controlled.
Log shows the end-state of textures and how much memory is saved.
Derived from github user sarbian's commit, textures are now compressed as they are loaded, so you can theoretically cram even more into your game!
Now shows in the log approximately how much memory is saved.
This is done in my spare time, and any contribution helps!