Jump to content

A Discussion of Gravity


willitstimothy

Recommended Posts

I know this is slightly off topic (I wrote about this in more detail as a suggestion), but as C7 is doing part development, I figured that this would be relevant. [edit] (It got moved so that makes a lot of sense)

Is it possible, or will it be possible in the future for parts to have their own micro-gravitational field with their on SOI, based upon their own mass and volume of course?

Link to comment
Share on other sites

I know this is slightly off topic (I wrote about this in more detail as a suggestion), but as C7 is doing part development, I figured that this would be relevant.

Is it possible, or will it be possible in the future for parts to have their own micro-gravitational field with their on SOI, based upon their own mass and volume of course?

would it ever even be useful? i mean you have to be billions of lightyears away from anything before such a m,icro gravity well could effect anything...even thin it\'d be something like a bolt...at like 40 kms..

Link to comment
Share on other sites

If I remember correctly, this WAS the case before .13. Harv and crew changed it, because it increased the computational time significantly (meaning low frame rates). So, with that said I\'m guessing the answer is no.

Link to comment
Share on other sites

If I remember correctly, this WAS the case before .13. Harv and crew changed it, because it increased the computational time significantly (meaning low frame rates). So, with that said I\'m guessing the answer is no.

No...each part was affected by gravity individually, instead of just the vessel as a whole.

Link to comment
Share on other sites

No...each part was affected by gravity individually, instead of just the vessel as a whole.

That is what I meant. I was not very clear. Before .13, each part was affected by gravity. This caused bad frame rate issues. As part of the optimization, Harv changed it to the ship level.

Link to comment
Share on other sites

What I mean by part gravity is explained in more detail here http://kerbalspaceprogram.com/forum/index.php?topic=10290.0.

In brief, I am not talking about the individual parts being affected by gravity, as opposed to the entire ship, rather I am asking about whether or not parts themselves would be allowed to exert their own gravitational pull on other objects, the strength, and hence SOI, of which being based on the mass and volume of the object (determined by the scale and mass in the .cfg file). I know that the gravitational pull of even the largest rockets we make would be nearly non existent, but if one orbits a rocket and then replaces one of the parts with a mod part, such as the 500 meter asteroid part, that part will have effectively been placed in orbit. If that part is one of sufficient volume and mass (as the 500 m asteroid should realistically be), then that part should be able to weakly affect objects near it, or, if those objects have very low relative velocities, even allow small parts to orbit it.

From what I have seen, in game and without, it seems that all of the physics, and related problems, have been dealt with in creating the Kerbin-Mun system, which means that, I believe, all that would need to be done to allow for large parts to have a gravitational pull is add a few parameters and the game's ability to interpret them, at the very least, to the part configuration files.

Edited by willitstimothy
Link to comment
Share on other sites

If I\'m reading your post correctly we\'ll need n-body physics to do that, or you\'d need to give each part or vessel their own SoI wich would be a lot of bother for essentially zero return and the effects would be very weird and hard to control.

Anyway, it\'s my understanding that the one of the long term goals for the devs is to ad the ability to ad custom planets to the game which honestly is the better way to solve your problem.

Link to comment
Share on other sites

Basically like @rusty wrote: if you are any closer to anything, the gravity of that part would get overwritten by that anything. If you are a billion lightyears away from a sun and are trying to make an orbit around another rocket ~100km away - you won\'t be able because its gravity is still to non-existent compared to that sun. I don\'t see how that would be useful. Now 500m asteroid has gravity pull so weak that you could get to its orbit by jumping up, and if you drop something while standing on it, it will fall for hours... And that\'s a 500m (!) asteroid. 100m rocket would be irrelevant...

Link to comment
Share on other sites

I think I know what willitstimothy wants, and no there\'d be no point in providing gravity and SOI\'s to our individual rocket parts, far too much overhead for the very few times it\'d even be detectable.

There may be plans in future to allow modders to add planets though, and any modded in planed can have whatever gravity and SOI the modder sets, if that planet happens to be a 500 meter boulder then you\'d have your asteroid to try landing on, or if that planet were set in a highly elliptical orbit you\'d have a nice comet.

HarvesteR has stated he wants to make KSP as open to modders as possible, so I would assume that means orbiting bodies as well.

Link to comment
Share on other sites

Just taking a cursory look through things, I don\'t believe we are going to see parts with their own gravity wells anytime soon. (I\'m still getting up to speed with the internals of the game. There is a lot of source code...).

The orbits are linked to celestial bodies, and gravity in that regard is purely simulation based. Its perfectly possible to script up an attractive force though in unity. It wouldn\'t produce proper orbital behavior and such, but it may help to have you 'stick' to things. PQS is very powerful, so its quite easy to make an asteroid / planetoid / what have you. So when the time comes, I\'m sure there is going to be planets all over the place. :)

Link to comment
Share on other sites

If any of you read my actual post, and subsequent comments, you would have found basically all of the answers that you just gave me, and you also would have found my workarounds to those 'problems.'

@Thiel and C7Studios

