Jump to content

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


rbray89

Recommended Posts

How exactly do I go about adding new parts textures to the compression? For instance the new NASA parts :)
I think ATM just compresses every texture that is being loaded and the mod specific cfg files just add some exceptions?

I'll have to add something. It compresses the textures to DXT format, but doesn't resize them. Resizing is what gives the most memory back.

Link to comment
Share on other sites

rbray since .23.5 update cant use this and the fake fullscreen option from launcher. if u do game dispear off screen but keeps loading. there no error its just game dispears off windows but still shows up loading in taskmanager

Link to comment
Share on other sites

rbray since .23.5 update cant use this and the fake fullscreen option from launcher. if u do game dispear off screen but keeps loading. there no error its just game dispears off windows but still shows up loading in taskmanager

You have to let it keep loading until complete.

Link to comment
Share on other sites

Alright, I'm having trouble with the new version making cashes. Here is the config I am using:

ACTIVE_TEXTURE_MANAGER_CONFIG{
folder = AIES_Aerospace
enabled = true
}

The Cashe file appears, but has no data inside it, it is just empty. Same thing is happening with all of my configs.

Link to comment
Share on other sites

Alright, I'm having trouble with the new version making cashes. Here is the config I am using:

ACTIVE_TEXTURE_MANAGER_CONFIG{
folder = AIES_Aerospace
enabled = true
}

The Cashe file appears, but has no data inside it, it is just empty. Same thing is happening with all of my configs.

What version are you using Basic or aggressive? Do you mean texture cache FILE or FOLDER? There may not be files generated if there is no re-sizing going on.

Link to comment
Share on other sites

What version are you using Basic or aggressive? Do you mean texture cache FILE or FOLDER? There may not be files generated if there is no re-sizing going on.

I'm seeing the same thing with basic - the cache has a complete folder structure, but the contents of many directories are empty. Previously, the basic version cached lots of files. Is it only caching files it resizes now? Does it still generate mipmapped DXT5 images for the other files?

Link to comment
Share on other sites

Using the basic version. And, well, see for yourself:

http://i.imgur.com/bT1HUgE.png

Edit: Also, the basic version isn't compressing anything, which is why I'm posting.

I'm seeing the same thing with basic - the cache has a complete folder structure, but the contents of many directories are empty. Previously, the basic version cached lots of files. Is it only caching files it resizes now? Does it still generate mipmapped DXT5 images for the other files?

Exactly. To save time, it will generate the directory structure, but not the files if it can just read the original. Aggressive will cache everything basically. Basic only caches normalmaps basically.

Link to comment
Share on other sites

Exactly. To save time, it will generate the directory structure, but not the files if it can just read the original. Aggressive will cache everything basically. Basic only caches normalmaps basically.

Okay. So everything else still has DXT5 compression / mipmap generation. You're just not saving those now.

Link to comment
Share on other sites

I noticed on some of the threads in the plugin info pages that loading of PNGs is a little slower than it should be on KSP.

Either switching to uncompressed PNGs or TGAs for the cache should reduce load time significantly, as well as reducing the memory footprint when loading. (Decompression of PNGs can be a memory heavy operation.)

Link to comment
Share on other sites

I noticed on some of the threads in the plugin info pages that loading of PNGs is a little slower than it should be on KSP.

Either switching to uncompressed PNGs or TGAs for the cache should reduce load time significantly, as well as reducing the memory footprint when loading. (Decompression of PNGs can be a memory heavy operation.)

Actually, PNGs load much faster than TGAs.

Link to comment
Share on other sites

Actually, PNGs load much faster than TGAs.

Sorry, just swinging by. Love the mod BTW.

Unless things have changed...

3. PNGs import VERY slowly, due to a Unity bug

I strongly recommend using one of the TGA or MBM settings for your exported textures instead of PNG. TGAs are just as editable, but slightly larger. For TGA I recommend the TGA_Compressed setting, TGA_Uncompressed is almost as large as an MBM. Have not tested TGA_Smallest but I believe the texture quality of that is fairly low. TGAs import a lot faster as they're using the same compression method as unity does normally[citation needed]. MBMs are not editable and are mostly uncompressed, so are quite large, but import the quickest. However, I haven't done direct time comparisons, so that would help a lot if somebody could get some direct statistics on the loading times for these different formats!

