Jump to content

ISA MapSat "Legacy" discussion


Recommended Posts

That may be a fun fact' date=' but the real fact is that Innsewerants still retains the rights to his code. And in the absence of specific permission, no permission is the default. So until Innsewerants says otherwise, we will not allow any derivatives of his work on our network.

This is not to say someone can't create and build a similar add-on, only that it can't contain code from ISA MapSat.

Cheers!

[b']Capt'n Skunky

KSP Community Manager

Just to make sure, ISA Mapsat isn't supposed to work on the current build of ksp is it? It makes the game lag horrendously for me when i try to take off. The items also don't have the right hitbox when it comes to placement on my ships. I have to click way off to the left to actually select ISA Mapsat items.

Link to post
Share on other sites
As far as I'm aware, Mapsat works just fine in the current release, when installed correctly and when using the latest development version. It's a memory hog, but that was true in the previous KSP build as well.

Pardon me, but as far as I'm aware, "it's a memory hog" to the point of total unusability with any reasonable amount of other mods.

Link to post
Share on other sites
I think that was his point. Your assessment of it as not being a memory hog is every bit as subjective as his assessment of it being a memory hog.

No, I said that it worked except that it was a memory hog, which is objectively true. And he says that it you can't use with a "reasonable" amount of mods and is therefore totally unusable, which is subjective.

Link to post
Share on other sites

and I'm still not sure if I even care about that... (Tomaeto, tomahto, and trolling for good measure)

Anyways, back to the discussion at hand, a bunch of you were discussing the possiblity of having something "prediscover" the terrain so that it could then be tagged "on" during a scan. I was actually thinking of something like that while going through the earlier posts, and then noticed that people started mentioning it. My thought on it was to have something setup so that the user could select something that was listed somewhere in it's code as a planetary body (planet, moon, asteroid, orbiting land mass, etc...), whether it be stock or mod, and they could click a button that would then do a preparatory "prescan" to collect data on the body which would have an "off" tag by default. Scanning said body with a mapsat would, of course, cause those tags to be turned on as the mapsat passes over them. The process could run passive in the background, but some might prefer active in the foreground with a possible progress bar or percentage and the name of the celestial body being prescanned so they knew when the one they cared about was finished. Maybe even a button that reads "scan all planetary bodies now", something that would be useful for new starters, version or update changes to large numbers of planets, or mass corrupted scan results (not sure why this would happen, but who knows, it could)...

Example:

User sets Kerbin to be prescanned actively in foreground. Upon completion, user sets all other celestial bodies to be scanned passively in the background. User proceeds to build mapsat (or load, for those of us that aren't artistically inclined, hint hint, that means someone build me a mapsat, lol :D ). User launches several mapsats in orbit around Kerbin, which are all "gathering data" in unison (switching tags to "on"). User then checks GUI to see if the rest of the planets/moons have been scanned. User notices that Mun prescan is complete, but a few far off moons are still waiting to be prescanned. User proceeds to send mapsats to the Mun. User then sends a mapsat to a far off moon not realizing it has not yet been prescanned, but KSP doesn't crash because mapsat sets location polygons (which have no map data, but are still in existence) to "on". Prescan finishes on that moon, mapsat scanned areas now display data without having to be rescanned again. User exits KSP. Overnight, Squad updates and changes terrain features on nearly all celestial bodies. User opens KSP saved game and immediately exclaims, "WTF!!!" User then remembers the "scan all planetary bodies now" button, and waits patiently (yeah, right :P ) for prescan to complete. Upon completion, user checks current maps and notices that all previously scanned polygons are still set to "on." User lets out a sigh of relief and continues playing.

Hope this helps for ideas. By the way, according to this example, the layout of polygons across a planet's surface and the "prescanning" of said planet would probably be 2 different threads.

Benz

Edited by Benzschwagel
Link to post
Share on other sites

Another consideration, to add to realism but which takes this project in a somewhat different direction:

We don't actually map bodies in the manner that is being described here. We start with telescopes, and we get reasonably good maps, at least of the bits we can see, just from there. I'd like my telescopes to be useful, so what are the capabilities of combining the mapping operation with one of the telescope dlls? They'd give you a low-resolution map quickly, with a better telescope or longer time observing give you at most a medium-resolution map, and then with a satellite and active scanner you could get the high resolution ones with all of the goodies (anomalies, etc.).

Link to post
Share on other sites
Fun Fact, according to real copyright laws any mod is owned by the IP holder, in this case its Squad.

So someone could take this mod over without even needing to ask.

As to why this is incorrect - this would be true if this was a genuine 'modification' of Squad's work - a dodgy config edit of a stock part, for example. However, this is an 'add-on' or 'plug-in' - a separate piece of code that is built to be compatible with something, not built 'from' or 'of' it. As KSP is designed to load these addons of a certain specification and none else, Crater's analogy can be pushed even further - this is more like suggesting that Microsoft own the copyright to my monthly report because it includes an Excel graph.

Link to post
Share on other sites
User then remembers the "scan all planetary bodies now" button, and waits patiently (yeah, right :P ) for prescan to complete.

This is my only fear in your scenario. 150 pages of "hey whats going on I've got a really old version of MapSat installed" makes me fear there'd be 150 pages of "why are my maps out of date?". A good UI would assuage this, I guess.

Link to post
Share on other sites

mapping, hexes, detail cpu time.

As you pass over a hex, sample points based on something like a fractal code so you get detail like a jpeg loading slowly over dial up. heavily pixellated at first then more and more detailed as you scan more points. If you want a smaller memory footprint, do faster scans at lower detail. overscan areas of interest for more detail but more memory usage.

only save scanned data, not every pixel st the start.

Link to post
Share on other sites
As you pass over a hex, sample points based on something like a fractal code so you get detail like a jpeg loading slowly over dial up. heavily pixellated at first then more and more detailed as you scan more points. If you want a smaller memory footprint, do faster scans at lower detail. overscan areas of interest for more detail but more memory usage.

Yeah, this is what I had in mind with the recursively subdivided geodesic. I'll need to modify the grid code to at least support translation between different subdivision levels, and I might even need to come up with a completely new coordinate system.

I don't really think the PQS queries will be a problem. If anything, I'd defer queries until the data is actually needed rather than preemptively querying.

Link to post
Share on other sites
Yeah, this is what I had in mind with the recursively subdivided geodesic. I'll need to modify the grid code to at least support translation between different subdivision levels, and I might even need to come up with a completely new coordinate system.

I don't really think the PQS queries will be a problem. If anything, I'd defer queries until the data is actually needed rather than preemptively querying.

What do we need to do, to get the ball rolling? I'm familiar with C# but mostly in a web development context; I might be more useful for tweaks and so on. I can understand ISAMapSat's code for the most part, but I am not familiar with the Unity libraries and/or most of KSP's libraries.

Link to post
Share on other sites
What do we need to do, to get the ball rolling?

I wrote up some notes last night on a rewrite of the grid code. I've worked out some of the cell enumeration algorithms, but I've not yet tackled indexing.

If someone wants to write code, they could come up with a few coloring routines, but I think it's a bit early to be writing much code.

Link to post
Share on other sites
Pardon me, but as far as I'm aware, "it's a memory hog" to the point of total unusability with any reasonable amount of other mods.

Did you clean the duplicate entries out of your artifacts.dat file, as detailed here: http://forum.kerbalspaceprogram.com/showthread.php/9396-0-20-ISA-MapSat-4-0-Dev-Build?p=420617&viewfull=1#post420617

This should reduce the memory usage, possibly quite drastically (it really gets a LOT of duplicates.)

Link to post
Share on other sites
Did you clean the duplicate entries out of your artifacts.dat file...

Yes, I wrote a script to do it, and people for whom MapSat somehow works without making the game unplayable have annoyed me with this and associated advice (much of it bordering on voodoo) many times by now.

MapSat as it is only works for suitably small quantities of "works" and that suitably small is quite insufficient for me.

Link to post
Share on other sites
Yes, I wrote a script to do it, and people for whom MapSat somehow works without making the game unplayable have annoyed me with this and associated advice (much of it bordering on voodoo) many times by now.

MapSat as it is only works for suitably small quantities of "works" and that suitably small is quite insufficient for me.

This is probably because many of us are seeing it work nearly perfectly, myself included. And we don't understand why you would say that it doesn't, since you're really not making it clear what's wrong with it (Other than 'the memory use is too high', which I'm going to quantify as soon as I finish mapping Dres.) And thus conclude you've probably botched up your install somehow.

Regardless, my KSP is only using 2.6GB right now (a bit higher than the normal 2.4GB), but then I don't really use parts packs. Because so many of them are imbalanced...and the textures eat a lot of memory. among other issues.

Edited by Tiron
Link to post
Share on other sites
This is probably because many of us are seeing it work nearly perfectly, myself included. And we don't understand why you would say that it doesn't, since you're really not making it clear what's wrong with it (Other than 'the memory use is too high', which I'm going to quantify as soon as I finish mapping Dres.)

Regular, constant, reliable out-of-memory crashes whenever I fly or launch, or even as much as remember that a vessel with a MapSat part on it exists. Without MapSat, it takes most of a day of playing before KSP's memory leaks finally catch up with it, with it, an hour is sufficient.

Really, what else could be wrong with it when I say "memory use is too high"? I'm honestly curious, I might be missing some other potential irritation that I don't see because my KSP process doesn't live to see it.

..but then I don't really use parts packs.

Well, there's why it works for you, and why it doesn't work for many other people -- by far I'm not in a minority here. For me, the information MapSat provides is not worth the inconvenience of playing without part packs.

Link to post
Share on other sites
Regular, constant, reliable out-of-memory crashes whenever I fly or launch, or even as much as remember that a vessel with a MapSat part on it exists. Without MapSat, it takes most of a day of playing before KSP's memory leaks finally catch up with it, with it, an hour is sufficient.

Really, what else could be wrong with it when I say "memory use is too high"? I'm honestly curious, I might be missing some other potential irritation that I don't see because my KSP process doesn't live to see it.

Well, there's why it works for you, and why it doesn't work for many other people -- by far I'm not in a minority here. For me, the information MapSat provides is not worth the inconvenience of playing without part packs.

My general thought would be that the problem is the parts packs, not Mapsat itself. Texture files are the number one user of memory, and parts packs have a lot of them.

But seriously, even with the other mods I *do* have, There's still nearly a gigabyte and a half of memory left for other things. That's a LOT of memory to play around with. If the parts packs you're using are hogging up that much, then the parts packs have just as much of a memory usage problem as Mapsat does.

The ultimate cause probably has to do with the many bug reports there's been recently about png based textures causing insane amounts of memory usage ingame, and it not being affected by turning the texture quality down. ISA uses PNGs for the maps...

And memory leaks? I've never noticed any substantial memory leaks. My memory usage has historically hovered around 2,400,000 for KSP, regardless of just about everything. The memory usage actually DROPPED after I made my previous post and ended up in the high 2,500,000 range, and this after having the game run continuously for almost 24 hours straight! (Mapping Dres takes FOREVER.) Could it be that one of your other mods has a memory leak and that's what's causing your problems?

Now then, I'm going to measure Mapsats' memory usage. I've removed the ISA folder from Gamedata, and manually edited persistent.sfs to pull the mapsat dish off the one probe that's using the part, to minimize the difference between the save files.

Without ISA, at initial load, I'm getting memory usage by KSP of 1,786,500 kb, or so. Climbs to a little over 1,800,000 after a bit.

With ISA re-added (and my original save with the dish restored) I'm getting 2,478,500...and then dropped to 2,462,400 after a bit. And back up again to over 2,488,000.

So Mapsat's using about 700 MB of Memory. That's quite a lot more than I would expect, yes, given the folder's only 26MB it's really a bit hard to fathom.

The key thing here though is your parts packs have to be taking up around a Gigabyte to even get near territory where you could get an out of memory error at all. Secondary, you've got the fact that my system with relatively few mods only had the memory usage about 100mb higher after a full 24 hours of mapping, so you're either right on the razor's edge to start with...or one of your mods that I don't have has a major memory leak in it.

Edit: Actually, it was more like 26 hours of continuous game running, since I posted that I'd just dropped into Dres mapping orbit at 8AM yesterday and posted this at 10AM today...

Edited by Tiron
Link to post
Share on other sites

KSP is a single player game and the enjoyment each player finds in playing with or without certain mods is entirely subjective. That said I'm with Mihara, ISA is not worth keeping in my game if it performs as described by many others. Fortunately I have no life and I've gotten pretty good at balancing my mods. I'm currently running 45 mods including KW Rocketry, Universe Replacer, and ISA X4r1 (I'm only counting mods with textures). I've trimmed some mods and done many of the things others have suggested to get my game running around 3.2GB. For this effort I rewarded with a KSP that only crashes about once every ten hours or so. Still KSP gets very unhappy anytime ISA is even thought of not to mention the other bugs Mihara doesn't get to see. Sorry Tiron but Mihara's right. ISA is still available if you can get it to work but we need a new plugin.

Link to post
Share on other sites
KSP is a single player game and the enjoyment each player finds in playing with or without certain mods is entirely subjective. That said I'm with Mihara, ISA is not worth keeping in my game if it performs as described by many others. Fortunately I have no life and I've gotten pretty good at balancing my mods. I'm currently running 45 mods including KW Rocketry, Universe Replacer, and ISA X4r1 (I'm only counting mods with textures). I've trimmed some mods and done many of the things others have suggested to get my game running around 3.2GB. For this effort I rewarded with a KSP that only crashes about once every ten hours or so. Still KSP gets very unhappy anytime ISA is even thought of not to mention the other bugs Mihara doesn't get to see. Sorry Tiron but Mihara's right. ISA is still available if you can get it to work but we need a new plugin.

Actually what we need is a way to get Unity not to convert the textures to uncompressed bitmaps, thus massively bloating the memory usage. And a 64 bit build that's stable. Both Unity problems (although there's speculation there may be a way to use a plugin to use DDS textures.)

And seriously, I'm NOT seeing increasing memory usage as the game runs, it's very near constant. If you're seeing increasing memory usage over time it's likely that one of your installed mods has a memory leak. And a bad one, if it's burning up 700+ MB in a few hours.

After running the game constantly for a bit over 26 hours, I saw less than a 150mb increase in memory usage, despite the fact I was actively scanning every time I checked it.

Edit: With 1 ISA Mapsat equipped ship in the air that I haven't focused yet in this instance, I'm running just shy of 1,900,000 KB. Most likely because it hasn't loaded Mapsat's assets yet.

The problem is not Mapsat, it's Unity bloating the textures, probably mostly the map textures themselves.

Edit2:

I should further note that any Mapping mod is going to encounter the same texture memory bloat problem, because you HAVE to have a texture for the planetary maps, and it has to be fairly large if you want any kind of detail.

Edit3:

Yep, when I loaded the craft in question, the memory usage blew up to around 2,600,000, with the game exhibiting symptoms of 'waaah you alt-tabbed', like it was late in my Dres mapping. I'll try a quick further experiment, no idea if it'll work or not.

Edit4:

Surprisingly, it did. I stripped every single texture ISA had, the GUI, the parts, everything, except for the map textures. And the 'Sun Textures', which he's apparently loading Dynamically off the NASA website, which is actually kinda cool.

CC0F286F96DFE116E804E93470040D932470E22B

Note the white dish and the lack of any GUI at all other than the box itself and the text, which are both built in features.

Memory Usage? Peaked at 2,466,508. Maybe I'll try blipping the models too, but I doubt that's going to have much effect.

In any case, it looks like almost all of the memory usage is...the maps themselves, bloated by Unity converting them to Bitmaps from PNGs. Either that or the 'pull the sun images from the interwebs' thing is using a LOT of memory.

Edit5:

I don't like telling people things that are actually wrong, so I went and figured out a way to test it: With all the textures gone, I created a 8x8 square of red pixels in png format, and then laboriously copied and renamed it as if it were the map textures, replacing both ISA and Polars for every planet, as well as noterrain.png, blankmap.png, and mapbg.png (I think the last was unneccessary). I did all this because I thought that part of why memory usage was so high is that it was creating/loading blank textures of the appropriate size (2048x1024) for all the blank maps and holding them in memory, if not saving them to the hard drive like it used to.

Basically, I tricked it into loading very small textures so it wouldn't try to create new, big ones (which is what it's designed to do, that's how it works after all.) The result?

Upon loading the ship with the ISA dish (I wasn't able to delete the models, it pitched a fit), the memory usage spikes back up to about 2,400,000. And then immediately drops off...to 1,800,000 or less, about what it is without ISA installed at all(Almost like it's allocating the memory for the expected size of the textures and then realizing it doesn't need that big allocation after all.)

In short: the plugin itself uses very little memory: That hogging actually IS almost entirely the textures, specifically the extra-large map textures. If you really wanna cut the memory usage you could crush the resolution on the map textures down, at the expense of losing detail on the maps.(Make sure you use sizes that are a power of 2 if you do this. I don't know for sure that it's a requirement, but it's fairly likely that it is.) It'll probably still spike pretty high on initial load, but then drop off, which should still help if a memory leak from a mod is your problem.

Just as one final test, I gave it back everything, all the textures, except for blankmap.png and the topos. Memory usage: peak 2,444,160kb, fell down to: ~1,835,500

Edited by Tiron
Link to post
Share on other sites

I should further note that any Mapping mod is going to encounter the same texture memory bloat problem, because you HAVE to have a texture for the planetary maps, and it has to be fairly large if you want any kind of detail.

Correct me if I'm wrong, but isn't the main problem with ISA MapSat is that it loads every single map texture it has into memory? The mod seems to work fine when I first start using it, and make my first map of Kerbin, but the longer I keep using it, and the more planets I map, the worse the performance gets. Last time I was using the dev build, I had mapsats around Kerbin, working fine, Mun, working fine, Minmus, working fine, Moho, starting to drag, and Duna, um, oh dear... and I was forced to uninstall the mod and go back to 3.3.4 to stop my game from crashing constantly. Sure, any mapping mod has to have a big texture around for the body being mapped, but it doesn't need a huge texture around for every single body in the universe at all times.

Also, were you switching probes while checking for memory leaks? I never had any problems with MapSat gradually consuming more and more memory while I just left it running, mapping a body. It did that without problems just fine. It was just when I was switching back and forth from mission to mission that things would start going south and eventually lock the system or drag FPS so low it was essentially useless... if MapSat wasn't leaking memory on mission switches, I'm not sure what else might have been, but I suppose it could be some other mod, and the increased memory use of MapSat just aggravated the issue that was actually caused by something else leaking memory.

Edited by Gaius
Link to post
Share on other sites
Correct me if I'm wrong, but isn't the main problem with ISA MapSat is that it loads every single map texture it has into memory? The mod seems to work fine when I first start using it, and make my first map of Kerbin, but the longer I keep using it, and the more planets I map, the worse the performance gets. Last time I was using the dev build, I had mapsats around Kerbin, working fine, Mun, working fine, Minmus, working fine, Moho, starting to drag, and Duna, um, oh dear... and I was forced to uninstall the mod and go back to 3.3.4 to stop my game from crashing constantly. Sure, any mapping mod has to have a big texture around for the body being mapped, but it doesn't need a huge texture around for every single body in the universe at all times.

Also, were you switching probes while checking for memory leaks? I never had any problems with MapSat gradually consuming more and more memory while I just left it running, mapping a body. It did that without problems just fine. It was just when I was switching back and forth from mission to mission that things would start going south and eventually lock the system or drag FPS so low it was essentially useless... if MapSat wasn't leaking memory on mission switches, I'm not sure what else might have been, but I suppose it could be some other mod, and the increased memory use of MapSat just aggravated the issue that was actually caused by something else leaking memory.

No, I was mapping Dres, and consequently had it sitting focused on the one probe (the only thing I had up with mapsat even ON it.)

I do kinda tend to focus on one thing at a time, so I usually don't do a lot of craft switching.

And so far as I can tell, it actually loads ALL the maps into Memory, including the blank ones, when you load a craft which has an ISA dish/GPS on it. The PNGs on disk have an average size of 2.11mb for the ones I've completed. There's a total of 30 map textures, two for each planet, which would lead to an extrapolated total size of about 63.3 MB for all the maps. Somehow, when the game loads them, they're taking up TEN TIMES that much memory. Even 32 Bit BMPs at that size are only 8MB each, so it's clearly something more than that. I first started hearing reports of PNG textures having incredible memory use a version or two ago, and also heard complaints that it still doesn't get scaled down if you drop the texture quality.

When you get right down to it, the question is not so much 'why does it load all the maps at once when you load a vehicle with Mapsat', it's 'Why is Unity using 20mb per 2mb map'.

I also have yet to observe any increase in the size of the memory usage as I map stuff, either. It's pretty constant around 2,400,000 for me. With occasional excursions into the 2,500,000s and rarely edging on 2,600,000, most likely because I fairly recently added Modular Multiwheels to my repertoire(Dem landing Gear.) I've turned on the peak working set column to help me monitor changes in the amount of memory it uses, and so far I've seen nothing of note.

I'll set up a test for some ISA and Non-ISA ship swapping later, to check for those memory leaks. If there's anything particular involved I'd love to hear it as it'd help set things up (IE: Is two craft enough or do I need more than one? Does it matter if they're within physics range of each other or does it need to go through a scene load to get it?)

Edited by Tiron
Link to post
Share on other sites
When you get right down to it, the question is not so much 'why does it load all the maps at once when you load a vehicle with Mapsat', it's 'Why is Unity using 20mb per 2mb map'.

I'm wondering if it's ISA or Unity that's doing this. Try putting the maps just loose in GameData and then remove ISA itself -- the game will still load the PNGs into memory, letting you get a baseline value for Unity's memory usage to load the files.

Link to post
Share on other sites
I'm wondering if it's ISA or Unity that's doing this. Try putting the maps just loose in GameData and then remove ISA itself -- the game will still load the PNGs into memory, letting you get a baseline value for Unity's memory usage to load the files.

I did it the other way around, I replaced the map textures with very tiny image files, 8x8, instead of the maps to see what happened when Mapsat loaded them.

The memory usage spikes up to the 'Normal' level for Mapsat for just a few seconds during loading, and then drops back down to the level it's at when you've yet to load a craft with a Mapsat unit. I think it's allocating memory for the full-size textures, and then de-allocating it when it doesn't get used by the tiny ones that actually get loaded.

It does the exact same thing to in essence the same values regardless of if it has the gui/other textures or not. The difference between the 8x8 images and the 2048x1048 maps being loaded was right around 600mb. The numbers are in the last part of my mega-post on the previous page (edit5).

Link to post
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...