Jump to content

[WIN] KSP to DDS texture converter


Lilleman

Recommended Posts

Each time this "out of bounds" exceptions comes up, see in the output window which was the last texture it attempted to convert.

Then just add this to the exception list, and re-run.

Takes some time and patience, as you can see from my exception listing above...

Link to comment
Share on other sites

So, trying this with 1.0.2, and a bunch of installed mods, it is messing with a bunch of toolbar icons.

I went thru and added a bunch of exceptions, and removed some flags on others..

Now when I try to run it, out of 1031 files, 0 (zero, zilch, none...) textures get converted.... If I revert my exceptions, it works normally...

Is there a trick to adding exceptions to the list?

Heres the exact text I added/changed:

//AmpYear

REPOSoftTech\AmpYear\Icons

//

//Editor Extension

EditorExtensions\Textures

//

//Enhanced Navball

EnhancedNavBall\Resources

//

//Fusebox

Fusebox\TB_icons

//

//GC Monitor

GCMonitor

//

//Infernal Robotics

//MagicSmokeIndustries\Textures\icon_drag.png

//MagicSmokeIndustries\Textures\icon_dragInsert.png

//MagicSmokeIndustries\Textures\icon_dragHandle.png

//MagicSmokeIndustries\Textures -nn -nm -nr

MagicSmokeIndustries\Textures

//

//Kerbal Engineer

//KerbalEngineer\Textures\ToolbarIcon.png -nn -nm

KerbalEngineer\Textures\ToolbarIcon.png

//

//LightsOut

LightsOut\Textures

//

//Mission Controller 2

MissionControllerEC\MCERevert.png

MissionControllerEC\MCEStockToolbar.png

//

//NavHud

NavHud\ToolbarIcon.png

//

//Realchutes

//RealChute\Plugins\PluginData\RC_Icon.png

RealChute\Plugins\PluginData

//

//Toolbar, no mipmaps and no resize

//000_Toolbar -nm -nr

000_Toolbar

//

//VOID

VOID\Textures

//

Edited by Stone Blue
Link to comment
Share on other sites

THANK you!!!...Yup, somehow had two blank lines at the end... Maybe when I started editing the file in Wordpad, then copied and pasted it into LibreWriter to finish, because I cant stand the weird linespacing in Wordpad... ??

But Thank you for figuring this out for me... :D

Link to comment
Share on other sites

Wait, wait, wait, I just opened the img2dds Python program, and there's an exclusion for 'BoulderCo/'? But that's the only folder I want to convert, so my computer doesn't crash on me if I install EVE!

Link to comment
Share on other sites

Wait, wait, wait, I just opened the img2dds Python program, and there's an exclusion for 'BoulderCo/'? But that's the only folder I want to convert, so my computer doesn't crash on me if I install EVE!

Unfortunately things like cloud textures need to be accessed directly by the plugin and so can't be converted.

Link to comment
Share on other sites

Unfortunately things like cloud textures need to be accessed directly by the plugin and so can't be converted.
Well, bugger. I was hoping this would be a solution to the AMD Linux PNG lockup issue.
Link to comment
Share on other sites

This like to eat toolbar icons. Is there a way to prevent that from happening?

Open `ModExceptions.txt`. Add the path to the toolbar icons folder like this

ModeName\Path\To\Icons

You can use the exceptions for TextureReplacer and UmbraSpaceIndustries as an example

Link to comment
Share on other sites

This is my list of detected mods that need exlusions. You will probably have to add couple more. Good new is that almost each moder converts and ship their textures to dds.

With few more updates this converter will be obsolete for players.But still will be mandatory for moders. Hope this helps.


//USI's Exploration Pack. Not sure why this one throw an error, both files in this folder seems to be converted properly...
UmbraSpaceIndustries\ExpPack\AES\Spaces
//Vanilla contract icons
Squad\Contracts\Icons
//B9 ProceduralWings - icons
B9_Aerospace\Plugins
//FAR GUI icons
FerramAerospaceResearch\Textures
// Graphic CPU Memory monitor - icons
GCMonitor
// Stage Recovery - icons
StageRecovery
// Pilot Assistant - icons
Pilot Assistant\Icon
// RCS build aid - icons
RCSBuildAid\Textures
// Kerbal Engineer - icons
KerbalEngineer\Textures
// MechJeb2
MechJeb2\Icons
// USI/MKS/OKS
UmbraSpaceIndustries\Kolonization
// Blizzy toolbar
000_Toolbar
// IR Robotics parts icons
MagicSmokeIndustries\Textures
// Contrast window
ContractsWindow\Textures
// DaMichael flight data icons
KerbalFlightData

