Jump to content

[1.0][Release-5-0][April 28, 2015] Active Texture Management - Save RAM!


rbray89

Recommended Posts

So I found a partial-solution for the fuzzy toolbar issue.

Making a config file containing something like this…

ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = FerramAerospaceResearch
enabled = true
OVERRIDES
{
FerramAerospaceResearch/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

…succeeds in making the FAR button in the stock-toolbar appear nice and crisp, even if KSP's texture quality is set to quarter-res. Same goes for the KER button. It works, just don't use it on any mods that have lots of textured parts without tweaking that pathname option.

What it does not fix is fuzzy icons on Blizzy's toolbar. I tried using the same trick on mods using Blizzy's toolbar, but it didn't appear to help at all. I'd appreciate some suggestions on getting that to work.

Before: WPH1ppn.png

After: fwsUVni.png

Link to comment
Share on other sites

I made a clean copy and added all the mods in (one at a time, testing as I went)… and no problems. Then I added my save back in… and it looks fine. I thought it might be a persistent save issue, so I copied THAT back in, and no problem (and it showed with scenarios, too, so I'm at a loss).

Perhaps a crash might have corrupted something else.

Edited by tater
Link to comment
Share on other sites

Sorry these are in very different lighting conditions, but I took the first a while ago game time on the MUn.

Below is modded 9DRE/FAR/KIDS/etc.

http://i121.photobucket.com/albums/o222/tatersw/KSP/Mun1.jpg

Same lander, same mods, but with ATM basic (same issue with aggressive, or perhaps aggressive was spread even more).

http://i121.photobucket.com/albums/o222/tatersw/KSP/Mun2.jpg

Stock 0.25 looks just fine.

That's an issue with KSP itself. Squad changed the way orbital bodies are made, so the Mun and maybe Duna's textures look stretched. There's a thread about it on the support forums.

It's not related to mods and bugs in those.

Link to comment
Share on other sites

I'm running KSP .25 on a fresh install on Mac OS X 10.10. Hardware config is a mid-2012 Retina Macbook Pro. I am installing ATM first before installing other mods, but am crashing on loading every time.

I verified that KSP vanilla works fine, and removing the ATM .dll restores full functionality, so I'm pretty sure I'm doing something wrong.

Crash notes from KSP at:http://pastebin.com/pshX17Kj

Crash notes from the console at:http://pastebin.com/FChHUjQx

Install Notes: I'm not too familiar with installing plugins (I have only used add-ons with game data folders previously), so there is a fair chance I'm just doing it wrong. I am dragging the .dll from the ATM Plugins folder into my KSP Plugins folder. I have not copied over any of the BoulderCo configs, because I'm not sure where to put them.

Any help is appreciated, and thanks!

Link to comment
Share on other sites

So I found a partial-solution for the fuzzy toolbar issue.

Making a config file containing something like this…

…succeeds in making the FAR button in the stock-toolbar appear nice and crisp, even if KSP's texture quality is set to quarter-res. Same goes for the KER button. It works, just don't use it on any mods that have lots of textured parts without tweaking that pathname option.

What it does not fix is fuzzy icons on Blizzy's toolbar. I tried using the same trick on mods using Blizzy's toolbar, but it didn't appear to help at all. I'd appreciate some suggestions on getting that to work.

Thank you Entropius. This has been bothering me to no end, and I'm not comfortable enough with ATM's settings to have figured this out myself. Just to clarify, if I need to apply this trick on a mod with parts (I think RealChute would apply- its toolbar image has been blurry for me), then I should change this part:

FerramAerospaceResearch/.*

so that it specifies the particular directory that the button images are in. Something like this:

FerramAerospaceResearch/toolbarImages/.*

?

As for Blizzy's toolbar, what if you set "compress = false"? I figure that would tell ATM to leave those images alone completely? Given their size I assume they would have insignificant impact on RAM.

Link to comment
Share on other sites

That's an issue with KSP itself. Squad changed the way orbital bodies are made, so the Mun and maybe Duna's textures look stretched. There's a thread about it on the support forums.

It's not related to mods and bugs in those.

Yeah, I had read that, but it's not consistent. In my new install, then same mods added in one at a time, then my save game… the stretch is not there any more. Really weird. It must have been coincidence that the effect only showed up after I installed ATM.

Link to comment
Share on other sites

Install Notes: I'm not too familiar with installing plugins (I have only used add-ons with game data folders previously), so there is a fair chance I'm just doing it wrong. I am dragging the .dll from the ATM Plugins folder into my KSP Plugins folder. I have not copied over any of the BoulderCo configs, because I'm not sure where to put them.

Put both ActiveTextureManagement and BoulderCo folders in the Gamedata folder. Do not put anything in the Plugins/Parts etc folder.

Link to comment
Share on other sites

I've run into a problem using Active Texture Management. Several parts of the USI Exploration Pack Mod http://forum.kerbalspaceprogram.com/threads/86695-0-25-USI-Exploration-Pack-Small-parts-big-adventure%21-v-0-2-4-2014-10-13 have no texture, but are pure white. Anybody know how to make ATM not affect this mod? I know there is a way to make exceptions in ATM, but unfortunately I'm not experienced in altering code.

Link to comment
Share on other sites

@jofwu

Yeah, substitute things for other mods as appropriate. If you can make it specifically target a folder of only toolbar-icons, that's better, although some addons end up putting all textures in the same place so sometimes it's not an option. I've gotten it to work with FAR, KER, KerbalScienceFoundation (Nav instrument mod for runway landing), and Chatterer.

Oddly, I also apparently got it to work for AGM (ActionGroupManager), despite that being a Blizzy Toolbar addon… which is quite curious because it didn't work with any of the other Blizzy Toolbar addons like ScanSat, RCSBuildAid, etc.

Regarding the "compress = false", I'm not absolutely sure, as I haven't had a chance to play any options besides the "scale = 1" option. This guess is worth testing out. I'm admittedly not totally knowledgable about how these ATM overrides work, I'm basically just reverse-engineering some examples I saw in the BoulderCo folder.

That being said, I'm not sure if the compress option here is alluding to a lossy or non-lossy compression. If it's the latter, I'd imagine it wouldn't help with icon-quality.

Link to comment
Share on other sites

I've run into a problem using Active Texture Management. Several parts of the USI Exploration Pack Mod http://forum.kerbalspaceprogram.com/threads/86695-0-25-USI-Exploration-Pack-Small-parts-big-adventure%21-v-0-2-4-2014-10-13 have no texture, but are pure white. Anybody know how to make ATM not affect this mod? I know there is a way to make exceptions in ATM, but unfortunately I'm not experienced in altering code.

USI Exploration works fine with my ATM install. Have you tried reinstalling all your USI mods yet?

Link to comment
Share on other sites

I've run into a problem using Active Texture Management. Several parts of the USI Exploration Pack Mod http://forum.kerbalspaceprogram.com/threads/86695-0-25-USI-Exploration-Pack-Small-parts-big-adventure%21-v-0-2-4-2014-10-13 have no texture, but are pure white. Anybody know how to make ATM not affect this mod? I know there is a way to make exceptions in ATM, but unfortunately I'm not experienced in altering code.

That's not an ATM-specific issue, it is the .25 TGA texture loading bug. I've had the same bug while NOT using ATM. The fix is to convert all the TGA textures to PNG or MBM, but I believe RoverDude is working to get that fixed soon in an official release anyway, so probably best to just wait for that (a few more days at most, probably).

edit: looks like Roverdude already answered the question in the Exp Pack thread. Sorry for the thread bloat :(

Edited by NWDogg
edit
Link to comment
Share on other sites

So, i just updated this plugin from older version, and noticed a new parameter: min_size. Neat! Now, how does it work? Is it applied before SCALE parameter, to determine if scaling is needed?

Textures won't be scaled down beyond this value. Designed primarily to protect small icons and such :)

Link to comment
Share on other sites

Hi all, first post here been a lurker for some time though. Just wanted to share something I noticed the other day in attempting to use current ATM with .24

I am still trying to get .25 to work with the mods I deem necessary and I just keep going over the RAM usable crash error. I'm playing on x86 pc's. So until I can play .25 with the mods I have to have I am still using .24 as it works great with all the mods I need. By accident restoring a backup of .24 I installed the current ATM built for .25 into my old .24 build and noticed my RAM drop considerably!!! I went from a 1.8M running to about 1.1M with all the same mods. The difference is running .24 with old ATM made for .24 and ATM current.

There were a couple strange things that happened to the game though.

1) toolbar icons were blank

2) got an error about some KAS icon image not found..even though it was really there??? weird...

Other than those two errors that's all I noticed about the game. Ran super fast and low memory footprint...I'm trying to find a way to get the icons back and run it this way..maybe I can add more mods to the old .24 game now too :P

Link to comment
Share on other sites

So I found a partial-solution for the fuzzy toolbar issue.

Making a config file containing something like this…

ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = FerramAerospaceResearch
enabled = true
OVERRIDES
{
FerramAerospaceResearch/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

…succeeds in making the FAR button in the stock-toolbar appear nice and crisp, even if KSP's texture quality is set to quarter-res. Same goes for the KER button. It works, just don't use it on any mods that have lots of textured parts without tweaking that pathname option.

What it does not fix is fuzzy icons on Blizzy's toolbar. I tried using the same trick on mods using Blizzy's toolbar, but it didn't appear to help at all. I'd appreciate some suggestions on getting that to work.

Before: http://i.imgur.com/WPH1ppn.png

After: http://i.imgur.com/fwsUVni.png

came looking for just this type of solution.

i can help with the toolbar one, in the default boulderco/atm configs folder i just changed the 000_toolbar.cfg to:


ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = 000_Toolbar
enabled = false
}

and since most of my toolbar mods are not parts mods, i made similar MM configs for them.

i'd like to see your KER one though, i cannot get the stock toolbar icon for that one clear for the life of me (wish it had an option to still use blizzys toolbar :/ )

also, i noticed there are a couple outdated .cfgs in there. from mods with directory ∨ filename changes

Edited by BobsYerUncle
Link to comment
Share on other sites

came looking for just this type of solution.

i can help with the toolbar one, in the default boulderco/atm configs folder i just changed the 000_toolbar.cfg to:


ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = 000_Toolbar
enabled = false
}

