Jump to content

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


rbray89

Recommended Posts

3 minutes ago, *MajorTom* said:

....and framerate drop then i rotate camera around my new ship in SPH (i dont see this earlier) . is it load/unload also textures of background cars,kerbals etc in hangar?

Nope. We don't touch anything but part textures. We do perform garbage collection and asset unloading when transitioning scenes though to try and save memory when scene transitions occur.

Link to comment
Share on other sites

:(

Very sorry, but while 1-4 is so slow at building, I will probably be back to 1-2. By the way, these textures hangars always in memory? Maybe they can unload when we're not in them, but in space? And then bulk load (for example when returning from space to space center)? Or will the frame rates drop?

Edited by *MajorTom*
Link to comment
Share on other sites

I see some texture problems (under OpenGL in my case) for parts that reuse textures like SXT. Textures are black.

SXT - Stock eXTension

[Defunct link removed by a moderator]

Edited by James Kerman
link removed
Link to comment
Share on other sites

1 hour ago, rbray89 said:

Added a new release that adresses @Kolago's thoughts. Still in pre-release. Waiting for people to tell me if it is worthy or not.
https://github.com/rbray89/DynamicTextureLoader/releases/tag/DTL-1.4

I'll take a look at this later this evening

 

Sounds interesting and promising

BTW, can you please put the version number into the file name?  It would help avoid issues with multiple downloads.

Thanks

 

LGG

Link to comment
Share on other sites

@rbray89 While this version looks promising, could you at least do something about the fact that when you load a ship in the VAB/SPH, it has a heavy framerate drop for over a minute, especially for large craft.. Also, when I went to a probe craft which I had in orbit of Ike before I installed DTL, I got hit by heavy lag and framerate drop which kept going and wouldn't go away. I don't know if the fact that the RAM usage is at 3586 had anything to do with it. Restarting anyway because of that and trying again.

Edit: I'm going to open taskmanager and GPU-Z and observe what is happening during the lagspiking,

edit2: The lag time didn't last as long the second time.

And yeah, 1.4 slows down building time by a lot because theres upwards of 5 to 20 seconds of lagspiking.

Edited by smjjames
Link to comment
Share on other sites

@rbray89 Can't you do something about the lag that happens when I switch to another ship that's in orbit? The lag stays around for like over a minute, two minutes I think.....

DTL helps some with the memory issues, but the lagspiking is becoming a real dealbreaker here.

edit2: The lagspiking is still there even after I leave a particular craft and come back to it, I'm going to remove DTL until that problem is dealt with because it's not worth the memory savings.

Edited by smjjames
Link to comment
Share on other sites

29 minutes ago, smjjames said:

@rbray89 Can't you do something about the lag that happens when I switch to another ship that's in orbit? The lag stays around for like over a minute, two minutes I think.....

DTL helps some with the memory issues, but the lagspiking is becoming a real dealbreaker here.

edit2: The lagspiking is still there even after I leave a particular craft and come back to it, I'm going to remove DTL until that problem is dealt with because it's not worth the memory savings.

This is with the pre-release 1.4 version right? did 1.3 have this problem?

 

5 minutes ago, sarbian said:

The plugin is not even 5 days old. Don't ask for a perfect lowmem lagfree experience when he is still working on other quirks...

Such is the life of modders ^_^

Link to comment
Share on other sites

Another curiosity question, the load up of memory into video ram would indicate that things like turning aero off (which uses video memory I believe?) would actually free up memory for parts? Definitely something I didn't know ... planning to try that out.

Link to comment
Share on other sites

i guess also running fullscreen, rather than borderless, might free some system ram if you're strapped. we're talking small beer here though--you're not going to recover more than a few 100k i.e. one more scene change before the memory leak kills you.

Link to comment
Share on other sites

8 minutes ago, speedwaystar said:

i guess also running fullscreen, rather than borderless, might free some system ram if you're strapped. we're talking small beer here though--you're not going to recover more than a few 100k i.e. one more scene change before the memory leak kills you.

Why would that be?  Textures would still be the same

Link to comment
Share on other sites

1 minute ago, Sneaky Bstard Sword said:

I wish I had known about this BEFORE I doubled my PC's RAM specifically for KSP...

Well, I guess 16 gigs of RAM will come in handy some day

I hope

:(

ah you can always find more mods to add.

Link to comment
Share on other sites

7 hours ago, Sneaky Bstard Sword said:

I wish I had known about this BEFORE I doubled my PC's RAM specifically for KSP...

Well, I guess 16 gigs of RAM will come in handy some day

I hope

:(

if i'm not mistaken, KSP 1.1 will be running on Unity 5.0 which is 64bit, and thus capable of utilizing all your 16 gigs.

Link to comment
Share on other sites

14 hours ago, sarbian said:

The plugin is not even 5 days old. Don't ask for a perfect lowmem lagfree experience when he is still working on other quirks...

Hey @sarbian, any idea what I'm doing wrong here? I need to update old texture references to new ones, but this doesn't seem to work:
 

foreach(UrlDir.UrlConfig config in GameDatabase.Instance.root.AllConfigs)
                {
                    ConfigNode model = config.config.GetNode("MODEL");
                    if (config.type == "PART" && model != null)
                    {
                        int i = 0;
                        string value = model.GetValue("texture", i);
                        while(value != null)
                        {
                            String replace = ",[ ]*" + urlFile.url;
                            if(Regex.IsMatch(value, replace))
                            {
                                model.SetValue("texture", Regex.Replace(value, replace, ", " + texInfo.texture.name), i);
                            }
                            i++;
                            value = model.GetValue("texture", i);
                        }
                        
                    }
                }

At this point it is one of the last items for me to address. I discovered the lag issue was a dumb omission, and everything else works brilliantly.

Link to comment
Share on other sites

14 hours ago, linuxgurugamer said:

Why would that be?  Textures would still be the same

i seem to recall that fullscreen mode partially unloads your desktop, freeing some system ram, whereas windowed mode doesn't. the amount is pretty trivial in any case.

Link to comment
Share on other sites

@rbray89 You want to replace the string after the first comma ? I would do that, but you may just need the Regex.Escape part to make it work

String replace = @"(.*),\s*" + Regex.Escape(urlFile.url);
if(Regex.IsMatch(value, replace))
{
    model.SetValue("texture", Regex.Replace(value, replace, "$1, " + texInfo.texture.name), i);
}

Edit : you re sure that urlFile.url is what you need ? (I forgot the exact content of that... path, path + cfg name ?)

Edited by sarbian
Link to comment
Share on other sites

18 minutes ago, sarbian said:

@rbray89 You want to replace the string after the first comma ? I would do that, but you may just need the Regex.Escape part to make it work


String replace = @"(.*),\s*" + Regex.Escape(urlFile.url);
if(Regex.IsMatch(value, replace))
{
    model.SetValue("texture", Regex.Replace(value, replace, "$1, " + texInfo.texture.name), i);
}

Edit : you re sure that urlFile.url is what you need ? (I forgot the exact content of that... path, path + cfg name ?)

Yeah... I forgot about Escaping...  urlFile.url is what we need. Still doesn't seem to work... I'm doing this in the Texture Loader... does it have to be done later perhaps?

Link to comment
Share on other sites

44 minutes ago, rbray89 said:

Yeah... I forgot about Escaping...  urlFile.url is what we need. Still doesn't seem to work... I'm doing this in the Texture Loader... does it have to be done later perhaps?

no it should be early enough. Did you have a look at ModuleManager.ConfigCache (if you have MM) to see if the change worked ?

Link to comment
Share on other sites

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