You won't need to consider anymore than one object at a time, unless of course you have to consider a collision of two very large objects, which could easily be made an exception (for the sake of the game's physics engine).

...the physics of allowing for these could be treated the same as Mun which orbits Kerbin which in turn orbits Kerbol, where the addon minor planets and part micro-gravities are treated as extensions of their parent body and have micro-sized (size determined by mass) fields of influence. In other words, while orbiting Mun (being affected by Mun's gravity) one is also orbiting (and being affected by) Kerbin because Mun is orbiting Kerbin and in turn one is also orbiting (and being affected by) Kerbol because Mun is orbiting Kerbin which is orbiting Kerbol.

Which is essentially what you said C7studios.

The orbits are linked to celestial bodies, and gravity in that regard is purely simulation based.

@Serratus and sal_vager:

It seems, to me anyway, that exceptions based upon part mass and part volume (for game stability) would take care of clutter and game overhead due to modeling multiple SOI, as stated in my post.

If part gravity was based on mass in a semi-realistic way, the fields of influence for large space debris etc.

(even with the scale of 10 factor that ksp uses), for purposes of the game, would only need to be as much as a few kilometers

across or less. Furthermore small objects, like most of our rockets would not have the ability, unless modified, to generate

a field of influence large enough or strong enough to affect anything. But large objects, or ones properly modified by dreaming

kerbalnauts would have the ability to affect objects that passed within a kilometer or two, or even be orbitable if the

magnitude of the velocity vectors of the objects were within a couple of meters per second of each other.

I would then propose at this point that objects with masses such that their practical SOI was less than say 500 (between 100-1000) meters above their 'highest' surface point, or that had a volume less than another cutoff point (if you modified a part like a decoupler, in its configuration file, to have a very large mass, the small SOI would have gravitation approaching the strength of a sigularity at the surface of the part, which could cause the game to crash)*, the object would be considered to have no gravitational field.

By 'practical SOI,' I mean an SOI such that anywhere within it the body would be able exert an acceleration greater than say 0.1 m/s per .0625 to 10 minutes on an object in its vicinity.

And one last thing:

Why do we go into orbit around Mun when Kerbin, which has much stronger gravity is 'nearby?' Or for that matter, why do we orbit Kerbin or Mun when Kerbol is 'nearby?'

The fact of the matter is is that we are orbiting (and being affected by) Kerbin while orbiting Mun, or Kerbol while orbiting Kerbin or Mun..

...just indirectly.

Hence, orbiting relatively small objects is perfectly possible, as long as the velocity vectors are fairly close in value. Don't get me wrong though, you'd have to get very close to be able to actually be affected by even the largest of mod objects that one could indirectly 'place' into orbit.

What's the purpose? Well, it's been my experience that even in games that are very open to modding, it becomes far more difficult to create and modify objects with higher complexities, especially for users with less programming experience, than it is to create or modify relatively simpler objects. Hence, it makes sense to add the, already realistic, ability to have sufficiently large parts have their own gravity in this game. You wouldn't be able to have an atmosphere or any number of other special effects, but at least you could make a rock to keep you company on a very long trip to a far away planet without having to know internals of the game as well.

Sorry for going off topic that much. I intended for people to simply read what I had written already and then give their answers based on that.

Edited by willitstimothy
Link to comment
Share on other sites

If I\'m reading your post correctly we\'ll need n-body physics to do that, or you\'d need to give each part or vessel their own SoI which would be a lot of bother for essentially zero return and the effects would be very weird and hard to control.

Wouldn\'t it make more sense to add an option for parts to have a SoI/set a size for it, so that you could put your asteroids in orbit without overly lagging the game by forcing it to calculate whether objects are in the SoI for everything.

Link to comment
Share on other sites

Man, 3 weeks is not a lot of time! I'm starting to feel the pressure of the looming feature review date... I've been spending a good bit of time working on tools to help me make parts, and to learning / playing catch up with the other devs on the project. I hope everyone will be happy with what manages to make it in this update. I'm doing my best!

Really? Well I guess you haven't been trying to land on part asteroids due to boredom during the last three weeks. I'm dying for more places to go and rendezvous to make that will let me tack onto something else, and we're not even going to get more than half of that.

Whatever, do a good job...and it looks like you are.

Edited by willitstimothy
Link to comment
Share on other sites

Really? Well I guess you haven\'t been trying to land on part asteroids due to boredom during the last three weeks. I\'m dying for more places to go and rendezvous to make that will let me tack onto something else, and we\'re not even going to get more than half of that.

Whatever, do a good job...and it looks like you are.

He\'s doing everything he\'s assigned to do. Planets aren\'t planned for 0.15, and neither is the silly 'part gravity' concept. It would be much effective to make a plugin to do it only to specific parts, rather than reworking the game code and adding a lot of stress on the engine for something you\'d never see until you have incredibly large parts...

Link to comment
Share on other sites

...we're not even going to get more than half of that.

I know, I said as much, and I do realize that C7 is not responsible for that stuff anyway. Also I realize that we won't get planets for quite a while hence we won't get 'more than half' of what I said. I realize that the release of more planets will be at the time that gas giants can be modeled accurately, but still Mun is very limited in its attractiveness. Currently, beyond building Mun bases (which for some reason the game blows mine up after so many runs) and getting as close as possible to Kerbol without crashing are the only things to do.

I am sorry to seem like I was pressuring you. It was not intended, and I recognize now that your life does indeed go beyond working on this program, i.e. it isn't your sole job. I was not aware of the extent of the non-standard nature of this project. I apologize.

By the way, thanks for calling reality, and my ideas silly.

Edited by willitstimothy
Link to comment
Share on other sites

I\'ve never called your ideas silly. If I did somehow imply that, please point it out to me in a PM, as that certainly wasn\'t my intent.

I\'m just trying to explain how things work and the limitations that are currently in place. I\'ve even taken some time to discuss your ideas with the team to see if it was plausible to implement.

Reality is not silly, its quite fantastic. But its not practical or possible to come anywhere near its simulation without a super computer on hand. Sacrifices are made to divert processor time to the physics of a compartmentalized ship, and procedural terrain generation systems.

Link to comment
Share on other sites

The reason I consider it silly is because it would be basically un-noticable until you get a massive object - in which case it would be better to make a specific plugin for that purpose until asteroids are added to the game proper.

Link to comment
Share on other sites

@NovaSilisko

It would be much effective to make a plugin to do it only to specific parts, rather than reworking the game code and adding a lot of stress on the engine for something you'd never see until you have incredibly large parts...

Why?

Doesn't the game at execution load all the parts involved? Why not just add in (I know I must be wrong...it can't be simple right?) a check at part loading to see whether a part has a mass and volume (for the sake of game stability) that is compatible with the part having an SOI. If it doesn't, nothing changes. If it does then the game can then check to see if that part is in use and, if it is, if it is a part of dynamic ship or a static 'ship.' If it meets the mass and volume requirements and also is a part of a static 'ship' then it can have an SOI, otherwise not.

