Jump to content

N-body physics


N-body physics in KSP2  

244 members have voted

  1. 1. Will n-body physics be implemented in KSP2?

    • Yes
      39
    • Yes, as a hard mode setting
      72
    • No
      109
    • Don't care, just want more explosions
      24


Recommended Posts

You seem to be confusing the question between what do we want in the game and what do we expect will be in the game.

But for me the answer to both of those is "No."

I don't know what they will do, but I expect it'll be something akin to Sigma Binaries.

Edited by 5thHorseman
Link to comment
Share on other sites

On 8/22/2019 at 10:38 AM, KerikBalm said:

704px-Lagrange_points2.svg.png

just a quick question: Do I spy, with both my eye, that no lagrange points are actually stable. Like I know that L1, L2 and L3 are semi-stable and have sort-of-orbits possible around them, but earlier in the thread I got the impression that L4 and L5 are stable. And while they are equilibriums, they don't seem to be stable equilibriums looking at the chart.

Link to comment
Share on other sites

40 minutes ago, nikokespprfan said:

Do I spy, with both my eye, that no lagrange points are actually stable.

You do spy that no Lagrange points are statically stable, in the sense that none are points of minimum potential energy.  L4 and L5 are maxima.

The stable orbits around L4 and L5 follow constant-energy loops around the points, and are persistent orbits because there are not so many ways to lose total energy in this rotating reference frame.  These points can even collect asteroids.

Link to comment
Share on other sites

18 minutes ago, OHara said:

You do spy that no Lagrange points are statically stable, in the sense that none are points of minimum potential energy.  L4 and L5 are maxima.

The stable orbits around L4 and L5 follow constant-energy loops around the points, and are persistent orbits because there are not so many ways to lose total energy in this rotating reference frame.  These points can even collect asteroids.

yeah, but not regular orbits in the sense that we know of them in KSP 1. What a bummer really, that a system of on-rails SOI's in the lagrange point places doesn't work like real life does, as was discussed earlier in the thread. This makes me know just how valuable the "binary systems are like bodies orbiting a barycenter with combined mass"-perspective is.

Link to comment
Share on other sites

6 hours ago, OHara said:

You do spy that no Lagrange points are statically stable, in the sense that none are points of minimum potential energy.  L4 and L5 are maxima.

The stable orbits around L4 and L5 follow constant-energy loops around the points, and are persistent orbits because there are not so many ways to lose total energy in this rotating reference frame.  These points can even collect asteroids.

Technically, the L4 and L5 points are only stable if one of the bodies is approximately 25 times (or more) more massive than the other body. But yes, the L4 and L5 points have the capacity to be stable.

Link to comment
Share on other sites

12 hours ago, nikokespprfan said:

just a quick question: Do I spy, with both my eye, that no lagrange points are actually stable. Like I know that L1, L2 and L3 are semi-stable and have sort-of-orbits possible around them, but earlier in the thread I got the impression that L4 and L5 are stable. And while they are equilibriums, they don't seem to be stable equilibriums looking at the chart.

As quoted from wikipedia:

Quote

The L4 and L5 points are stable provided that the mass of the primary body (e.g. the Earth) is at least 25[note 1] times the mass of the secondary body (e.g. the Moon).[17][18] The Earth is over 81 times the mass of the Moon (the Moon is 1.23% of the mass of the Earth[19]). Although the L4 and L5 points are found at the top of a "hill", as in the effective potential contour plot above, they are nonetheless stable. The reason for the stability is a second-order effect: as a body moves away from the exact Lagrange position, Coriolis acceleration (which depends on the velocity of an orbiting object and cannot be modeled as a contour map)[18] curves the trajectory into a path around (rather than away from) the point.

Now in my custom system, I have what is effectively a double planet system, although it doesn't seem as extreme as Rask and Rusk. I added a Mars based planet (Rald), and I put it where Duna was, and I put Duna in orbit around it. The mass ratio of Rald to Duna was about 3:1. Rask and Rusk look to me like the mass ratio is below 2:1.

It was already enough to cause weird things to happen:

wmGaZMk.png

That was without defining the SOI, and letting KSP calculate it. As you can see, that orbit is not even close to right.Where the blue circle intersects the red circle, the pull from the planets would be equal, but using that as the SOI value is not good at all, because SOIs are not at all spherical in a case like this (as for the distance, I had Duna and Rald tidally locked, and that was the distance that gave an acceptable day length, which was 3 kerbin days)

