Jump to content

[0.21.x] Somnambulic Aerospace -- KW Rocketry+ Optimization Pack v0.1.1 -- 15 Aug 13


somnambulist

Recommended Posts

Somnambulic Aerospace

KW Rocketry+ Optimization Pack

v 0.1.1 -- 15 Aug 2013


Overview

This pack provides memory and load-time optimizations for the excellent KW Rocketry. I am neither Kyle nor Winston -- this pack only optimizes the existing parts to take advantage of behind-the-scenes changes in Kerbal Space Program. By installing KW Rocketry+, you eliminate nearly 150 MB of duplicate and unused models and textures from your KW Rocketry installation. This results in an approximately 110 MB RAM savings and reduced load time over a standard KW Rocketry install.

How does it work?

KW Rocketry+ has two parts:

  1. A set of very small mu and mbm files which overwrite the duplicate and unused assets. This removes most of the extra overhead while maintaining compatibility with the part loader and makes KW Rocketry+ easy to install across platforms. It also means that KW Rocketry+ does not redistribute any models or textures from KW Rocketry itself.
  2. A ModuleManager cfg file that re-loads the models and textures as model nodes. Model nodes let the game reuse assets without loading them into memory multiple times.

Download

KWRocketryPlus.zip (41kb)

Installation

  1. Download and install KW Rocketry into KSP's GameData folder. You must install KW Rocketry into the GameData folder for optimization to work. If you've previously modified KW Rocketry  including using KW Rocketry+  use a fresh install.
  2. Unzip KW Rocketry Optimized into your GameData folder. Overwrite existing files.

Correct installation will result in a KWRocketry folder measuring approximately 267 MB.

Mac Users, see post #39 for installation details.


Overwritten Files

