Jump to content

Increase performance by...


Recommended Posts

Unloading content of cargo bays and content of fairings from physics engine.

If something is inside cargo bay just add mass of "cargo/package" to cargo bay, but don't load each part until cargo bay is opened. This would allow us to increase performance making smart builds with proper fairings.

Edited by Darnok
Link to comment
Share on other sites

Unloading content of cargo bays and content of fairings from physics engine.

If something is inside cargo bay just add mass of "cargo/package" to cargo bay, but don't load each part until cargo bay is opened. This would allow us to increase performance making smart builds with proper fairings.

You would need to turn physics back on if *any* of your connected cargo bays were open, not just the one. Otherwise it would be impossible to drive a rover out of a cargo bay with the new cargo ramp.

Link to comment
Share on other sites

If the parts are unloaded from physics, how are you going to keep them attached to the craft? How would the parts know where to go if there's no physical interaction between them and the rest of the rocket?

They would just cease to be modeled as parts -- the cargo bay would be modeled as a lumped solid if it (and all connected bays) were closed.

The parts would only spawn when the cargo bay doors are opened. This has the implication of all of the parts being unusable when the doors are closed (which is really annoying for fuel cells, batteries, monoprop tanks, etc.) but it would prevent physics from rattling the parts around in the bay.

I don't think it would matter much performance wise because the reduction in part count is marginal, unless you haul a 150-part station core up in your SSTO.

Link to comment
Share on other sites

I don't think it would matter much performance wise because the reduction in part count is marginal, unless you haul a 150-part station core up in your SSTO.

IMO if you make 50 parts lander with cargo bay and put 50 part rover/miner/lab inside ability to land with 50 part craft instead of 100 near planetary base with some ~100 parts would reduce lag.

Link to comment
Share on other sites

The parts would only spawn when the cargo bay doors are opened. This has the implication of all of the parts being unusable when the doors are closed (which is really annoying for fuel cells, batteries, monoprop tanks, etc.) but it would prevent physics from rattling the parts around in the bay.

Making a battery physicsless while in a closed cargo bay would not prevent access to its ElectricCharge. We know this because we used to have batteries which were physicsless all the time, and they still worked.

Link to comment
Share on other sites

IMO if you make 50 parts lander with cargo bay and put 50 part rover/miner/lab inside ability to land with 50 part craft instead of 100 near planetary base with some ~100 parts would reduce lag.

Ok, but you'll still have to open the cargo bay/whatever to get the rover/miner/lab out which means you'd be having 200 parts at the scene at some point anyway. Though I grant you, there would be an initial benefit.

Making a battery physicsless while in a closed cargo bay would not prevent access to its ElectricCharge. We know this because we used to have batteries which were physicsless all the time, and they still worked.

Physicsless != unloaded. I believe OP is proposing that parts inside cargo bays are unloaded from the physics engine and their mass added to the cargo bay, I guess similar to how the Hangar mod works.

Link to comment
Share on other sites

Ok, but you'll still have to open the cargo bay/whatever to get the rover/miner/lab out which means you'd be having 200 parts at the scene at some point anyway. Though I grant you, there would be an initial benefit.

I don't mind having 200 parts after landing, I do mind having 50 part less while landing, for my CPU it is noticeable difference :)

Physicsless != unloaded. I believe OP is proposing that parts inside cargo bays are unloaded from the physics engine and their mass added to the cargo bay, I guess similar to how the Hangar mod works.

I have no idea how unity works, so pick whatever works better to improve performance and what is easier to implement.

EDIT: I read about this mod and IMO those parts should be physicsless it should work good enough, we don't need new mechanic.

Edited by Darnok
Link to comment
Share on other sites

EDIT: I read about this mod and IMO those parts should be physicsless it should work good enough, we don't need new mechanic.

Physicsless doesn't mean what you think it means. It just means that it's mass is added to its parent part. Any forces (lift, drag, inertial, w/e) are still applied to it, the game still needs to calculate physics for it (I could be wrong though).

Link to comment
Share on other sites

Physicsless doesn't mean what you think it means. It just means that it's mass is added to its parent part. Any forces (lift, drag, inertial, w/e) are still applied to it, the game still needs to calculate physics for it (I could be wrong though).

Wait... lift and drag isn't calculated inside cargo bays right now? I want to remove as much as possible physics from parts inside cargo bays as long as bay is closed. I don't mind loading textures and shapes of those parts, but any periodic checks should be disabled.

Link to comment
Share on other sites

Physicsless doesn't mean what you think it means. It just means that it's mass is added to its parent part. Any forces (lift, drag, inertial, w/e) are still applied to it, the game still needs to calculate physics for it (I could be wrong though).

The forces are still calculated but they are calculated as if the 'physicsless' part was part of its parent. So if the physicsless part has a drag coefficient, that is added to the parent's drag coefficient and the parent drag is calculated from that.

Correct me if I'm wrong on that...

Link to comment
Share on other sites

There is actually a checkbox selection in the debug menu for drag, with regards to physicsless parts.

Two Options for Drag:

-Drag is applied at the physicsless part = just like it sounds

-Drag is applied to the parent = The physicsless part calculates it's drag, then applies the resulting force to the parent. It does not pass up a drag coefficient.

Physicsless parts used to be largely ignored by the physics engine. That's not really the case anymore, so the name is a bit of a misnomer.

On the topic of unloading parts in the cargo bay...

While I'm not trying to get hung up on terminology, unload has a specific meaning in the internals of KSP. It's technically impossible to send only part of a craft on-rails, pakced, or unloaded within the current construct of the game's code. That would result in instant ship-shredding kraken attacks.

What is more practical, would be full deletion of those parts from the scene, and replacing them by adding a "dummy load" of mass, resources, ect. to the cargo bay itself. However, there would be a lot of problems with that, and a lot of assumptions that would need to be made (which may or may not be true).

It's an interesting concept though, so might be worth thinking about in some form.

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