I manually specified the SOI so that the SOI boundary would be where pull is equal along a line from Duna to Rald, but this meant that you could orbit just ahead or just behind Duna, without falling into duna, at a distance where you really should.

So... I've been experimenting with double planets in KSP already, and they don't work right without  N-body physics.

The system works fine with Principia though

17 hours ago, swankidelic said:

If they can do Lagrangian points with patched conics, I won't lament the absence of N-body physics. Really, that's what it comes down to. 

They can't

*edit*, off topic shots of the binary system:

Spoiler

I0JMy8x.png

rWzuGb8.png

FZV4Zu0.png

 

 

Edited by KerikBalm
Link to comment
Share on other sites

Just simulating n-body orbits at one-tick-per-tick would be way less demanding of the computer than Unity physics of a single rover on the ground. The hard part is drawing the future orbit paths.

Link to comment
Share on other sites

  • 4 weeks later...
On 8/20/2019 at 8:54 PM, TBenz said:

N-Body physics entails a lot more than just unstable orbits. I'd love to be able to park a station at a lagrange point.

And, for what it's worth, requiring RCS to automatically stabilize the orbit still has relevant gameplay. Namely that it requires you to design stations and satellites with the facilities to stay in orbit, and either regularly supply them or plan around them having a limited functional lifespan.

I seriously doubt N-Body physics will happen, because it will add a lot of complexity to both the code and gameplay, but there could be some nice benefits nonetheless.

This!  I have wanted to use Lagrange points for so long..... maybe its just all that Gundam I've watched over the years....

Link to comment
Share on other sites

On 8/22/2019 at 3:26 PM, DStaal said:

An interesting thought experiment would be a hybrid system: Keep the planets on rails, and have say up to 2x(low-orbit) on patched conic, and put high-orbit and above into a modified N-Body, with just planetary and solar influences counted.  (No other ships.)

That would eliminate most of the stationkeeping, provide the Larage points and most gravity assists, while keeping computational cost fairly minimal.  It'd also provide a graduated learning curve for the players to adjust to - with most players really only being exposed to N-Body during transfers.

This seems like the best compromise to me so far.

Link to comment
Share on other sites

I think N body would be too complex and costly and not bring a lot to the table.

The real interesting things from N body are Lagrange points, ITS low energy  transfers and halo orbits. 

Out of those, the only one with gaming potential are the L points. They could put them in as on-rail virtual planets with very low gravitational potential. That would simulate them well enough and avoid all the problems of orbit keeping.

It would allow to park a fuel depot at L1 for example, which would be awesome.

 

Link to comment
Share on other sites

On 9/19/2019 at 5:47 AM, Muetdhiver said:

I think N body would be too complex and costly and not bring a lot to the table.

The real interesting things from N body are Lagrange points, ITS low energy  transfers and halo orbits. 

Out of those, the only one with gaming potential are the L points. They could put them in as on-rail virtual planets with very low gravitational potential. That would simulate them well enough and avoid all the problems of orbit keeping.

It would allow to park a fuel depot at L1 for example, which would be awesome.

 

If universe sandbox can do it as well as it does then why not KSP?

Universe sandbox is also built on unity and the only confusing part about it really is predicting orbits when not close to a single large body.  I also don't see why an on-rails system couldn't exist simultaneously with an N-body simulation. If the game could ignore masses of player made crafts and maybe smaller, asteroid like,  satellites, reducing the number of bodies to compute it shouldn't be very taxing, especially with the lack of using multi-threading so far. why not move all gravity calculations to a separate thread?

Its not like the game's using other cores, that all of us have and have been waiting to use. Plus this frees up more space on the 1 core that is running rigid body physics maybe getting.

Instead of using patched conics perhaps we could watch a predicted path being calculated as we see the line of trajectory grow. maybe this could end up troublesome for multi year long timewarps...

Edited by mcwaffles2003
Link to comment
Share on other sites

I don't think the issue with n-body (or some limited approximation of it) is the difficulty of computing it, it's the gameplay complications. You'd need to re-think trajectory and orbit planning, have some way of automating orbit keeping and/or finding stable orbits, and that sort of thing. It would basically introduce another layer of complexity into an already complex game. That could be a real problem, introducing frustrating busywork or making it unreasonably difficult to do stuff that's currently already pretty difficult, like planning orbits in the Jolian system.