Then all you need is a specific part ID, to differentiate between instances that are a part of dynamic ship vs. those that are a part of a static ship, that is never the same for the 'same' part. But you already have this, in a way:

part = smallfuelTank_4294771432

part = smallfuelTank_4294780418

Same part, two different ships, and the numbers tacked onto the end are different (though initially similar).

If the volume doesn't matter (from what I now understand, the acceleration is constant, and only varies because of simulated change), then forget that check.

Edited by willitstimothy
Link to comment
Share on other sites

My point is that it would be a lot of effort for very little work to do it in the game itself, with an automatic calculation of the mass and density. The_Duck made a black hole plugin and if I remember right, they had their own gravitational fields. So, use a variation of that plugin, make a module named LargeBody or something, input gravitational parameters in the cfg, and you have yourself an asteroid you can land on.

In fact, I might just do that myself.

Link to comment
Share on other sites

I\'m not sure if a plugin could allow you to change SoI into it though as far as the game is actually concerned with the rails system.

I do agree though, that a massive part with an SoI isn\'t the best way of doing things. Firstly, the collision mesh would be very limited and considering that the max part size possible is around 2km, then the gravity would have to be unrealistically strong for the size to be able to land on it.

'Simply' adding a SOI is hard. It\'s all tied into the 'Celestial' code stuff.

Also I don\'t understand your static and dynamic ship stuff well... you wouldn\'t need that even if you did add it.

But trust us... adding this is VERY VERY hard. The soi system works by actually making everything move around you, instead of the other way around. I could imagine this creating some problems.

I\'d go as far to say that adding a per-part SoI would take longer than actually released a mod tool to create new planets, and asteroids, and moons.

Link to comment
Share on other sites

Here\'s the black hole part : http://kerbalspaceprogram.com/forum/index.php?topic=8868.0

It won\'t add an SOI, but it can pull you towards itself, just turn off the teleporting part of the plugin so you can land, The_Duck said it\'s buggy though.

I wouldn\'t mind seeing an asteroid or comet with some gravity myself as well.

Edit: Here is Jellycubes asteroid : http://kerbalspaceprogram.com/forum/index.php?topic=7844.0

Insert blackhole into asteroid, turn off wormholes, add more gravity, profit?

Edit2: I\'ll just leave this here for the curious http://blogs.discovermagazine.com/badastronomy/2012/04/18/space-firm-about-to-make-a-big-announcement-i-take-a-stab-at-what-it-is/

Link to comment
Share on other sites

Another thing to keep in mind, asteroids will probably be procedurally generated with PQS, not parts or anything. In that case, they could possibly have their own SoI if large enough. Smaller ones could be pushed around with rockets perhaps...

Link to comment
Share on other sites

'Wormholes - alphav1' doesn't work in 14.4. I tried using it already by placing the black hole parts at the center a static asteroid part via persistent in 14.4. It didn't work. But that's just me. Also, given an asteroid made of some sort of dense metal, i.e. lead, the gravitation of a 2 km part could realistically be enough to land, and even orbit if the velocity vectors of the objects were within a couple of meters per second of each other. Rovers wouldn't work pretty much at all though.

Edited by willitstimothy
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...