and since most of my toolbar mods are not parts mods, i made similar MM configs for them.

i'd like to see your KER one though, i cannot get the stock toolbar icon for that one clear for the life of me (wish it had an option to still use blizzys toolbar :/ )

also, i noticed there are a couple outdated .cfgs in there. from mods with directory ∨ filename changes

As for my KER config, I assume you just had a typo somewhere, it's no different than the FAR one:


ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = KerbalEngineer
enabled = true
OVERRIDES
{
KerbalEngineer/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

Now regarding your solution, I got it working initially, then I broke it somehow, and even when it was working it had me a bit worried that it would be affecting icons outside of 000_Toolbar, which may (or may not) cause problems with mods that offer both toolbar icons AND parts. A popular example of a mod like that would be Infernal Robotics.

Anyway, trying to get your solution prompted me to dig more into the default BoulderCo ATM configs. It got me experimenting. I can confidently say I now have a solution to all Blizzy Toolbar Icons, without disabling ATM for Blizzy's Toolbar.

As it happens, it was largely a problem stemming from (1) the default ATM configs being outdated with respect to various mods' pathnames and (2) the default ATM configs having mipmaps = true.

The (comprehensive) solution is as follows:

  • Look in BoulderCo for a mod who's Blizzy Toolbar Icon is fuzzy. If a config already exists in BoulderCo, open it. If one doesn't exist, create it (using one from another mod as a template).
  • Make sure the pathname to the textures is absolutely correct. Scruitinize it very carefully (i.e., make sure there's no subtle differences like "Icons" vs "Icon" in there). An example of a default ATM config with a broken pathname is ScanSat (although I found others).
  • Set "mipmaps = false". (ATM's default configs tend to set that to true by default)
  • Set "scale = 1". (ATM's defaults should already have this correct, but just in case it's not double check it)

000_Toolbar.cfg


ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = 000_Toolbar
enabled = true
OVERRIDES
{
000_Toolbar/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

SCANsat.cfg


ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = SCANsat
enabled = true
OVERRIDES
{
SCANsat/Icons/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

MagicSmokeIndustries.cfg

ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = MagicSmokeIndustries
enabled = true
OVERRIDES
{
MagicSmokeIndustries/Textures/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

RCSBuildAid.cfg


ACTIVE_TEXTURE_MANAGER_CONFIG
{
folder = RCSBuildAid
enabled = true
OVERRIDES
{
RCSBuildAid/Textures/.*
{
compress = true
mipmaps = false
scale = 1
max_size = 0
}
}
}

Link to comment
Share on other sites

So, I'm running into a memory leak with this mod and Texture Replacer, is anyone else having this issue?

I seem to be having some issues too, and noticed that there is no config file for texture replacer in the BoulderCo folder. Which is sort of fair enough, because most people have a totally different texture replacer install to each other because they can change different textures. I ended up writing my own config file but that still didn't help enough, so I changed from basic atm to aggressive atm and the game won't run properly at all. When I (rarely) get into the game and enter the VAB, the whole interface is white. I haven't had a chance to fix it yet but wonder if texture replacer is related to the issue, that or it's the .25 tga bug... somehow.

Link to comment
Share on other sites

Hello ATM thread: I wanted to ask if anyone has seen that ATM is not working at all. The debug menu reports no memory saved, and testing KSP with and without ATM installed reveals that it is, indeed, not saving any memory. I did test, but I haven't tested "thoroughly." I wanted to wait and see if what I'm seeing has been previously reported. I also checked the last few pages of posts, but I didn't have time to delve back weeks...also, quick searches didn't reveal anything.

Moving along, here's what I'm seeing, specifically:

I was adding some new parts and decided to alter my ATM config. I was troubled when I saw no memory savings at all. I checked that I was using the latest ATM release, and reinstalled for good measure. No change. I wondered if it had something to do with my Windows execute command (-force-opengl -popupwindow), so I launched KSP.exe directly. No change.

Troubled, I made a test install with just ModuleManager, ATM, and Squad installed so I could reload KSP without a 5 minute wait. Debug still showed no memory savings, and testing with and without ATM proved that point.

I then wondered if my ATM configs were just not aggressive enough...so I went with scale = 8 and scale_normals = 8. No change.

As a last test before posting, I went ahead and downloaded the original .25 ATM release form 20 days ago. Git version "cecf05d" and voila. ATM worked again...with non stop NRE's and other errors spamming the log, but it was doing its thing. I visually confirmed in the SPH with some parts as well.

I haven't gone ahead and tested all versions of ATM going back until the problem goes away. I wanted to double check here first. If I'm told this hasn't been reported yet, then I'll do more tests and post logs.

Cheers,

starkline

Link to comment
Share on other sites

Hello ATM thread: I wanted to ask if anyone has seen that ATM is not working at all. The debug menu reports no memory saved, and testing KSP with and without ATM installed reveals that it is, indeed, not saving any memory. I did test, but I haven't tested "thoroughly." I wanted to wait and see if what I'm seeing has been previously reported. I also checked the last few pages of posts, but I didn't have time to delve back weeks...also, quick searches didn't reveal anything.

Moving along, here's what I'm seeing, specifically:

I was adding some new parts and decided to alter my ATM config. I was troubled when I saw no memory savings at all. I checked that I was using the latest ATM release, and reinstalled for good measure. No change. I wondered if it had something to do with my Windows execute command (-force-opengl -popupwindow), so I launched KSP.exe directly. No change.

Troubled, I made a test install with just ModuleManager, ATM, and Squad installed so I could reload KSP without a 5 minute wait. Debug still showed no memory savings, and testing with and without ATM proved that point.

I then wondered if my ATM configs were just not aggressive enough...so I went with scale = 8 and scale_normals = 8. No change.

As a last test before posting, I went ahead and downloaded the original .25 ATM release form 20 days ago. Git version "cecf05d" and voila. ATM worked again...with non stop NRE's and other errors spamming the log, but it was doing its thing. I visually confirmed in the SPH with some parts as well.

I haven't gone ahead and tested all versions of ATM going back until the problem goes away. I wanted to double check here first. If I'm told this hasn't been reported yet, then I'll do more tests and post logs.

Cheers,

starkline

Debug reporting is currently broken. The best solution is to use the resource monitor on your computer to see savings for now.

Link to comment
Share on other sites

Forgive me, I should have mentioned that I was doing just that. I had several diagnostic utilities open which montor ram usage and GPU usage (sysinternals). I was not able to notice any significant changes in the amount of ram used between restarts of KSP. Obviously, there were normal variances, with opengl I saw 1.9Gb RAM usage with scale = 2 and scale_normals = 2. Similarly, I saw 1.9Gb RAM usage with scale = 8 and scale_normals = 8.

I don't expect ATM to work miracles, or anything, but I could visually see that ATM wasn't doing anything to the textures, despite having had reported doing so in the logs. However, if debug reporting is not working, then I suppose that doesn't mean anything.

I guess I'll delve deeper into this and post what I find in a bit.

Cheers

Link to comment
Share on other sites

Forgive me, I should have mentioned that I was doing just that. I had several diagnostic utilities open which montor ram usage and GPU usage (sysinternals). I was not able to notice any significant changes in the amount of ram used between restarts of KSP. Obviously, there were normal variances, with opengl I saw 1.9Gb RAM usage with scale = 2 and scale_normals = 2. Similarly, I saw 1.9Gb RAM usage with scale = 8 and scale_normals = 8.

I don't expect ATM to work miracles, or anything, but I could visually see that ATM wasn't doing anything to the textures, despite having had reported doing so in the logs. However, if debug reporting is not working, then I suppose that doesn't mean anything.

I guess I'll delve deeper into this and post what I find in a bit.

Cheers

you have the BoulderCo folder installed with all the configs? Do you happen to have Texture Replacer installed?

Link to comment
Share on other sites

Yes, I have BoulderCO and its config files. No, I do not have Texture Replacer.

Right now I have time, so I'm playing around with more tests. Let me see what happens, and if I think I find anything noteworthy I'll post the results.

Cheers

edit:

My sincere apologies for wasting space and your time. I figured out the issue. Somehow, I got cntrl-s trigger happy at some point and created a file buried in the Squad folder with incomplete ATM configs. I was editing some exceptions and managed to save and borked in there...it wreaked havoc....

You know what they say, a little knowledge is the most dangerous thing....

Edited by starkline
Link to comment
Share on other sites

Is there a way I can tell this mod to not compress certain textures ( like my suits from Texture Replacer )?

I'm having similar problems with texture replacer too, my suits are getting messed up weird

228wXil.jpg

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...