Jump to content

Monolithic physical structures


Recommended Posts

Apologies if this has been suggested already but I didn't see it in the already suggested list. I also feel like this is the sort of thing which probably would have been implemented if it was easy but no harm in checking right?

My idea is to cut down on the number of physics calculations the game needs to compute for very large structures by having small and light parts be rigidly connected to any heavy parts they're connected to, such that they're treated as a single physics object. I'm not sure what the best ratio for deciding when this occurs would be (maybe 3:1 or 5:1) but it would be ideal to scale the effect so that it occurs more strongly the more parts are having physics modelling applied to them. The only downside I can see to this is that if a collision occurs the spectacular spray of debris would be much smaller, with larger chunks coming off. For the sake of some degree of realism (and also probably for stability of the game engine) this effect would have to not apply through docking ports or any kind of stage separation or struts.

Any problems with this? I can't help but feel like I'm missing something obvious or else this is really hard to do for some reason.

Link to comment
Share on other sites

I think the main problem is that if one of the smaller attached pieces gets destroyed, then the larger object would also have to be destroyed.

Well, each part would be physically moved as part of a whole but could retain its own hitbox perhaps? I'm not sure how KSP handles physics but if all it needs it mass and center of mass (although you wouldn't get rotational inertia from that so I dunno) then it wouldn't be too hard to recalculate after a part is destroyed. If the rotational inertia is calculated by simply assuming a constant density of each part (probably how I would do it) then there'd need to be some new calculations to take care of that, but it shouldn't be too hard I think. The physics engine would basically be calculating this anyway in order to do its thing, this way it only needs to be calculated once then treated as a rigid body.

Link to comment
Share on other sites

I hope something is done, I like building huge structures and one that I'm working on currently has almost, if not over, 1500 parts made entirely out of stock parts. Only mod I used building it was mechjeb cuz I can't fly the core structure in space at 3 frames a second.

For the most part I see this as a non-issue. You just need to be intelligent about what you weld together:

1.5m RCS tank directly on top of a 1.5m fuel tank? Weld it.

Octagonal truss on another octagonal truss? Weld it.

Tiny, uninteresting objects like rcs thrusters or the gravioli detector? Weld it (the probability of them being hit off a fuel tank is minuscule anyway).

Solar panel? Don't weld it.

Docking port? Don't weld it.

Landing legs / landing gear? Don't weld it.

Basically weld any parts which are uninteresting from a physical perspective, or have exactly the same profile at the joint. Make sure that particularly important parts like docking ports and parachutes are flagged as unweldable.

Using this system could allow for a separate type of strut which reduces part count by forcing welding. You would have to keep the original strut to allow for stable staging, however.

Edited by SyX
Link to comment
Share on other sites

lol i think you misunderstand what kind of structure i'm building. http://terrencep.deviantart.com/art/Death-Station-Ksp-394302705

Death-Station-Ksp-394302705

I do think the hardest part of implementing this would probably be deciding when to join parts together for complex structures such as this, but it shouldn't be impossible. I assume this is joined together with docking ports? If so then the rules already outlined by myself and Syx would handle it properly.

I think Antichamber did this with its cube things. I remember in one of the dev rooms there was a wireframe view of the blocks you placed in there. If they made up a specific shape then the mesh would join into one.

What I'm proposing isn't quite the same as this, since the objects remain separate in every sense except physics interactions, so there's no joining meshes to create a single object (which is super easy with rectangular prisms but maybe not so much with complex shapes). This can preserve destruction of individual objects, although doing so would necessitate recalculating the base structure for physics interactions.

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