I did not originally like the idea at all, and in fact would still not like it in a single-solar-system game; however with the interstellar dimension it would be a shame if there aren't binary star systems or similar things to find and explore, and those really are difficult to make at all convincingly without more than 2-body physics. I think some fudged/simplified version of it could be the best solution, e.g. where only systems where the relative masses are big enough get extra computations. So the Kerbol system would still work more or less as it does now except maybe with Lagrange points (except maybe Duna/Ike?) but Rask/Rusk, binary stars, and other cool stuff would get extra computations.

Link to comment
Share on other sites

Has anyone on this thread used Principia? I'm curious what the actual size of perturbations is. If I put a craft in LKO say 80x80, with whatever inclination is worst how long will it be before the orbit is perturbed enough to enter the atmosphere?

The difficult part of n-body physics is that you can no longer use simple eclipses to draw orbit lines. The step up in processing power required to go to 3 body is going to make the additional step to go n body look insignificant.

I  think an optional system of n-body where each craft could optionally be configured to automatically spend station keeping fuel to maintain itself on a patched conic like orbit could be an interesting way to go.

Link to comment
Share on other sites

https://megagames.com/news/kerbal-space-program-2-wont-have-n-body-physics

 

Quote from end of article:

 

That's not to say that Star Theory isn't working on it. It's just not something that will come to the game at launch. It will continue to develop the game's physics system after the game's debut, potentially introducing new physics effects as time goes on, piecemeal.

“A real n-body system will evolve over time, and it might have dire consequences for your save game, if you’re playing over thousands of years and building up an interstellar civilisation," Simpson said.

 

 

Link to comment
Share on other sites

Or, via PC Games N:

“If you take the Kerbal system from the original game, and you apply n-body physics to that, the solar system disassembles and starts to fire moons at planets,” creative director Nate Simpson says (via Edge, issue 337). “In general, I think that’s where we come up against this game being a game.”

Which made me think - could you add 'lagrange points' as small SOIs in their own right.  Orbiting 'on rails' around the grandparent-body so they didn't orbit their parent (eg; Kerbin L1 & L2 simply orbit the sun slightly closer and further away than the planet itself, while L3 - L5 share the same orbit).  I have to admit that I don't know enough about how lagrange points work in real life or SOIs in KSP to tell whether that would be practical but, it seems pretty simple if it is.

Link to comment
Share on other sites

I've said this before but I think that a simplified version of n-body physics handling special cases like binaries would be the best way to go, using the system they're making anyway to handle and presumably plan brachistochrone trajectories for interstellar ships -- i.e., trajectories that involve continuous but predictably variable acceleration. 

In essence: 

(1) Bodies are still on rails and still have spheres of influence. Patched conics are still the base of the system.

(2) However: spheres of influence are allowed to overlap

In areas where spheres of influence overlap, the game precomputes a heat map of gravitational influence. The heat map will have a "watershed" line that determines which of the bodies has stronger influence. 

To compute a craft's trajectory when in that area of overlap, you start with a patched conics orbit around the stronger body, and then you apply a constant acceleration to it from the gravitational influence of the weaker body the same way as you would compute the trajectory of a starship burning its engine through a large part of the transfer. 

You could even generalise this for more than 2 bodies.

I think this would be a fairly close approximation of a true n-body solution to the problem -- no naked singularities at the barycentre or similar problems -- without having the instability or tearing up our beloved Kerbol system, and allowing you to plan orbits using the same mechanics you're using to plan brachistochrone trajectories for starships. 

(And no, it wouldn't handle Lagrange points, if you wanted those you'd need to fudge them some other way.)

Link to comment
Share on other sites

4 hours ago, Pecan said:

Which made me think - could you add 'lagrange points' as small SOIs in their own right.  Orbiting 'on rails' around the grandparent-body so they didn't orbit their parent (eg; Kerbin L1 & L2 simply orbit the sun slightly closer and further away than the planet itself, while L3 - L5 share the same orbit).  I have to admit that I don't know enough about how lagrange points work in real life or SOIs in KSP to tell whether that would be practical but, it seems pretty simple if it is.

Consider this diagram of Lagrange points, showing the lines of equal gravitational potential in the manner of a topographical map.

813_Lagrange_Contours.jpeg

The Sun and Earth are large enough to create gravity "wells", which are well approximated by spheres at short distances - hence, spheres of influence. But where they interact, the lines get messier. With the topographical analogy, the L1 through L3 are at saddle points - imagine a pass between two hills. Orbits here are unstable, and objects will tend to exit at the "downhill" areas. L4 and L5, also known as the Trojan points, are sort of wide bean-shaped hills with gentle slopes and relatively flat tops. Orbits here are stable, because the Sun and Earth tend to pull equally in all directions.

