rbray89 Posted November 20, 2013 Author Share Posted November 20, 2013 Hey cool!Suggestion: add support for a CFG file with structureTextureCompressorBlacklist{ texturename1 = true texturename2 = true texturename3 = true // etc}And then before compressing a texture, check if the node HasValue(texture url) and if so skip it.That way any, say, UI textures, that need to be left uncompressed, can be.I like that. Blacklisting textures. Link to comment Share on other sites More sharing options...
Gristle Posted November 21, 2013 Share Posted November 21, 2013 Does this mod do the same thing? Can they coexist together to further decrease RAM usage?http://forum.kerbalspaceprogram.com/threads/49011-Testing-Compressing-Textures-in-Memory?highlight=compressram Link to comment Share on other sites More sharing options...
rbray89 Posted November 21, 2013 Author Share Posted November 21, 2013 Does this mod do the same thing? Can they coexist together to further decrease RAM usage?http://forum.kerbalspaceprogram.com/threads/49011-Testing-Compressing-Textures-in-Memory?highlight=compressramMine basically has more logic to it. Stops error messages from filling up the logs, skips textures that are already compressed, only does this once. Link to comment Share on other sites More sharing options...
Tw1 Posted November 21, 2013 Share Posted November 21, 2013 (edited) The witchcraft is ready! Great! More room to pig out on modsNo more crashes more hopefully! Edited November 21, 2013 by Tw1 Link to comment Share on other sites More sharing options...
s20dan Posted November 21, 2013 Share Posted November 21, 2013 900MB-1GB reducton in memory use with this and a very heavily modified copy Thanks. Link to comment Share on other sites More sharing options...
Camacha Posted November 21, 2013 Share Posted November 21, 2013 I am very happy this mod exists, I am sad it needs to exist. Link to comment Share on other sites More sharing options...
Stone Blue Posted November 21, 2013 Share Posted November 21, 2013 (edited) Excellent!...Gonna try this tonight!...I already cut quite a few hundred MB by using the Squad reduction pack, and deleteing about 2/3's of the stock parts, then I cut another 750-900MB by setting up a 2nd, dual-boot Windows install with services cut to the very minimum, and only minimum necessary hardware drivers (basically just system and video), no firewall/antivirus either (this is the only downside: no internet access while playing, but not really a biggie now, since I recently got a tablet. ), and absolutely NO SOFTWARE installed EXCEPT KSP... My regular Win7 install runs 1.25-1.4GB RAM at idle...with the cut-down KSP Win7 install, runs at 529MB RAM....All you need is an extra 25GB+(1.5 times your installed RAM for your pagefile), on your harddrive to set up a dual-boot partition. Edited November 21, 2013 by Stone Blue Link to comment Share on other sites More sharing options...
CaelReader Posted November 21, 2013 Share Posted November 21, 2013 Cut my RAM on startup from 3.2GB to 2.3GB, Excellent work! It was pretty awesome watching the RAM usage plummet as the textures compressed. Link to comment Share on other sites More sharing options...
DresCroffgrin Posted November 21, 2013 Share Posted November 21, 2013 Decided to show up and report my savings at about 900 MB. You, sir, deserve the biggest, shiniest medal that these forums have to offer. Link to comment Share on other sites More sharing options...
Guest Posted November 21, 2013 Share Posted November 21, 2013 I'm seeing roughly 850MB reduction in RAM consumption. Now I can definitely start on reworking my UR700! Outstanding work! Link to comment Share on other sites More sharing options...
MOARdV Posted November 21, 2013 Share Posted November 21, 2013 Nice. I went from 2.8 gigs to 2.3. Which makes me wonder how I got down to 2.8 to start with - I'm typically 3.5+. I must have pruned out a lot of disused parts recently. But still, a reduction of nearly 1/6 of the working set is nothing to sneeze at.Does this generate a full mipmap chain, or does it just convert level 0 to DXT? If it does the full chain, does that mean it's also making mipmaps for PNG files? Link to comment Share on other sites More sharing options...
therealcrow999 Posted November 21, 2013 Share Posted November 21, 2013 I tried that mod with this one, didn't do anything further. So your better off just using this mod. Does this mod do the same thing? Can they coexist together to further decrease RAM usage?http://forum.kerbalspaceprogram.com/threads/49011-Testing-Compressing-Textures-in-Memory?highlight=compressram Link to comment Share on other sites More sharing options...
sirkut Posted November 21, 2013 Share Posted November 21, 2013 I saw a drop in 800MB. Kudos for this! Link to comment Share on other sites More sharing options...
Nuke Posted November 21, 2013 Share Posted November 21, 2013 (edited) i didnt know this was a thing that could be done with a mod. frankly this is something squad should have done a long time ago.anyway with reference to normal maps, is there a way to use dxt5_nm. this essentially puts the red channel into dxt5 alpha. this makes the channels interpolate independently (color data interpolates together), and also gives you a bit more depth on one channel. there is also a newer format (3dc/bc5) that is essentially a two channel format (they are similar to the way dxt5's alpha works) which could give even higher normal map quality for the same cost. there is also a one channel version that could give us better greyscale quality for things like emmission maps.http://en.wikipedia.org/wiki/3Dc Edited November 21, 2013 by Nuke Link to comment Share on other sites More sharing options...
NathanKell Posted November 21, 2013 Share Posted November 21, 2013 Nuke: http://docs.unity3d.com/Documentation/ScriptReference/Texture2D.Compress.htmlTL;DR: Not while using that command. Link to comment Share on other sites More sharing options...
rbray89 Posted November 21, 2013 Author Share Posted November 21, 2013 i didnt know this was a thing that could be done with a mod. frankly this is something squad should have done a long time ago.anyway with reference to normal maps, is there a way to use dxt5_nm. this essentially puts the red channel into dxt5 alpha. this makes the channels interpolate independently (color data interpolates together), and also gives you a bit more depth on one channel. there is also a newer format (3dc/bc5) that is essentially a two channel format (they are similar to the way dxt5's alpha works) which could give even higher normal map quality for the same cost. there is also a one channel version that could give us better greyscale quality for things like emmission maps.http://en.wikipedia.org/wiki/3DcNot that I'm aware of. Link to comment Share on other sites More sharing options...
Galacticruler Posted November 21, 2013 Share Posted November 21, 2013 Now tell me, why aren't you a Squad employee? Link to comment Share on other sites More sharing options...
Dante80 Posted November 21, 2013 Share Posted November 21, 2013 Reporting a saving of 600MB memory (2.2 from 2.8) with a heavily modded load. I think I can put full B9 and AEIS now together with NP,KW,KSPI and NFP!Thanks a lot man, this is the perfect stopgap until we have a 64bit KSP in windows! Link to comment Share on other sites More sharing options...
johnsonwax Posted November 21, 2013 Share Posted November 21, 2013 This is really fantastic. Thank you for doing this. I had recently tried to add interstellar and it killed RAM. Runs great now. I'll see if I can squeeze clouds in now. Link to comment Share on other sites More sharing options...
Galacticruler Posted November 21, 2013 Share Posted November 21, 2013 alright, so I gave it a go, but it seems that I've managed an INCREASE in RAM usage...however this fixed the ocean lag. Link to comment Share on other sites More sharing options...
Majiir Posted November 21, 2013 Share Posted November 21, 2013 We discussed using a method exactly like this in #kspmodders a couple months back. I wrote a plugin that looks similar to yours, even. At the time, we determined this wasn't practical because most or all textures in GameDatabase are marked unreadable, and Compress() calls simply output an error. Is the GetPixel() call before Compress() solving that problem? That's a nifty little hack.Have you considered checking texture sizes before and after the compress operations so you can output a hard number on how much memory is saved? Anecdotal reports are often way, way off. (I've had complaints that a Kethane update increased memory consumption by 100MB when thorough analysis shows the plugin only using maybe 100 kilobytes more. A lot of numbers will be inflated by wishful thinking.) Link to comment Share on other sites More sharing options...
NathanKell Posted November 21, 2013 Share Posted November 21, 2013 Also if you can output the URL of every texture you process, so we can go back and add to blacklist if necessary. Link to comment Share on other sites More sharing options...
rbray89 Posted November 21, 2013 Author Share Posted November 21, 2013 We discussed using a method exactly like this in #kspmodders a couple months back. I wrote a plugin that looks similar to yours, even. At the time, we determined this wasn't practical because most or all textures in GameDatabase are marked unreadable, and Compress() calls simply output an error. Is the GetPixel() call before Compress() solving that problem? That's a nifty little hack.Have you considered checking texture sizes before and after the compress operations so you can output a hard number on how much memory is saved? Anecdotal reports are often way, way off. (I've had complaints that a Kethane update increased memory consumption by 100MB when thorough analysis shows the plugin only using maybe 100 kilobytes more. A lot of numbers will be inflated by wishful thinking.)Yup, Exactly. I found the exact same issue. The GetPixel creates an exception for textures that can't be read. Don't know why Compress Doesn't do the same. Link to comment Share on other sites More sharing options...
MaxP Posted November 21, 2013 Share Posted November 21, 2013 Hmmm... Reduced allocated RAM from 3.2 to 2.7 GB. Sounds like magic, will test it. Link to comment Share on other sites More sharing options...
Xentoe Posted November 21, 2013 Share Posted November 21, 2013 Reducting from 3,5 Gb down to 2,2 GbHuiiiiiKSP InterstellarB9NovepunchThis nice Cloud ModKethaneNear NutureScanSat Link to comment Share on other sites More sharing options...
Recommended Posts