Jump to content

[WIP] Loading textures only as required


Faark

Recommended Posts

Excuse the large resolution, but I'm getting this odd error. Every time I try this mod, weird things like this happen with the textures.

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

Here's a link to my crash logs: https://www.dropbox.com/s/xswyg467e9h9a27/2014-05-18_204146.zip

Any ideas why this might be happening? It happens with stock textures too. I don't think I have any incompatible mods installed, I do have ATM installed but it's version 3 and I also have texture replacer but I explicitly disabled compression in the config. I installed the redistributable as was linked in the OP and I'm still not having any luck with this mod.

Link to comment
Share on other sites

Ran into a crash. Looking over the exception in the LoD log, looks like something wacky happened handling a Near Future Propulsion texture.

https://dl.dropboxusercontent.com/u/5296507/NearFuturePropulsion-LoD-CrashLogs.7z

See! I'm doing better now! MOAR LOGS!

I should also mention that this doesn't happen all the time. In fact that was very much a random occurrence.

NFP textures don't play nice with LOD. My crashes went disconcertingly up after I started running the friends-with-Nertea x0.50a dev build. NFP has some rather . . . complicated texture sheets that don't really play nice with LOD and pretty much f*** it over if you try to overwork it.

Link to comment
Share on other sites

NFP textures don't play nice with LOD. My crashes went disconcertingly up after I started running the friends-with-Nertea x0.50a dev build. NFP has some rather . . . complicated texture sheets that don't really play nice with LOD and pretty much f*** it over if you try to overwork it.

:<

Well I hope something can be done on LoD's end to fix it. I really don't want to part with those NFP tanks and batteries.

Link to comment
Share on other sites

:<

Well I hope something can be done on LoD's end to fix it. I really don't want to part with those NFP tanks and batteries.

ATM seems to wok for me and my gamedata folder looks like this:

JJuKgTN.png

Tho that isn't a lot of big parts packs right there, it's still a lot of memory. LOD crashes more often when I run NFP then when I don't, so look into the active texture management mod as an interim solution if you do a lot of NFP work, like me.

@Alewx, NFP stuff is only 1024x1024 unless your using reduced. Unity handles it just fine, but something about them, possibly the excessive use of alpha channels, causes LOD to have a freakout when handling them a lot. I've crashed enough to know.

Link to comment
Share on other sites

How stable is this mod? I'll be running about 50 mods, and aggressive ATM config + half res works, full res doesn't.

You'll be getting a lot of hard crashes in VAB if you're insistent on sticking to full/half res. Even with aggressive ATM. It's to do with how the mod handles texture loading for the part catalog.

Link to comment
Share on other sites

@Spartan-S63:

I got the same error like you by adding Texture Replacer with disabled texture compression, but as soon as LoD has loaded them everything is fine.

Also Faark said he is working on getting the part browsing and TR under control give him time, I have faith in him. LoD is awesome, compared to pure texture size reduction and compression of ATM it is a quantumjump.

Link to comment
Share on other sites

How stable is this mod? I'll be running about 50 mods, and aggressive ATM config + half res works, full res doesn't.

Stable enough to use if you're reaching the limits of ATM. I certainly did. It'll crash, so be sure to keep saving. As long as you don't do anything to stress it too much (like flipping through all of the pages in VAB, then jumping scene to a huge ship, and jumping back to the space centre, jumping to a new ship, all in quick succession), it generally behaves.

Link to comment
Share on other sites

Well building the stuff in the VAB and SPH without LoD works fine for me but for really playing and flying the stuff I definitly need it.

Normally it takes 1 to 20 minutes for me to Crash with LoD in VAB but it Looks so much better :D The reduced and compressed textures make me just so sick.

Link to comment
Share on other sites

Sorry, this is the maximum I was able to reach, the mmap file still causes it to crash.

Hm i don't know. It looks like the error pattern for "out of memory" and i don't what else could cause it (or does it always crash at the same texture?). There are still a few leads we could investigate, but may wait with that until v3 is out.

Excuse the large resolution, but I'm getting this odd error. Every time I try this mod, weird things like this happen with the textures.

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

I do have NFP installed

Here's a link to my crash logs: https://www.dropbox.com/s/xswyg467e9h9a27/2014-05-18_204146.zip

Thanks for those logs. There is definitively a mod conflict as the root cause but some of those errors shouldn't even happen in such a case and i'll investigate whether this can still happen in my latest dev version.

