Jump to content

[1.1][1.1-1] Apr-19-2016 Dynamic Texture Loader


rbray89

Recommended Posts

5 hours ago, rbray89 said:

Sorry, I didn't think about it until just now. Looks like it shouldn't matter too much though I think. might matter more if the original graphics were PNG format though it seems.

Actually, I'm pushing a new version that would be best to load the vessel of test first then exit :) You guys really don't have to do all the profile work right now. I've seen enough from your results that It substantiates my thoughts that one of your mods is holding this one back. If you have a CKAN build, that would be fantastic, or even a zip of your GameData folder if you can afford the bandwidth somewhere.

I posted my ckan file a few minutes ago, here is my compressed gamedata file:  https://www.dropbox.com/s/5dhvlq6uponpec1/GameData.zip?dl=0

The compessed file is about half a gig

Bandwidth is free for me (FIOS) :-)

I should note that my video setup is 4 HD screens (all off of one video card), but I'm playing KSP on a single screen in 1920x1080

Link to comment
Share on other sites

13 minutes ago, Euclide said:

Wonderful! Thank you!

Really hope you can figure this out.  There are a number of mods I'm not using because of space issues, would really love to use them.

While I don't have time for extensive testing, feel free to ask me to try a new version.

Link to comment
Share on other sites

8 hours ago, rbray89 said:

Sorry, I didn't think about it until just now. Looks like it shouldn't matter too much though I think. might matter more if the original graphics were PNG format though it seems.

Actually, I'm pushing a new version that would be best to load the vessel of test first then exit :) You guys really don't have to do all the profile work right now. I've seen enough from your results that It substantiates my thoughts that one of your mods is holding this one back. If you have a CKAN build, that would be fantastic, or even a zip of your GameData folder if you can afford the bandwidth somewhere.

I don't use CKAN, but I can send you a zip of the gamedata through dropbox.

Link to comment
Share on other sites

In my experience there are a fair amount of textures that are redundant. Is there a way to build checksums to find them and instead of loading them twice or more times to simply link them to a single instance.

Link to comment
Share on other sites

6 hours ago, sarbian said:

@rbray89 I suggest that you display SystemInfo.graphicsDeviceVersion (or SystemInfo.graphicsDeviceType ) somewhere so that people can be sure of the API they are running in case they did not use the exact correct launch option

 

Edit : and SystemInfo.graphicsMemorySize could have a use too

That's a decent Idea.... I use MSI afterburner myself. I wish unity had some profiling objects available so we could display memory usage.

2 hours ago, linuxgurugamer said:

Really hope you can figure this out.  There are a number of mods I'm not using because of space issues, would really love to use them.

While I don't have time for extensive testing, feel free to ask me to try a new version.

Will do. 

50 minutes ago, Kolago said:

In my experience there are a fair amount of textures that are redundant. Is there a way to build checksums to find them and instead of loading them twice or more times to simply link them to a single instance.

Not a good way of doing this aside from in the texture loader. Though I guess we *Could* override it like ATM does.

Link to comment
Share on other sites

8 hours ago, rbray89 said:

Procedure: Perform entire load to craft once.

Then restart KSP using the different graphics profiles.
Settings: full texture resolution, windowed, 1280x720

I'm doing that procedure before getting numbers from the different graphics profiles. Also, I've had what appears to be a vid card crash and recovery already (combined with a KSP crash I think) with the -force-d3d11, currently checking OpenGL. Also, the first initial load with force dx11 was fine, so, I don't know what happened.

https://docs.google.com/spreadsheets/d/1btlHDaOM5IIqKOUUO11ETg9IrX703aTkjepwfilBXQ8/edit?usp=sharing

Edited by smjjames
Link to comment
Share on other sites

7 minutes ago, smjjames said:

I'm doing that procedure before getting numbers from the different graphics profiles. Also, I've had what appears to be a vid card crash and recovery already (combined with a KSP crash I think) with the -force-d3d11, currently checking OpenGL. Also, the first initial load with force dx11 was fine, so, I don't know what happened.

https://docs.google.com/spreadsheets/d/1btlHDaOM5IIqKOUUO11ETg9IrX703aTkjepwfilBXQ8/edit?usp=sharing

I've been seeing weird stuff from my Nvidia driver this week with/without DTL. I update it on a regular basis, and last update was rather recently.

Link to comment
Share on other sites

54 minutes ago, rbray89 said:

That's a decent Idea.... I use MSI afterburner myself. I wish unity had some profiling objects available so we could display memory usage.

On windows I could look into adding some native call fpr GPU memory to GC Monitor. All the needed code is around with open licences. On other system I guess the same is doable but that will require more research on my side (I can test Linux, not OSX). Looks like a fun project :D

Link to comment
Share on other sites

