Stone Blue Posted December 26, 2015 Share Posted December 26, 2015 So is this a separate executable, like ATM, or is this in-game?... I guess I'm asking, cuz I'm wondering if this worx on Linux (or Mac for that matter...) Link to comment Share on other sites More sharing options...
rbray89 Posted December 26, 2015 Author Share Posted December 26, 2015 11 minutes ago, Thomas P. said: Nice to see that somebody got inspiried by my work on planetary OnDemand Awesome mod, @rbray89 One Note: In your readme you state that the DDS Loader is under GPL. Since you borrowed it from Kopernicus, it would be LGPL, actually Ah, good catch. I'll amend. Haha, yeah after working with instanciating part modules and hearing about the OnVisible stuff, I became intrigued. Then I discovered a really cool unity work-around accidentally. You can use LoadImage on textures even when they are marked as unreadable. This will keep all their original properties (readability, mip-maps, compression) but load the new texture instead. This let me get around the issue of having materials using the texture and having it unloaded beneath them. 15 minutes ago, Stone Blue said: So is this a separate executable, like ATM, or is this in-game?... I guess I'm asking, cuz I'm wondering if this worx on Linux (or Mac for that matter...) Its a mod that is run in-game. Works just like ATM (which is also a mod that runs in-game. It isn't a separate executable) and works on all KSP platforms. Link to comment Share on other sites More sharing options...
sarbian Posted December 26, 2015 Share Posted December 26, 2015 Great! I can't wait to get back home and have a look Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 26, 2015 Share Posted December 26, 2015 1 hour ago, rbray89 said: Yeah, this is close to what I'd expect. During load, the textures are all unloaded at once near the end and have to load the originals and do PNG encoding, so if you don't get past the point were you start do decrease in memory, it actually bumps up a bit. I think I can change it so that as parts are loaded the originals are unloaded. But why the crash when only 2300Mb was in use? Link to comment Share on other sites More sharing options...
rbray89 Posted December 26, 2015 Author Share Posted December 26, 2015 1 hour ago, linuxgurugamer said: Loaded it up, started game. Everything got loaded, but it appeared to crash after loading everything and just before the initial menu. This was with OpenGL enabled. So, here is the interesting data: Windows 10, 32 gig memory GTX 760 with 2 gig onboard There are between 166 and 170 different mods installed With OpenGL: 2095Mb, GPU memory was maxed, got to menu With OpenGL and this mod: 2189MB, and crash before main menu, GPU memory was maxed With just this mod: 3658MB, and crash before main menu, GPU memory was about 500 Mb Let me know if you want any logs. I did see your comment earlier that you could fix the crash problem Fixed. Download Here: https://github.com/rbray89/DynamicTextureLoader/releases/tag/DTL-1.1 Link to comment Share on other sites More sharing options...
Whirligig Girl Posted December 26, 2015 Share Posted December 26, 2015 6 hours ago, ZenithRising said: I'm curious if this will fix the memory leak issue some Macs (including mine) have had since 0.9. With textures at full the game will crash within 10-20 minutes, once the leak tops 4GB. I've had to play with the textures turned way down as a workaround until the Unity 5 migration, which will supposedly fix it. Mostly I just haven't been playing. Would be very cool if I could get my pretty Kerbin back. Will try it after the holidays and report back. KSP wasn't on Mac before 0.10, how can you have problems in 0.9 on a mac? Link to comment Share on other sites More sharing options...
rbray89 Posted December 26, 2015 Author Share Posted December 26, 2015 7 minutes ago, linuxgurugamer said: But why the crash when only 2300Mb was in use? Not certain... Do you have logs using the newest version? Link to comment Share on other sites More sharing options...
Stone Blue Posted December 26, 2015 Share Posted December 26, 2015 1 hour ago, rbray89 said: Works just like ATM (which is also a mod that runs in-game. It isn't a separate executable) and works on all KSP platforms. Ahhh... Thanx!...Sorry I mispoke of ATM... I have CRS, and I admit I havent had to use ATM in QUITE awhile... It must be something else i am thinking of that was an .exe that had to be run before the KSP.exe... Link to comment Share on other sites More sharing options...
PauloRazen Posted December 26, 2015 Share Posted December 26, 2015 3.200 MB early. After put this mod i have 2.644. Nice mod. Now i go play, i report here if i have any issues. Link to comment Share on other sites More sharing options...
Mitchz95 Posted December 26, 2015 Share Posted December 26, 2015 So ... does it work in 1.0.4? Link to comment Share on other sites More sharing options...
rbray89 Posted December 26, 2015 Author Share Posted December 26, 2015 3 minutes ago, Mitchz95 said: So ... does it work in 1.0.4? Ah, sorry... Um... I have no idea. Try it out and see? It wasn't compiled for 1.0.4, so I make no guarantees. Link to comment Share on other sites More sharing options...
sidfu Posted December 26, 2015 Share Posted December 26, 2015 for some reason i feel llike squad reading this topic and going " damn he beat us to it" Link to comment Share on other sites More sharing options...
Stone Blue Posted December 26, 2015 Share Posted December 26, 2015 10 minutes ago, sidfu said: for some reason i feel llike squad reading this topic and going " damn he beat us to it" "....Again!!".... Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 26, 2015 Share Posted December 26, 2015 (edited) 2 hours ago, rbray89 said: Not certain... Do you have logs using the newest version? Latest version was uploaded to Github about 14 hours ago (according to Github), version 1.1 Well, I was impatient. I let it run longer and it got to the starting screen: With Dynamic Texture Loader OpenGL: 2189Mb, 2434 Mb, video card memory (2G) maxed out Normal: , 3500Mb, video card memory @ 627mb Without Dynamic Texture Loader: OpenGL: 2111 Mb, video card memory maxed out Normal: 3866Mb, video card memory: 624 mb For fun, I copied my install to a test directory and deleted every jpg, dds, and png that I could find. I got the following (although the game was unplayable): OpenGL: 2000Mb Normal: 2978 Mb So, while it seems to be running, it doesn't seem to be doing anything, or that much of anything Edited December 26, 2015 by linuxgurugamer correction Link to comment Share on other sites More sharing options...
rbray89 Posted December 26, 2015 Author Share Posted December 26, 2015 4 minutes ago, linuxgurugamer said: Latest version was uploaded to Github about 14 hours ago (according to Github), version 1.1 Well, I was impatient. I let it run longer and it got to the starting screen: OpenGL,with mod 2189Mb, 2434 Mb, video card memory (2G) maxed out Normal with mod, 3500Mb, video card memory @ 627mb Without Dynamic Texture Loader: 3866Mb, video card memory: 624 mb So, while it seems to be running, it doesn't seem to be doing anything, or that much of anything Hmmm... Two questions... What are you using to profile your graphics memory (I ask because some tools I tried were inaccurate), and can I have your log file? Also, looks like I simply forgot to commit the last release, but the release is valid. 23 minutes ago, sidfu said: for some reason i feel llike squad reading this topic and going " damn he beat us to it" I sometimes wonder what squad thinks of my endeavors, whether they see me as a competitor, ally, or if they even acknowledge my existence Link to comment Share on other sites More sharing options...
Speadge Posted December 26, 2015 Share Posted December 26, 2015 11 minutes ago, rbray89 said: I sometimes wonder what squad thinks of my endeavors, whether they see me as a competitor, ally, or if they even acknowledge my existence nice to quote that Link to comment Share on other sites More sharing options...
Virtualgenius Posted December 26, 2015 Share Posted December 26, 2015 Oh they know you exist why do you think everything got changed to dds images, if it wasnt for you and ATM many of us wouldnt have been able to play. There are many players who are very gratefull for your efforts me included and please continue with your tinkering Link to comment Share on other sites More sharing options...
rbray89 Posted December 27, 2015 Author Share Posted December 27, 2015 Updated to fix a minor issue where textures were prematurely unloaded in flight when multiple parts of the same type were involved. Link to comment Share on other sites More sharing options...
Skalou Posted December 27, 2015 Share Posted December 27, 2015 5 hours ago, rbray89 said: I sometimes wonder what squad thinks of my endeavors, whether they see me as a competitor, ally, or if they even acknowledge my existence From the devnote-tuesday-the-mother-of-all-merges the 18 november 2015: Quote [...] Dynamic loading and unloading of assets in the game will probably not be in 1.1 yet as it requires a fair bit of work to get this fully functional however it will be coming. [...] And nice work as usually! thank you! It works OK for what i tested but i don't have a lot of custom part, Are you planning to allow to choose the size of the compressed temporary texture in the future? i could find it great to have a better resolution, even if it save less memory, sometime it's hard to know what part is it in the VAB. Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 27, 2015 Share Posted December 27, 2015 (edited) 6 hours ago, rbray89 said: Hmmm... Two questions... What are you using to profile your graphics memory (I ask because some tools I tried were inaccurate), and can I have your log file? Also, looks like I simply forgot to commit the last release, but the release is valid. I sometimes wonder what squad thinks of my endeavors, whether they see me as a competitor, ally, or if they even acknowledge my existence I am using GPU-Z: https://www.techpowerup.com/gpuz/ In-game, I have GCMonitor installed I just downloaded the latest version and installed it. There is definite improvement with the normal startup. OpenGL startup doesn't change, it's 200-300 mb worse with this mod loaded Normal startup with mod, memory: 3447Mb, Video card memory: 649Mb Here is the logfile from the standard startup (no openGL, etc), with your mod. I simply started it up, waited until it got to the menu, Entered a saved game, tried to launch a simple rocket and it crashed: https://www.dropbox.com/s/tnn5kbr18qgqm8k/output_log.txt?dl=0 Edited December 27, 2015 by linuxgurugamer Link to comment Share on other sites More sharing options...
NathanKell Posted December 27, 2015 Share Posted December 27, 2015 Well, that's pretty awesome! Oh, some of that DDS code might well be Sarbian's, if you grabbed it from Kopernicus. When DDSLoader got obsoleted, we folded in the beyond-stock bits (that I needed for RSS) into Kopernicus.If it's just DXT1/5, that was already there and either Nathaniel or Thomas's. Link to comment Share on other sites More sharing options...
rbray89 Posted December 27, 2015 Author Share Posted December 27, 2015 1 hour ago, linuxgurugamer said: I am using GPU-Z: https://www.techpowerup.com/gpuz/ In-game, I have GCMonitor installed I just downloaded the latest version and installed it. There is definite improvement with the normal startup. OpenGL startup doesn't change, it's 200-300 mb worse with this mod loaded Normal startup with mod, memory: 3447Mb, Video card memory: 649Mb Here is the logfile from the standard startup (no openGL, etc), with your mod. I simply started it up, waited until it got to the menu, Entered a saved game, tried to launch a simple rocket and it crashed: https://www.dropbox.com/s/tnn5kbr18qgqm8k/output_log.txt?dl=0 Hmm... do you have a logfile for your install without my mod? I think there is a conflict with something. Possibly procedural parts. Link to comment Share on other sites More sharing options...
rbray89 Posted December 27, 2015 Author Share Posted December 27, 2015 1 hour ago, NathanKell said: Well, that's pretty awesome! Oh, some of that DDS code might well be Sarbian's, if you grabbed it from Kopernicus. When DDSLoader got obsoleted, we folded in the beyond-stock bits (that I needed for RSS) into Kopernicus.If it's just DXT1/5, that was already there and either Nathaniel or Thomas's. I included the entirety of the license header from Kopernicus including all authors in the code source where the DDS loading code is. Yeah, it's a neat trick. I was playing around with the idea of using a partmodule that would destroy and re-instantiate the texture, but this had obvious issues with the previews in the Editors. When I happend upon an interesting undocumented feature of Unity's LoadImage method. It works on unreadable textures. This means you can resize and re-load (PNG) textures on the fly even if the graphics object is inaccessible! It keeps all the original properties of the original texture (compression, mip-maps, readability) and it unfortunately requires PNGs, which means we have to re-encode graphics to be PNG. But it seems to work well enough. 2 hours ago, Skalou said: From the devnote-tuesday-the-mother-of-all-merges the 18 november 2015: And nice work as usually! thank you! It works OK for what i tested but i don't have a lot of custom part, Are you planning to allow to choose the size of the compressed temporary texture in the future? i could find it great to have a better resolution, even if it save less memory, sometime it's hard to know what part is it in the VAB. Haha, though to be fair, they are probably planning something a little more complete (meshes, part modules, animations, etc.) to be dynamically loaded and not just textures. Link to comment Share on other sites More sharing options...
sarbian Posted December 27, 2015 Share Posted December 27, 2015 9 hours ago, Virtualgenius said: Oh they know you exist why do you think everything got changed to dds images, if it wasnt for you and ATM many of us wouldnt have been able to play. There are many players who are very gratefull for your efforts me included and please continue with your tinkering Why indeed Link to comment Share on other sites More sharing options...
linuxgurugamer Posted December 27, 2015 Share Posted December 27, 2015 5 hours ago, rbray89 said: Hmm... do you have a logfile for your install without my mod? I think there is a conflict with something. Possibly procedural parts. Sure thing. Here is a logfile for the same install, started with OpenGL (I can't start it without OpenGL): https://www.dropbox.com/s/4jwq9o720rzddgp/output_log-std.txt?dl=0 If you need me to drop a mod to test, let me know. Link to comment Share on other sites More sharing options...
Recommended Posts