* `KWRocketry/Parts/Aero/KW2mExpandedFairingBase/model.mu`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingBase/model000.mbm`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingBase/model001.mbm`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingCone/model.mu`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingCone/model000.mbm`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingWall/model.mu`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingWall/model000.mbm`
* `KWRocketry/Parts/Aero/KW2mExpandedFairingWall/model001.mbm`
* `KWRocketry/Parts/Aero/KW2mFairingBase/model.mu`
* `KWRocketry/Parts/Aero/KW2mFairingBase/model000.mbm`
* `KWRocketry/Parts/Aero/KW2mFairingBase/model001.mbm`
* `KWRocketry/Parts/Aero/KW2mFairingCone/model.mu`
* `KWRocketry/Parts/Aero/KW2mFairingCone/model000.mbm`
* `KWRocketry/Parts/Aero/KW2mFairingWall/model.mu`
* `KWRocketry/Parts/Aero/KW2mFairingWall/model000.mbm`
* `KWRocketry/Parts/Aero/KW2mNoseCone/model.mu`
* `KWRocketry/Parts/Aero/KW2mNoseCone/model000.mbm`
* `KWRocketry/Parts/Aero/KW3mExpandedFairingBase/model.mu`
* `KWRocketry/Parts/Aero/KW3mExpandedFairingBase/model000.mbm`
* `KWRocketry/Parts/Aero/KW3mExpandedFairingBase/model001.mbm`
* `KWRocketry/Parts/Aero/KW3mFairingBase/model.mu`
* `KWRocketry/Parts/Aero/KW3mFairingBase/model000.mbm`
* `KWRocketry/Parts/Aero/KW3mFairingBase/model001.mbm`
* `KWRocketry/Parts/Aero/KW3mFairingCone/model.mu`
* `KWRocketry/Parts/Aero/KW3mFairingCone/model000.mbm`
* `KWRocketry/Parts/Aero/KW3mFairingWall/model.mu`
* `KWRocketry/Parts/Aero/KW3mFairingWall/model000.mbm`
* `KWRocketry/Parts/Aero/KW3mFairingWall/model001.mbm`
* `KWRocketry/Parts/Aero/KW3mNoseCone/model.mu`
* `KWRocketry/Parts/Aero/KW3mNoseCone/model000.mbm`
* `KWRocketry/Parts/Engines/KW2mengineMaverickV/model001.mbm`
* `KWRocketry/Parts/Engines/KW2mengineSPS/model001.mbm`
* `KWRocketry/Parts/Engines/KW2mengineVestaVR9D/model001.mbm`
* `KWRocketry/Parts/Engines/KWsrbGlobeVI/model000.mbm`
* `KWRocketry/Parts/Engines/KWsrbGlobeX2/model000.mbm`
* `KWRocketry/Parts/Fuel/KW2mRCSfuel/model.mu`
* `KWRocketry/Parts/Fuel/KW2mRCSfuel/model000.mbm`
* `KWRocketry/Parts/Fuel/KW2mRCSfuel/model001.mbm`
* `KWRocketry/Parts/Fuel/KW3mRCSfuel/model.mu`
* `KWRocketry/Parts/Fuel/KW3mRCSfuel/model000.mbm`
* `KWRocketry/Parts/Fuel/KW3mRCSfuel/model001.mbm`
* `KWRocketry/Parts/Structural/KW2mDecoupler/model.mu`
* `KWRocketry/Parts/Structural/KW2mDecoupler/model000.mbm`
* `KWRocketry/Parts/Structural/KW2mDecoupler/model001.mbm`
* `KWRocketry/Parts/Structural/KW2mDecouplerShroud/model000.mbm`
* `KWRocketry/Parts/Structural/KW2mDecouplerShroud/model001.mbm`
* `KWRocketry/Parts/Structural/KW3mDecoupler/model.mu`
* `KWRocketry/Parts/Structural/KW3mDecoupler/model000.mbm`
* `KWRocketry/Parts/Structural/KW3mDecoupler/model001.mbm`
* `KWRocketry/Parts/Structural/KW3mDecouplerShroud/model000.mbm`
* `KWRocketry/Parts/Structural/KW3mDecouplerShroud/model001.mbm`
* `KWRocketry/Parts/Structural/kwstrutConnectorHeavy/mesh/mesh1.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorHeavy/mesh/mesh2.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorHeavy/mesh/mesh4.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorHeavy/mesh/mesh6.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorHeavy/mesh/model.mdl`
* `KWRocketry/Parts/Structural/kwstrutConnectorHeavy/mesh/tangents.v4`
* `KWRocketry/Parts/Structural/kwstrutConnectorMedium/mesh/mesh1.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorMedium/mesh/mesh2.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorMedium/mesh/mesh4.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorMedium/mesh/mesh6.msh`
* `KWRocketry/Parts/Structural/kwstrutConnectorMedium/mesh/model.mdl`
* `KWRocketry/Parts/Structural/kwstrutConnectorMedium/mesh/tangents.v4`


Roadmap & Changelog

#### Planned for next release

  • Correct node sizes so parts play nicely with FAR and Deadly Reentry's ray casting.
  • Correct attachment rules on tanks to avoid VAB weirdness.
  • Separate release of Somnambulic Aerospace 3.75m rescales of the stock probe core, sas and embiggened fins. (You know, for kids.)

#### Possible future additions

  • More agressive deduplication of parts with similar but not identical textures.
  • Fix any odd attachment node placements and look at node strength.
  • Reimplement the "missing" SRB nose cone parts using assets from KW Rocketry 2.4. Model nodes mean no significant memory increase.
  • Work around the medium/heavy struts using ancient DAE files. The overhead on these and the texture is so tiny it's probably not worth it.
  • Add limited gimbaling to SRBs (if possible) to allow for Ares I-style first stages.

#### Not happening

  • More new parts. New part models are out of scope for this pack.
  • 5m rescale. A 5m rescale is technically possible but would probably be considered a derivative work. KW Rocketry+'s primary goal is to honor Kyle and Winston's work by making it just plain work better in modern versions of KSP. I'm planning to do a limited .625m rescale for personal use; I may consider releasing it and a 5m rescale if KW officially abandon the mod or if a forum moderator approves of the dervivative work.
  • 10m rescale. What is wrong with you?

