Jump to content

[WIP] Loading textures only as required


Faark

Recommended Posts

@Faark:

Regarding the issue, it seems to be doing it rather haphazardly. That and it "drops" parts that have been already loaded. As in I select them from the catalog, put them in place while they're at the appropriate resolution, then some 10-15 minutes later- I look at the vessel (I spend a LOT of time alt-tabbed, mostly looking at spacecraft concepts and real world images, I think I have a problem*) and the part in question got downgraded (or dropped, or whatever). No reloads of the craft file in-between.

The issue also seems to persist between VAB and launchpad/open world. Though it's prominent in VAB exclusively. As in (as far as my experience with the bug goes) a part won't get dropped while in the open world (i.e- in space or wherever) but will remain at a lower resolution than the rest of the vessel if loaded like that from VAB onto the world.

*As a side note, I'd like to point out that the new version of LOD is MUCH more stable in VAB. I've yet to have an actual crash due to loading too many textures at once. It still crashes, but that's mostly due to me trying to jump from first to last page of my Utilities tab, which has probably the most parts (along with Propulsion).

Link to comment
Share on other sites

Yes, MBM is a fully supported image format for this mod, just like TGA or PNG. But LOD can only handle images (of whatever format) that it can associate with a part, so that might be a cause. Images handled by LOD are listed in both the log files and its config.

But again the best way to say anything about some issue (or in your case observation) would be to get fool proof instructions on how to reproduce it here, preferably with a near-stock installation. I guess you didn't just delete some random MBM files?

No, I've not been just deleting files willy-nilly... Any deleting I do is either full mod removal for testing, or trimming parts for memory savings. The issue is that with 80 mods to test, it would take days of free time just loading and reloading the game to figure out which ones are the greatest draw on memory in a stock config, which is something I probably won't get around to for a while. I think a much better approach in this case is for all of us who are getting similar results for memory usage should see what mods we have in common and then spend time testing those.

Since I've not been able to find a way to just export a list, here is a screencap of my GameData folder:

7zRHPvq.jpg

Link to comment
Share on other sites

Is there a program or mod that allows you to easily generate a mod list? I do have 80ish mods and I'm not really that interested in writing them all out...

Nope, I would write mine by hand or make a tiny script for getting all the different mods into a list, that should not be so dramatic.

Edit: well the screenshot works the same way :D

Link to comment
Share on other sites

It highly depends on what is slowing down KSP. If its to much stuff to render smaller textures can help, but lots of parts usually mean slow frame rate because of badly scaling physic calculations.

My ship fully assembled has 295 parts. So I thought it will work nicely. Also reducing quality of textures doesn't work anymore - stock graphics setting doesn't work too.

Link to comment
Share on other sites

[..]

As usual i want loooogs! :D

Please use this version. It does log some more related stuff. And please play with LODs debug menu activated. Once you notice such an issue please press its "info" button, then gracefully exit the game (via main menu; saving stuff is fine, ofc) and send me those logs. I also need the full name of the unloaded image file (or at least a screenshot and the name of the mod & part).

Btw: There is also an DontLoadEditorCatalogParts config option that could reduce VAB crashes even further, but please stick with the current config for now while researching those unload issue.

[..]

Well, my idea was to get a stock install with LOD, write down its memory usage, remove pretty much all parts, and check whether the change in memory is as small as expected. Will probably do this later today. This way i can at least verify that the problem isn't within LOD itself. But mod conflicts ofc are a lot more difficult to identify.

Btw, the current version of writes a lot of stuff into log files, include the name and in-memory-sizes of textures it doesn't manage (the version linked above even those managed by ATM). Having a look at those as well might be worth it?

Link to comment
Share on other sites

As usual i want loooogs! :D

Please use this version. It does log some more related stuff. And please play with LODs debug menu activated. Once you notice such an issue please press its "info" button, then gracefully exit the game (via main menu; saving stuff is fine, ofc) and send me those logs. I also need the full name of the unloaded image file (or at least a screenshot and the name of the mod & part).

Btw: There is also an DontLoadEditorCatalogParts config option that could reduce VAB crashes even further, but please stick with the current config for now while researching those unload issue.

Alrighty! Here's the last log from yesterday (I'm assuming you want the LoadOnDemand.log file).

Log from 04/06/14 4:48AM

I'll supply you with more logs from the debug version as soon as I can.

Link to comment
Share on other sites