Link to comment
Share on other sites

  • 2 weeks later...

After being left running for half a day, with dozens of passes over GameData (I debugged some texture problems, editing ModsExceptions.txt and rerunning) DDS4KSPcs.exe died, complaining about "out of memory" (according to taskmgr, it had ~1.6gb not counting VSS). I suspect it is leaky as a sieve :-) Gets the job done, though.

I'd like it to auto-add previous GameData upon start, and to have better (greppable) log and better progress meter (digits at start, size processed/size left in addition to count, resizable log window etc). I also would appreciate if it remembered last conversion parameters...

Link to comment
Share on other sites

Has anyone found a work-around for textures in the A8L8 compression format? I've been trying to convert some of the Astronomer's Visual Pack V2 textures over to dds but a lot of those are in A8L8 and the tool doesn't seem to support that.

Edit: Nevermind, just found the GitHub, seems A8L8 is already a decent compression format, no need to convert to dds from what he's put there.

Edited by Nhawks17
Link to comment
Share on other sites

Is there an easier way to make the program ignore icons? I have over 60 different mods :S. Is there f.ex. a way for us to program so that all files with "icon" in its name gets ignored?

- - - Updated - - -

Well, AFAIK adding
icon
icons
Icon
Icons

will match every path that has those words in it...

How does this work? how can we program this?

Also for those that have trouble with memory, try both -force-opengl and -force-d3d11 though not at the same time :P. For me opengl saves a LOT more memory than d3d11. I run at less than 2gb of ram with opengl and around 2,6gb ram with d3d11.

Edited by EspenB89
Link to comment
Share on other sites

Is there an easier way to make the program ignore icons? I have over 60 different mods :S. Is there f.ex. a way for us to program so that all files with "icon" in its name gets ignored?

- - - Updated - - -

How does this work? how can we program this?

Unfortunately, you need to specify whole path that needs to be ignored from DDS converter. Look just few pages back for example. I posted some additions for mods that i use.

Also try tips in this post. It helped my heavy moded game a lot when comes to memory usage.

Link to comment
Share on other sites

Hmm, I think i found a way for my install. In the DDS4KSP.exe I set the minimal res for conversion to 40 x 40. I discovered that most(didnt check every1 :-P) of the icon files have a resolution of 20x20 to 32x32 :-) I made the compress on a copy of the gamedatafolder, loaded it in ksp and all the icons works perfectly :-D

Hmm, skratch that...

That created a bug in the Gamedata folder that corrupted at least my savegame but mainly also contracts for some reason. The game was suddenly unable to create ANY contracts... didnt register those i had allready accepted earlier before the dds converting, and couldntget any new. Making a new career mode did not work either... couldnt get ksp to create any contracts. Also tried alt-F12 and reset, regenerate and so on...

Switching to my original unconverted gamedata folder fixed the problems :S

Edited by EspenB89
Link to comment
Share on other sites

Hmm, I think i found a way for my install. In the DDS4KSP.exe I set the minimal res for conversion to 40 x 40. I discovered that most(didnt check every1 :-P) of the icon files have a resolution of 20x20 to 32x32 :-) I made the compress on a copy of the gamedatafolder, loaded it in ksp and all the icons works perfectly :-D

Hmm, skratch that...

That created a bug in the Gamedata folder that corrupted at least my savegame but mainly also contracts for some reason. The game was suddenly unable to create ANY contracts... didnt register those i had allready accepted earlier before the dds converting, and couldntget any new. Making a new career mode did not work either... couldnt get ksp to create any contracts. Also tried alt-F12 and reset, regenerate and so on...

Switching to my original unconverted gamedata folder fixed the problems :S

The problem with contracts not showing up is if the AGency icons(which are larger than the normal icons) are converted to .dds. Just replace the Agencies with the normal files and it should work. This goes for mods mostly. 000_USITools(from USI Kolonization) has an agency in it that's not .dds, if you convert that all the textures disappear.

Link to comment
Share on other sites

After running this converter on 18 PNGs, the total file size increased from ~5MB to 75MB. Is this normal or do some setting need to be modified?

It seems that the normal maps have the higher increase in file size after the conversions as well.

Link to comment
Share on other sites

Been trying to use this utility to convert some very old textures I'm using.

Problem is the original textures are .jpgs

It doesn't seem to matter how I convert them to .pngs the utility will not process the resulting png correctly. . . . . I get a dds file that is mostly transparency with a white rectangle taking up the left hand side of the image for every one.

When I use it one some textures that where .png to start with it works fine.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...