Changelog

#### 0.1.1  15 Aug 13

  • Fixed the issue identified by with specular maps not being loaded (identified by Read have Read).
  • Replaced all the 0-byte mbm files with very very tiny textures exported out of Unity

#### 0.1  13 Aug 13

  • Initial release.
  • Replaced all byte-for-byte identical models and textures using model nodes.
  • Overwrote unused and duplicate textures with 0-byte MBM files.
  • Overwrote duplicate mu files with very very tiny mu files.


Miscellania and legal

Thanks

  • Obvious thanks to Kyle and Winston for creating KW Rocketry in the first place. (Come back -- we miss you!)
  • ialdabaoth for creating ModuleManager. These optimizations simply would not be possible without his work.

Licensing

  • KW Rocketry+ is licensed under Creative Commons ShareAlike 3.0.
  • No claim is made to the KW Rocketry name, models and parts.

Edited by somnambulist
Link to comment
Share on other sites

I have a question about this : If i have an save already whit probes or anything else whit KW Rocketry parts, it just override them and dont corrupts those crafts? im curious about that. Im waiting your answer :), Ill update this post When i test the pack

Edit - I Expected at least 2 or 5 crafts (Mostly Debris of jettisoned stages) but it had no problems whit my save but i dont know if its an error whit the pack (I really dont think thats the problem) or just a simple mistake or missing component on the install but when i finished my in-flight test and got back to the VAB i found decouplers whit missing texture and some whit the wrong model (Stack Decouplers whit wrong Model 2.50 - 3.75 and the Interstages from the same size whitout their textures but whit the same model) and the Monopropellant tanks had also the wrong model and missing textures.

Well.... i think the RAM use decreased considerably because it takes like 4 minutes to load the game and the save but after this it took less, like 2 minutes (FYI My computer usually gets really slow and im planning on getting a new one :P)

Edited by Zaryulenko
tested - and some difficulties
Link to comment
Share on other sites

Because of how KSP stores data about parts, a lot of things are copied into the exact instance of a part on a vessel when launched, and a smaller amount of things are stored in the craft file. Most things set by the cfg file fit into this, a part once launched does not respect changes to it's mass, resource contents, partModules, etc, and the node positions so changing the models of a ship in flight wont change the invisible skeleton the ship is assembled to. It seems likely that MODEL{} will also he vessel locked, which may cause problems if your ship uses a model that has been 'downsized'.

As a rule of thumb, any time you change parts that you've already used, expect it to break your save

Link to comment
Share on other sites

I have a question about this : If i have an save already whit probes or anything else whit KW Rocketry parts, it just override them and dont corrupts those crafts? im curious about that. Im waiting your answer :)

It should be completely non-destructive to any existing craft with KW Rocketry parts. KW Rocketry's original CFG files are left untouched -- I'm just using Module Manager to add model nodes when the part loads.

There is a small chance that I messed up a scale value somewhere. In that case the craft should still load but will look weird due to an incorrectly scaled part. I've been play-testing this for a week and made sure to take all the optimized parts out for a spin. But if anyone encounters a bug or other weirdness, please post the problem so it can get fixed.

Link to comment
Share on other sites

Did you try contacting them first?

Yeah a couple weeks back (before .21 hit) but didn't get a response. I want to be absolutely clear here -- this is in no way a rebirth of KW Rocketry. This is just to to lighten the memory footprint of KW Rocketry using a loading method that wasn't available to Kyle and Winston when they first created their parts. If you read the full initial post (and the read me in the zip), it's pretty clear that I'm reluctant to do anything more than patch obvious bugs using Module Manager.