@rbray89 Looks like having DTL plus -force-opengl helps reduce RAM usage by ~100mb, not sure if you're expecting the margin to be larger rhan what I'm seeing, but it's a start at least. Forcing dx11 seems worse with DTL than without for some reason. Going to try that one again though.

Link to comment
Share on other sites

14 minutes ago, sarbian said:

On windows I could look into adding some native call fpr GPU memory to GC Monitor. All the needed code is around with open licences. On other system I guess the same is doable but that will require more research on my side (I can test Linux, not OSX). Looks like a fun project :D

Hmmm... actually, I think this could be used as a standalone mod... One that alerts players when their memory is low, letting them exit gracefully rather than loose progress?

Link to comment
Share on other sites

1 minute ago, rbray89 said:

Hmmm... actually, I think this could be used as a standalone mod... One that alerts players when their memory is low, letting them exit gracefully rather than loose progress?

GCmonitor already does that for me.

Link to comment
Share on other sites

3 minutes ago, smjjames said:

@rbray89 Looks like having DTL plus -force-opengl helps reduce RAM usage by ~100mb, not sure if you're expecting the margin to be larger rhan what I'm seeing, but it's a start at least. Forcing dx11 seems worse with DTL than without for some reason. Going to try that one again though.

I'd expect results like these: https://docs.google.com/spreadsheets/d/1K4PbZKUeqfnJEiDWATf0VlVAzFRFbTGuQV2krammYYo/edit?usp=sharing
This is what I recorded from my KSP sessions.

Link to comment
Share on other sites

8 minutes ago, rbray89 said:

I'd expect results like these: https://docs.google.com/spreadsheets/d/1K4PbZKUeqfnJEiDWATf0VlVAzFRFbTGuQV2krammYYo/edit?usp=sharing
This is what I recorded from my KSP sessions.

What I'm seeing with OpenGL looks similar, or rather is following the same trend. However, with forcing DX11, the only thing that is significantly helped is video memory usage since without DTL, video memory was hitting the top.

Link to comment
Share on other sites

The 1.4 pre-release should help with loading times after the initial load of parts (eg. Go to VAB and load your craft. Next time you load them up it should be much faster)... 
https://github.com/rbray89/DynamicTextureLoader/releases/tag/DTL-1.4


I just looked over the hash values, and it

3 hours ago, Kolago said:

In my experience there are a fair amount of textures that are redundant. Is there a way to build checksums to find them and instead of loading them twice or more times to simply link them to a single instance.

I just implemented a texture loader, so I'll be attempting this next. Looks like there are several textures that are the same for mods at least that we should be able to trim down.

Link to comment
Share on other sites

58 minutes ago, rbray89 said:

I just implemented a texture loader, so I'll be attempting this next. Looks like there are several textures that are the same for mods at least that we should be able to trim down.

You are my hero! In my KSP installation with 87 mods are about 150 MB in 759 DDS Files redundant. I aspect a memory load reduction of around 100 MB.

Link to comment
Share on other sites

23 minutes ago, Kolago said:

You are my hero! In my KSP installation with 87 mods are about 150 MB in 759 DDS Files redundant. I aspect a memory load reduction of around 100 MB.

Well, here it is: https://github.com/rbray89/DynamicTextureLoader/releases/tag/DTL-1.4 It was a lot easier than I thought it would be, as I was already generating the MD5 Hashes. Go ahead and try it out, but I can guarantee it won't save that much memory saved compared to the first DTL release as we were already shrinking those textures :) That being said, I did notice a small change (30MB-50MB) with my test install, and if you had a craft with parts that use duplicate textures or non-part mods that duplicate textures you'll likely notice a difference.

3 hours ago, sarbian said:

On windows I could look into adding some native call fpr GPU memory to GC Monitor. All the needed code is around with open licences. On other system I guess the same is doable but that will require more research on my side (I can test Linux, not OSX). Looks like a fun project :D

Ah, I didn't relize you were the author of GC monitor! Cool! Looking forward to it!

Edited by rbray89
Link to comment
Share on other sites

1 minute ago, *MajorTom* said:

DTL 1-4

very strongly decreases the framerate, when I build the first part of the new ship (but not for long time 4-7 sec.) in VAB/SPH (Started with DTL 1-3)

----------

i7, 8 gb, -force-d3d11, x32KSP

I think this is because it is caching the texture to disk. We might be able to do that at load instead of runtime though. It would eat up disk space, but would stop the pause while it saves the texture. That being said, it doesn't happen for all textures does it? Maybe it is attempting a re-load? I'll have to look into this. I'm starting to think that the textures were unloaded, but not signaled as such, so when a part is added it tries to perform an unload when the new part is added.

Link to comment
Share on other sites

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