http://forum.kerbalspaceprogram.com/threads/35225-Some-lesser-known-bits-of-info-for-addon-developers?p=443161&viewfull=1#post443161

Edited by WaveFunctionP
Link to comment
Share on other sites

TGAs take up much more space on-disk, and take longer to load I found. The bug in unity must have been fixed a while ago, because PNGs are very fast to load.

Link to comment
Share on other sites

The bug in unity must have been fixed a while ago, because PNGs are very fast to load.

Can confirm: I remember reading about that the other day as I was checking out the changelog and browsing the forums for mod updates. I'm sorry I can't think of the exact source, but I do remember people saying that the Unity bug was fixed in a recent update. I think this info came straight from one of the KSP devs or a similarly reliable source. Anyway, as a result of the fix apparently PNG remains the most efficient format.

Link to comment
Share on other sites

This is in my output log..

AddonLoader: Instantiating addon 'ActiveTextureManagement' from assembly 'ActiveTextureManagement'

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

NullReferenceException: Object reference not set to an instance of an object

at UrlDir+.MoveNext () [0x00000] in <filename unknown>:0

at UrlDir+

.MoveNext () [0x00000] in <filename unknown>:0

at GameDatabase.GetConfigNodes (System.String typeName) [0x00000] in <filename unknown>:0

at ActiveTextureManagement.ActiveTextureManagement.PopulateConfig () [0x00000] in <filename unknown>:0

at ActiveTextureManagement.ActiveTextureManagement.Awake () [0x00000] in <filename unknown>:0

UnityEngine.GameObject:Internal_AddComponentWithType(Type)

UnityEngine.GameObject:AddComponent(Type)

AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)

AddonLoader:StartAddons(Startup)

:MoveNext()

(Filename: Line: -1)

Link to comment
Share on other sites

This is in my output log..

AddonLoader: Instantiating addon 'ActiveTextureManagement' from assembly 'ActiveTextureManagement'

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

NullReferenceException: Object reference not set to an instance of an object

at UrlDir+.MoveNext () [0x00000] in <filename unknown>:0

at UrlDir+

.MoveNext () [0x00000] in <filename unknown>:0

at GameDatabase.GetConfigNodes (System.String typeName) [0x00000] in <filename unknown>:0

at ActiveTextureManagement.ActiveTextureManagement.PopulateConfig () [0x00000] in <filename unknown>:0

at ActiveTextureManagement.ActiveTextureManagement.Awake () [0x00000] in <filename unknown>:0

UnityEngine.GameObject:Internal_AddComponentWithType(Type)

UnityEngine.GameObject:AddComponent(Type)

AddonLoader:StartAddon(LoadedAssembly, Type, KSPAddon, Startup)

AddonLoader:StartAddons(Startup)

:MoveNext()

(Filename: Line: -1)

Weird. I'm just giving it a string. KSP shouldn't freak out like that. What version of KSP are you running?

Link to comment
Share on other sites

Latest 0.23.5.464 i think it is, the latest with the hotfix

Would you like my whole log?

Hmmm... There is a hotfix? Might have to try that. Did you make any changes to the configs?

Link to comment
Share on other sites

By hotfix I mean the one they rolled out almost immediately after the new update. And no changes to configs, default install of ATM. I do have a LOT of mods however, here is my KSP-LOG https://drive.google.com/file/d/0B4i7sH7FPyZuUTc5b1ZhQ2M0bzA/edit?usp=sharing

Hmmmm... module manager is also freaking out.

NullReferenceException: Object reference not set to an instance of an object
at UrlDir+.MoveNext () [0x00000] in <filename unknown>:0

at ModuleManager.ConfigManager.OnGUI () [0x00000] in <filename unknown>:0

Looks like the configs aren't being loaded before DLLs are like they used to be.

Link to comment
Share on other sites

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