Because of how KSP stores data about parts, a lot of things are copied into the exact instance of a part on a vessel when launched, and a smaller amount of things are stored in the craft file. Most things set by the cfg file fit into this, a part once launched does not respect changes to it's mass, resource contents, partModules, etc, and the node positions so changing the models of a ship in flight wont change the invisible skeleton the ship is assembled to. It seems likely that MODEL{} will also he vessel locked, which may cause problems if your ship uses a model that has been 'downsized'.

We get a bit lucky as the persistence file doesn't directly reference any game assets by name or path, instead picking them up out of the part cfg. Also I'm not actually rescaling anything -- any rescaling is being done by the original KWRocketry CFGs using rescaleFactor. The "scale" values you see in the model nodes compensate for many of the original meshes being modeled at 1m/2m/3m instead of 1.25/2.5/3.75. e.g, a 1.25m part originally modeled at 1m has a scale of .8 because it was modeled at 80% scale.

Edit: I'm basically doing what Bac9 and Taverius did with their first .20.x release of B9 Aerospace. They had the luxury of actually altering the folder structure. Since I don't want to redistribute KW Rocketry, I'm doing it on the fly with Module Manager and 0-byte files to get rid of the extra files.

Edited by somnambulist
Link to comment
Share on other sites

It's nice to see someone tackling this. I had basically done something similar by hand - there's no need for three sets of decoupler, or nose cones, or fuel tanks etc. when they share the same model in different scales - so I simply placed the .cfg files for the 1m, 2m and 3m parts (naming them accordingly part1m.cfg, part2m.cfg and part3m.cfg) into the same folder with one set of model files. Saved a MASSIVE amount of memory footprint just doing that. It allowed me to put the parts I wanted into an already nearly-full build.

This method might not work for someone who's already got .craft files or existing ships using these parts (though it should), but for a new build it's perfect.

Link to comment
Share on other sites

Regarding KW abandoning the mod, Kyle has told me they have no intentions of continuing work on it.

Can't say I blame him one bit...probably what I would do too in his situation after what happened. Kinda sad that jerk players and rude Dev drive away such an awesome modder.

Glad to see KW getting some much needed love. Hope maybe Kyle & Winston will hand over the project to someone so it never dies fully.

Link to comment
Share on other sites

Can't say I blame him one bit...probably what I would do too in his situation after what happened. Kinda sad that jerk players and rude Dev drive away such an awesome modder.

Glad to see KW getting some much needed love. Hope maybe Kyle & Winston will hand over the project to someone so it never dies fully.

Agreed, on all points. So many of these parts are perfect fits for my designs, I'm rather lost without them.

Link to comment
Share on other sites

So... does this require ModuleManager, or can I just install it over KW without MM?