(I'm assuming you want the LoadOnDemand.log file)

Thanks, but please at least LoadOnDemand.log and output_log.txt for the next case. KSP.log can also be nice since it contains less "spam" and times, though the actual info is mostly the same as in output_log.

The linked log at least doesn't contain any error messages and so far i haven't found anything else thats unusual.

Link to comment
Share on other sites

Thanks, but please at least LoadOnDemand.log and output_log.txt for the next case. KSP.log can also be nice since it contains less "spam" and times, though the actual info is mostly the same as in output_log.

The linked log at least doesn't contain any error messages and so far i haven't found anything else thats unusual.

MORE LOGS!

Latest LoD.log

Latest Output_Log

As for reporting on the issue- My previous assumption that parts loaded onto the world properly (at the set resolution) won't get dropped proved wrong. I've noticed it happen mostly when switching between vessels. It seems to be more prominent if said vessels are both in physics range.

One part in particular (that I've noticed) that's getting dropped after being loaded properly is the Pumpkin can from the HGR mod (part name "PumpkinLanderCabin").

I've also noticed that the mod seems to be retroactive, i.e- parts that have gotten dropped can get their textures loaded properly again. That doesn't seem to actually require a change of scene or reload. It just happens, much like the initial dropping of the texture...

Link to comment
Share on other sites

There is definitively some mod modifying LOD textures, either an old ATM version or there might be other TR configs that re-enable this.

Alright I have no idea what's going on. I've removed ATM And TR and it still does the same exact thing, Gets to the main menu, The planets will spin around the loading symbol for a fraction of a second, then when it should pop up to the menu it just hangs for about 10-15 seconds and crashes with the same crash reports as last time. Posting a picture of my mods, I have no idea why I cant get this to work. It should be working fine, yet refuses to load.

http://i.imgur.com/kZVw3pN.jpg

Link to comment
Share on other sites

Well, my idea was to get a stock install with LOD, write down its memory usage, remove pretty much all parts, and check whether the change in memory is as small as expected. Will probably do this later today. This way i can at least verify that the problem isn't within LOD itself. But mod conflicts ofc are a lot more difficult to identify.

Btw, the current version of writes a lot of stuff into log files, include the name and in-memory-sizes of textures it doesn't manage (the version linked above even those managed by ATM). Having a look at those as well might be worth it?

I guess I didn't get that this is what you were looking for... I'll have a chance to do that when I get home from work tonight and we can compare notes. I'll also get the debug version and get you some logs which might help identify where all that extra memory is going.

Link to comment
Share on other sites

Don't... Don't tease...

I don't see that in closer future, unity 5 has no release date and 4.5 has still no Change in 64bit Support. Also unity5 is featuring a 64bit editor, that does not mean it will have support for 64bit applications in the end.

Link to comment
Share on other sites

Unity is working on a 64bit multithread engine.

For now, the only other way for mulitithreading is LOOM:

http://u3d.as/content/michiel-frankfort/loom-multi-threading-framework-v1-7/4fx

The only thing in multithreading that was done in unity was to block ist api from native mutlithreading.

The need of MT and 64 in Unity als is there for years already, and nothing happend, I don't except them to deliver it really with 5, as they really just talk about the 64bit Editor.

And for Linux it is already 64bit so noone can say that it would not support it, the normal Windows user ist just tricked.

But it would be really an huge step forward for the engine.

Link to comment
Share on other sites

Guys please move that multithread discussion somewhere else. As someone who has a brief experience with multithreading does this just feel awkward to me. And no, LOOM doesn't magically make a game run in parallel.

MORE LOGS![..]

Thanks but those links give me a 403 error. Where they rly intended by dropbox to be shared? Also what is the exact part/texture that was wrong on those logs? PumpkinLanderCabin?

Any idea how this affects "LoadOnDemand.dll"

No idea, yet. I still consider KSP fundamentally flawed for loading everything on startup, but a mod could never give the same experience KSP should have in the first place. From a tech point of view i'm not sure whether the current version of Lod would run under 64bit. Most likely not, but changing that shouldn't be that hard and would ofc take away any kind of memory pressure this plugin had.

Link to comment
Share on other sites

Guys please move that multithread discussion somewhere else. As someone who has a brief experience with multithreading does this just feel awkward to me. And no, LOOM doesn't magically make a game run in parallel.

Thanks but those links give me a 403 error. Where they rly intended by dropbox to be shared? Also what is the exact part/texture that was wrong on those logs? PumpkinLanderCabin?

Here's a link to the folder:

https://www.dropbox.com/sh/azkyx8ofko2wvto/AAC0yiK2aojfAMBkMVyfZCnxa

Yes, the Pumpkin (part name "PumpkinLanderCabin") was one of the parts that got its' texture switched out for lower res several times over on the same scene/load. Stock Clamp-o-Trons have also been showing up with the wrong texture res. So you can look for those if you want to keep examples down to stock parts only.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...