Link to comment
Share on other sites

19 hours ago, sturmhauke said:

Consider this diagram of Lagrange points, showing the lines of equal gravitational potential in the manner of a topographical map.

Perfect!

Thank you, that explains everything very clearly.  (Except, possibly, why I've never bothered to look for such a gravity-map before).

Link to comment
Share on other sites

On 9/20/2019 at 11:39 AM, tomf said:

Has anyone on this thread used Principia? I'm curious what the actual size of perturbations is. If I put a craft in LKO say 80x80, with whatever inclination is worst how long will it be before the orbit is perturbed enough to enter the atmosphere?

I'm not super familiar with it, but I remember reading somewhere that the perturbations scale inversely with the size of your solar system.  So for a real sized solar system, you're talking about tiny nudges.  But for the Kerbal system (where everything is denser and squeezed in relatively tightly), the perturbations are much more significant.

Thus, orbits that just work in real life wouldn't necessarily work in KSP due to it's rescalling of everything. 

Link to comment
Share on other sites

Well, the perturbations scale inversely with the size of the system if you keep the surface gravity the same. In reality, with the same density, doubling radius doubles surface G.

Anyway, I loaded up principia in my 3x system (which made some changes to the jool system other than just rescale), and it was fine.

It doesn't take too much to tweak the jool system to work.

On 9/24/2019 at 11:51 AM, Klapaucius said:

That's not to say that Star Theory isn't working on it. It's just not something that will come to the game at launch. It will continue to develop the game's physics system after the game's debut, potentially introducing new physics effects as time goes on, piecemeal.

A real n-body system will evolve over time, and it might have dire consequences for your save game, if you’re playing over thousands of years and building up an interstellar civilisation," Simpson said.

(bold parts modified by me)

I think we won't see it. When I first read your quotes, I thought it meant that they will progressively implement features that will evolve into N-body physics... when I read the quote, I think Nate is saying that an N-body system changes over time, and many orbits may not be stable, resulting in dire consequences, particularly for long time scales.

Thus, Nate doesn't want it, and this article may have misinterpreted what he said. Nothing that they quoted supports the idea of a piecemeal implementation of N-body.

Link to comment
Share on other sites

I still like my idea, which doesn't contradict the above: planetoids/astronomical objects on rails, patched conics below ~3x 'low orbit', N-Body above, ships don't affect each other.

This lets you put a space station in most of the common orbits (both high and low) and have it never perturb, and it means the solar system doesn't have to worry about being perturbed over time.  It allows the Larange points, the 'interplanetary transport network', and some of the gravity assists.  It would also mean the math was available and you could do special cases like Rask/Rusk - where you could pull in the patched conics limit to very low orbit.  (And you could keep the planets themselves on a patched-conics system with a fake baricenter that doesn't have an SOI.)

Biggest problem is that the SOI system is likely also a precision system: Ship locations are relative to the nearest body, so you limit floating point error effects.  This suggestion would abort that above it's patched-conics limit - though you might still be able to use the SOI system for positioning, or you might just allow solar/universal SOI and take any floating point effects.

Link to comment
Share on other sites

If anyhing i supect it will be the same on rails system weve had in KSP, if for no other reason than its simpler to put in new systemsthan to go in and hand tune each one to deal with the peculiaritys of each one, given that while you can tweek the base systrm to be stable in the current games timeframe, we still have a much larger game with a much greater timeframe, given we now have at least two new game time acselerations on topon everyting else, in addition to the inevitable loss in precision that entales.

Yes 

Link to comment
Share on other sites

I'm pretty sure it's just KSP1 with a new version of unity and the aspects of all the other space games added that don't effect the current game with a new price tag attached basically.  I guarantee you every single bug and problem related to the old game will pop up.

Edited by Arugela
Link to comment
Share on other sites

17 hours ago, Arugela said:

I'm pretty sure it's just KSP1 with a new version of unity and the aspects of all the other space games added that don't effect the current game with a new price tag attached basically.  I guarantee you every single bug and problem related to the old game will pop up.

That would mean that Star Theory is straight-out lying to us. That’s fairly drastic. Why do you believe that to be the case?

Link to comment
Share on other sites

×
×
  • Create New...