It needs module manager to work. If you install it without module manager, the duplicate models will be replaced by the stock fin model (http://wiki.kerbalspaceprogram.com/wiki/AV-T1_Winglet) that I chose simply because it was the smallest model in the stock install. I could do this without MM but that would require redistributing all the original CFG files from KW.

And thanks everyone for the positive feedback. If it's true that K&W have left us for good, I'd be willing to take over maintenance on KW Rocketry. No new parts (I'm not a modeler outside of 3d renderings of cereal boxes) but bug fixes and compatibility with future versions of KSP would be possible.

Link to comment
Share on other sites

If anyone wants to help me out, I could use a 1-poly model with two, small flat color textures exported out of Unity as MBMs. That might save a bit more RAM and should let me get rid of the PNGs I'm using to keep the part loader happy.

Why not use TGA in smallest compression? They take up much, MUCH less space, and since they won't be used anyway, the texture quality doesn't matter. I'd provide you some if I knew how :S

Link to comment
Share on other sites

Will try it out tonight, sounds great!

I may consider releasing it and a 5m rescale if KW officially abandon the mod or if a forum moderator approves of the dervivative work.

Just to set the record straight - moderators can not approve any derivative work. Infact it's illegal for them to do so. Only original authors have a legal right to do so.

Link to comment
Share on other sites

Agreed, on all points. So many of these parts are perfect fits for my designs, I'm rather lost without them.

I agree - it would be sad for KW to be lost forever. The parts are beautiful, and as far as I know it's the only source for 5m parts needed for certain large designs.

If Kyle and Winston truly don't want to continue, hopefully they will consider passing the torch to someone who is willing and able. Their work deserves to live on - and no point in punishing everyone for the behavior of a few.

Link to comment
Share on other sites

Why not use TGA in smallest compression? They take up much, MUCH less space, and since they won't be used anyway, the texture quality doesn't matter. I'd provide you some if I knew how :S

I want MBMs so I can just overwrite the existing assets. The part loader will load ALL recognized files in GameData even if they're not referenced by a CFG or a MU. Overwriting the duplicates with much smaller assets just makes the install easier and keeps the part loader happy.

Also I'm not too worried about the size overhead an a 16px flat color texture. :)

Link to comment
Share on other sites

Will try it out tonight, sounds great!

Just to set the record straight - moderators can not approve any derivative work. Infact it's illegal for them to do so. Only original authors have a legal right to do so.

True I should clarify -- there's no license included with KW so I'm presuming standard US copyright laws are in effect (yes copyright law is crazy/murky. US terms are pretty restrictive.). I feel pretty comfortable in releasing patches for KW as Module Manager CFGs as I'm not redistributing the original work or affecting their original vision in any way. It gets murkier when you start talking about rescales. Is that fair use or is it a derivative work? For now I prefer to err on the side of caution.

Link to comment
Share on other sites

Rather than overwriting the duplicates, why not look into the method that I described? You don't need the same .mbm and .mu three times when the only difference is the scale in the .cfg. You just need to put all the part .cfgs into a folder with one set of model files.

Link to comment
Share on other sites

Rather than overwriting the duplicates, why not look into the method that I described? You don't need the same .mbm and .mu three times when the only difference is the scale in the .cfg. You just need to put all the part .cfgs into a folder with one set of model files.

Yes please! That would be amazing! I believe if Winston/Kyle arent continuing work and you try to get ahold of them,, I couldnt see why they wouldnt let you take over. It will be a sad day if KW is left to rot.

Link to comment
Share on other sites

True I should clarify -- there's no license included with KW so I'm presuming standard US copyright laws are in effect (yes copyright law is crazy/murky. US terms are pretty restrictive.). I feel pretty comfortable in releasing patches for KW as Module Manager CFGs as I'm not redistributing the original work or affecting their original vision in any way. It gets murkier when you start talking about rescales. Is that fair use or is it a derivative work? For now I prefer to err on the side of caution.

I'm not in a position to discuss legallity or illegality of what you're doing or planning to do since I'm not a laywer. My comment above is merely intended to point out that moderators can not allow nor disallow any re-use because we have no authority over it.

Link to comment
Share on other sites

There is a licence include with KW Rocketry, and this is quoted below for convenience.

Place GameData folder in main KSP directory to install and do the same with the Ships folder if you want to try some example rockets.

By Winston and Kickasskyle.

Do not redistribute.

Link to comment
Share on other sites

Rather than overwriting the duplicates, why not look into the method that I described? You don't need the same .mbm and .mu three times when the only difference is the scale in the .cfg. You just need to put all the part .cfgs into a folder with one set of model files.

Your way would work and, in fact, I had KW setup that way for awhile. But there are two problems:

1. I'd have to either redistribute KW files or write a batch script and at least one shell script to move the files around. A LOT of files and folders need to be moved, renamed or deleted for this approach to work.

2. There are a few instances of different models using the same textures (the SRBs off the top of my head). There I'd have to rename the models and change the model name in the CFG. I'd be stuck distributing modified CFGs, patching on the fly with MM, or writing a script.

Also my method is not using the same mu/mbm 3x. Ok the placeholders are duplicates, but we're talking about < 100kb in each part folder instead of 8+ MB.

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