There are also quite a lot exceptions from other mods. You should contact their developers about them, though it would be great to re-create those logs for them without LOD installed to remove a potential error cause.

Ran into a crash. Looking over the exception in the LoD log, looks like something wacky happened handling a Near Future Propulsion texture.

https://dl.dropboxusercontent.com/u/5296507/NearFuturePropulsion-LoD-CrashLogs.7z

See! I'm doing better now! MOAR LOGS!

I should also mention that this doesn't happen all the time. In fact that was very much a random occurrence.

Thanks. There is definitively some mod messing around with textures created by LOD, probably TR's compression or mip-map generation feature. This leads to LOD re-creating its thumb cache, what not just takes a while but also is kinda resource intensive and likes to crash on my larger test installs, especially on v2.*. But you likely pretty close to the memory limit anyway, thus VAB browsing won't be much fun i'm afraid. That's at least what i'm reading from your logs.

@Alewx, NFP stuff is only 1024x1024 unless your using reduced. Unity handles it just fine, but something about them, possibly the excessive use of alpha channels, causes LOD to have a freakout when handling them a lot. I've crashed enough to know.

Though alpha channel issues in LOD shouldn't cause crashes but only corrupted images. Also my huge test install has NFP installed and it doesn't crashes, though both older versions.

As for the next version... i'm currently trying to find and fix all those bugs and performance issues i've implemented since v2. There won't be any expected release date (won't make this mistake again!^^), but progress is being made. Once its out i should really stick to smaller but more frequent updates. Being unable to compare your reports to my dev build is kinda dumb.

Link to comment
Share on other sites

Hm i don't know. It looks like the error pattern for "out of memory" and i don't what else could cause it (or does it always crash at the same texture?). There are still a few leads we could investigate, but may wait with that until v3 is out.

If we can find the source of this crashes I believe many other will be thankful.

It does not Crash at the same particular texture but always just during construction in the VAB(SPH is not much used currently), and only it happens with the .tga textures the native KSP fileformates are flawless working perfectly no matter which mod, but these .tga files are reportet at the crashes, and they come from B9, KW, Interstellar. So it does not look like it depends on a particular file or mod.

Tell me what can I check to assist?

Link to comment
Share on other sites

So I'm running (as in right now) into this strange bug that's preventing the mod from preparing any of the textures.

The result? Everything in the Editor is pink (ie- there's no textures on the models)!

It's actually pretty great. Since none of the textures are actually getting loaded, KSP's running pretty smooth...

But it's also weird, ugly and somewhat irritating...

Link to comment
Share on other sites

So I'm running (as in right now) into this strange bug that's preventing the mod from preparing any of the textures.

The result? Everything in the Editor is pink (ie- there's no textures on the models)!

It's actually pretty great. Since none of the textures are actually getting loaded, KSP's running pretty smooth...

But it's also weird, ugly and somewhat irritating...

Do you have Texture Replacer also installed as a mod?

Link to comment
Share on other sites

More logs, different crash than last time. This one references some GPU shenanigans.[..]

Yea, DirectX's CreateTexture fails. LOD doesn't yet check its exact error code (added that, now), but its most likely out of memory. We have to see how else we can reduce the amount of memory used. v3 aims to reduce LODs own footprint while loading stuff, especially removing spikes in bad situations. Another bunch of memory are high res textures currently loaded by LOD. After v4 i hope to implement support for DXT compression to make loaded textures smaller. In a far future there could be stuff like up or down scaling texture sizes according to available memory. And the last significant chunk of memory are all resources not managed by LOD. ATM can help a lot, but ofc having more stuff managed by LOD would be great. But that has to be implemented feature by feature and were a number of suggestions already made, but we'll have to see where we can save the most for the required amount of work.

If we can find the source of this crashes I believe many other will be thankful.

As mentioned the source is very likely "out of memory". Sure, the current TGA loader is definitively not the most efficient in regard of memory usage, but would require quite some work and i don't think finding a better one or optimizing it is currently the best way improve LOD. Those crashes should occur less often once there is more memory available thanks to stuff mentioned above.

So I'm running (as in right now) into this strange bug that's preventing the mod from preparing any of the textures.[..]

Logs? Logs! Log files always help, in the worst case they tell me where to add more logging :) And getting a clue what exactly went wrong without them is hard to impossible. Some changes i made in response of logs provided by Spartan-S63's would might help in your you as well, but that's just speculation since i don't really know what caused your issue.

but what is about V2.3?

Progress is being made. There is still one known issue to resolve, but hope that's it. Also haven't even started testing TR stuff.

Since this is a space travel community i think it is appropriate to say "no earlier than sunday" :)

Link to comment
Share on other sites

Thanks a lot for this great initiative, this mod would definitely be a huge improvement for many KSP players. I hope it will progress nicely to a stable state!

- TextureReplacer: You have to disabled texture compression and cannot use it to replace part textures.

I am not sure I understood this part correctly. OK with disabling texture compression, but how exactly is TR used to replace part textures? For instance, I have installed the Squad Retextured HD project, which improves part textures, but I think it does not use TR. So why would any mod use TR to do the same? I actually think I missed something (and I am sincere here, it's not a critic), because I thought TR was made to replace textures for everything but parts.

I use TR to replace planet textures, suits, heads, and skybox. Am I good to go for a trial with LOD if I disable TR compression?

Link to comment
Share on other sites

Yea, DirectX's CreateTexture fails. LOD doesn't yet check its exact error code (added that, now), but its most likely out of memory. We have to see how else we can reduce the amount of memory used. v3 aims to reduce LODs own footprint while loading stuff, especially removing spikes in bad situations. Another bunch of memory are high res textures currently loaded by LOD. After v4 i hope to implement support for DXT compression to make loaded textures smaller. In a far future there could be stuff like up or down scaling texture sizes according to available memory. And the last significant chunk of memory are all resources not managed by LOD. ATM can help a lot, but ofc having more stuff managed by LOD would be great. But that has to be implemented feature by feature and were a number of suggestions already made, but we'll have to see where we can save the most for the required amount of work.

As mentioned the source is very likely "out of memory". Sure, the current TGA loader is definitively not the most efficient in regard of memory usage, but would require quite some work and i don't think finding a better one or optimizing it is currently the best way improve LOD. Those crashes should occur less often once there is more memory available thanks to stuff mentioned above.

Logs? Logs! Log files always help, in the worst case they tell me where to add more logging :) And getting a clue what exactly went wrong without them is hard to impossible. Some changes i made in response of logs provided by Spartan-S63's would might help in your you as well, but that's just speculation since i don't really know what caused your issue.

Progress is being made. There is still one known issue to resolve, but hope that's it. Also haven't even started testing TR stuff.

Since this is a space travel community i think it is appropriate to say "no earlier than sunday" :)

Ok one more stupid question from me, does the agressive/normal version of ATM make any difference with LoD? just so i get it clear.

Link to comment
Share on other sites

Ok one more stupid question from me, does the agressive/normal version of ATM make any difference with LoD? just so i get it clear.

Not as far as i know. If it does, more information / a report would be nice.

*Edit: It doesn't save additional memory for textures managed by LOD, ofc. But ATM aggressive is great to reduce the required memory of all those other textures, as written in my last post.*

I am not sure I understood this part correctly. OK with disabling texture compression, but how exactly is TR used to replace part textures? For instance, I have installed the Squad Retextured HD project, which improves part textures, but I think it does not use TR. So why would any mod use TR to do the same? I actually think I missed something (and I am sincere here, it's not a critic), because I thought TR was made to replace textures for everything but parts.

I use TR to replace planet textures, suits, heads, and skybox. Am I good to go for a trial with LOD if I disable TR compression?

TR is made to replace textures at runtime and supporting parts wasn't a huge deal for them, i suppose. So why not? The biggest difference might be usability. TR stores all textures in its own directory within GameData (since they are changed at runtime, as mentioned) and once you are sick of it you can just delete this folder. You cannot do this with Retextured, since that mod has overwritten Squads texture files as warned:

Warning: Make backups. It will be overwritten and there is no way of returning it other than reinstalling so be careful.
I use TR to replace planet textures, suits, heads, and skybox. Am I good to go for a trial with LOD if I disable TR compression?

Yes it should work, feel free to try it. And if it actually doesn't all you have to do is to delete LOD's dll within GameData.

Edited by Faark
Link to comment
Share on other sites

Ok one more stupid question from me, does the agressive/normal version of ATM make any difference with LoD? just so i get it clear.

It does. Not much but it does save you a couple MBs of memory. It really depends on what mods you use and if they're texture-heavy.

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...