Azimech

Proposals for improvements in the physics system

22 posts in this topic

In a way KSP's physics are already the most advanced in the entire gaming sector. I have a few ideas to improve it even further. @JPLRepo, you might like this.

1. Thermodynamics is missing something vital.

A: Heat transfer is between parts on the same craft only. Even when colliders of different craft are touching each other, there is no conduction. That's like touching a hot kettle with your bare hands and having a magic shield protecting you.

How I would do it:
Collider interaction obviously uses and generates numbers. I would use force as a multiplier (there's a big difference between you stroking the bear and the bear hugging you). If there's friction (no comment) I would use that as another multiplier.

B: I understand we can't have convection between different craft, it would be unbelievable without fluid dynamics. But transferring heat through radiation should be possible. I once made a thermal bomb, gave it an incredible amount of energy and heat (white hot, numbers off the scale) and placed it at 1cm next to a different craft. The other craft remained at ambient temperature.

How I would do it:
Sources of light ignore colliders in KSP which is a shame but we can live with it. To reduce the number of calculations, I would use the same formula for light (inverse square law), use a distance drop-off curve more aggressive than real life but not ignore colliders this time.

 

2. If you create this module, a whole new world will open for countless possibilities.

What is it? An optional module to transfer (predefined) resources and/or commands via touching colliders on separate craft.

What good would this do for the player?

A: Basically copying the functionality of certain mods, you can transfer science data via the "Super-duper-touch-me-anywhere-data-port" in the nosecone when two spaceplanes kiss each other on the surface of Minmus. Other data might be transferred between touching kerbals, I don't know.

B: It would facilitate the creation of switches, relais, valves, timers, electrical motors, alternators, actuators etc. You could create anything, even computers.
More importantly, it would make the distinction between parts in the tree and separate craft more vague. The ability to transfer resources would open the door to stock robotics without potential problems like the IR team is facing from time to time.

How I would do it:
Resource transfer has had a big upgrade recently and it's great. As we all know, resource transfer has fixed flow values. I would make them configurable for modders. Via the context menu, I would give the user the ability to choose flow direction. I would also give the user the ability to create separate circuits through the context menu: the part interacting with the collider of the separate craft (for example a shaft) would have a context menu with the ability to split ElectricCharge into EC_Circuit1, EC_Circuit2 etc. Also I would change the way control surfaces, landing gear etc. work: the user chooses in the editor which resource and which circuit it would use. No resource available means no movement.
Last but not least: like Advanced Tweakables I would make it an option in the main menu. With a warning.

 

That's it for now.

3 people like this

Share this post


Link to post
Share on other sites

I could imagine your `touching colliders` being used for in-air refuelling.

I agree with pretty much everything you have said.

I especially like that you have presented a solution to each of the presented issues.

It would be great if @SQUAD could fold in some of these to their dev work.

1 person likes this

Share this post


Link to post
Share on other sites

1. Although I've never played with thermal transfer, it seems weird touching colliders doesn't transfer heat between craft. Your magic kettle analogy makes this quite clear. i agree with modeling at least thermal radiation, and your proposed method seems reasonable, but how would it take surface area into account? Like if a part was at an angle to the heat source or completely flat on. I would assume so, as the (ray tracing? not sure of the term) would apply different amounts of heat to different areas. Currently, how is varying levels of temperature taken into account or would the system have to be modified to take it into account?

2. This seems cool. I fully support the idea to finally be able to create part transfers between moving objects. Though, then the question is does every part transfer say, fuel/EC/data? Like, would an antenna transfer LF? I definitely agree with this being an option in the main menu. Also, I hope the whole circuit thing would have an inuitive menu system. Like, click on a resource generating/storing part and drag it to the parts you want to add to the circuit.

Also just imagine on EVA, scientists having to share data by hugging each other. Seems ... kinda weird. Maybe a better idea is an action menu option for EVA kerbals to "transfer data", similar to the "Review data", but with the added option to selectively transfer data (although I'm personally not sure the benefits). After the action is completed, maybe have a fancy graphic/animation of the two kerbals passing a notebook or thing of papers?

 

Anyway, liking the ideas.

1 person likes this

Share this post


Link to post
Share on other sites
2 hours ago, qzgy said:

1. Although I've never played with thermal transfer, it seems weird touching colliders doesn't transfer heat between craft. Your magic kettle analogy makes this quite clear. i agree with modeling at least thermal radiation, and your proposed method seems reasonable, but how would it take surface area into account? Like if a part was at an angle to the heat source or completely flat on. I would assume so, as the (ray tracing? not sure of the term) would apply different amounts of heat to different areas. Currently, how is varying levels of temperature taken into account or would the system have to be modified to take it into account?

2. This seems cool. I fully support the idea to finally be able to create part transfers between moving objects. Though, then the question is does every part transfer say, fuel/EC/data? Like, would an antenna transfer LF? I definitely agree with this being an option in the main menu. Also, I hope the whole circuit thing would have an inuitive menu system. Like, click on a resource generating/storing part and drag it to the parts you want to add to the circuit.

Also just imagine on EVA, scientists having to share data by hugging each other. Seems ... kinda weird. Maybe a better idea is an action menu option for EVA kerbals to "transfer data", similar to the "Review data", but with the added option to selectively transfer data (although I'm personally not sure the benefits). After the action is completed, maybe have a fancy graphic/animation of the two kerbals passing a notebook or thing of papers?

 

Anyway, liking the ideas.

1.  About surface area and angles, that's a good point. I think it would be too costly to calculate all angles. Maybe it could be done, assuming as sphere, using octants and facing the largest surface: no angle = 100% radiance, 45 degrees on XY= -20%; 45 degrees on XZ = another -20% etc. But I'm no mathematician. Since physics is simplified anyway, maybe it would be best to ignore angles at this point. I'm also no specialist on the subject of thermodynamics.

2. I think the modder should define what kind of transfer should be possible. I agree, transfer of LF through an antenna would be a bit far fetched. What I said about kerbals touching each other was ... a little joke.

 

1 person likes this

Share this post


Link to post
Share on other sites
8 hours ago, Azimech said:

Since physics is simplified anyway, maybe it would be best to ignore angles at this point

Then the question is whether the heat transfer by radiation is calculated by the closest distance, or to the CoM of the part. Maybe it would be best to calculate a projection and an average distance of the immediately visible to the part, assuming we are treating it as a point source of heat. Which then asks the question is it a point source, emanating heat in a perfect sphere? I'm not sure how good of a model that would be though. Radiators for example don't project all of the heat from one single point, heat tends to radiate from all points of the radiator, and more so in certain places (the big flat part) than others (the edge). So, how would that be modeled? I guess one of the ideas is to model it as a flashlight, similar to the current stock lights, instead bathing parts with heat, not light. (this could also open the door to stock heat lamps, maybe to tan kerbals?). But then you fall into the problem of having to model heat in a much more complex way

After a point, it's how real do we make this? Easiest way and simplest is to simulate the CoM of a heated part as a point source of heat, emanating in a perfect sphere, dissipating according to inverse square, affecting other parts based on the distance to the center of mass.

I also am not a specialist on thermodynamics, nor a mathematician, nor a programmer.

1 person likes this

Share this post


Link to post
Share on other sites

It is however, a fascinating subject. Let's see if we can find a specialist.

1 person likes this

Share this post


Link to post
Share on other sites

Not a specialist, but I have some (not as much as I'd prefer) technical experience.

 

Terminology becomes extremely important for accuracy.  You're both correct and incorrect to state that radiators radiate unevenly in a predictable pattern, but you're incorrect to refer to "points."  Rather, radiation (all kinds, including thermal) radiates from *surface area.*  That's why radiators in vehicles and air conditioners have so many tens of thousands of delicate little metal fins in a grid-like pattern, because the design calls for exposing as much surface area to airflow as possible.  With that improved terminology, you can then correctly state that large flat surfaces radiate more effectively for a given mass of matter than the edge-face surfaces might.

 

And remember that even for a piece of paper, the edge of the paper IS a surface.  Nothing is two dimensional, even if it's a sheet of material only one atom thick.

 

Demonstrate this at home.  Buy two 250ml bottles of water.  Drink half of one, leave the other still sealed, and put them both in your home freezer overnight.  Let them freeze absolutely solid, all the way to the core.

 

In the morning, take them both out of the freezer and put them on separate dishes out in the open on a table or counter.  Make sure they're in equal amounts of light (if one is in bright sunlight, make sure the other is too.)  Leave them to melt unattended for about two hours.

 

When you return, observe how far along each is in the melting process.  If you did this correctly, you'll likely find that the half-emptied example has less of a percentage of its contents in solid ice form than does the one still containing the full amount.  Both have melted some, of course, and one had more ice to begin with.

External heat and thermal energy can only enter through the exterior surface of the ice, and that surface extends to the shape of the bottle that contains it, along with whatever flat spot there was for the air that was also trapped in the bottle at the same time.  The full bottle might have more absolute surface area in terms of how many square centimeters there would be (surface area of a cylinder is π•(length)•r^2) but with the smaller mass of ice, there is MORE surface area as a proportion of the overall mass of the water molecules.

In other words, as heat penetrates and melts the ice, the melting only propagates at a specific rate past the surface.  For round figures, let's imagine that the the heat can melt the ice away at a rate of 1cm per hour.  With the smaller mass, there's less ice leftover AFTER you melt away that outer centimeter than with the full container.

 

Now, take the larger and as-yet-still-mostly-ice bottle and carefully smash it against something sturdy that one break.  Shield your eyes in case the plastic bottle breaks or leaks, or a chip of ice flies offin a random direction.  The edge of a stone staircase or the jutting corner of a brick wall would do nicely.  Make sure the ice inside fractures or shatters.

 

Note two hours later how much more quickly that chunk of ice is melting.  Heat can now radiate into the ice crystals across all the new surface area introduces by the fractures and breakages.  You're now melting thousands of tiny ice chunks instead of one large chunk, and overall liquefication is faster.

 

As to Kerbal Space Program.  I would imagine that parts are considered point sources of heat. But I submit that there might be some surface area calculations involved either as to surface facing, or as to radiation shadows, since the aerodynamics of the stock game do take into account SOME aspect of how the model collision meshes present to the airstream during atmospheric conditions.

 

Of course, this can all be manipulated or enhanced with mods, of course.

4 people like this

Share this post


Link to post
Share on other sites

Thanks @MisterFister, your really took the time to write this one!

Meanwhile someone else wrote this:

 

Share this post


Link to post
Share on other sites

For 1: Recall that additional fidelity for the thermal model must be balanced against performance concerns. These additional checks and calculations must be done for every single part within the physics sphere, and the cases they handle are usually edge. (Inb4 "Make it an optional toggle!" to which I respond "consider the opportunity cost, developer time is scarce and could be used for other things")

For 2: I'm not clear how resource transfer between different craft would enable robotics. Care to elaborate?

Share this post


Link to post
Share on other sites
1 minute ago, Red Iron Crown said:

For 1: Recall that additional fidelity for the thermal model must be balanced against performance concerns. These additional checks and calculations must be done for every single part within the physics sphere, and the cases they handle are usually edge. (Inb4 "Make it an optional toggle!" to which I respond "consider the opportunity cost, developer time is scarce and could be used for other things")

For 2: I'm not clear how resource transfer between different craft would enable robotics. Care to elaborate?

1: To reduce load, radiance should be towards other craft only. The amount of calculations can be reduced even further: if no separate craft is within the radiance sphere, nothing will be calculated.

2: As you're probably aware there are multiple ways to transport a gas, fluid or electron stream from a static origin onto a moving carrier. A big example can be found in every modern car: hydrodynamic bearings and hydrostatic bearings. An opening on the shaft's surface might work as a rotating valve, accepting pressurized fluid every rotation. This fluid can be used to actuate or lubricate certain components.
Another fine example is the generators or electric motors using a commutator and carbon brushes, technology in use since 1832.

Literally, the possibilities are endless.

Simplified for use in KSP. We're all used to switching focus whenever we want to manipulate a separate construction like an axle or shaft. The ability to transfer a specific resource would remove this requirement.

Share this post


Link to post
Share on other sites

I just don't see the need to enhance the thermal system further. Two craft at any significant temperature touching is such a niche case in KSP, you are almost always dealing with one or two craft in space (ideally not touching until docked), and at those points temperature isn't a concern 99% of the time.

Answer me these:

How many circumstances would the mechanics you're suggesting enhance gameplay/increase immersion?

Is the development cost (time and money) worth it for the amount of gameplay the player will get out of the mechanic?

In my opinion, advanced thermodynamics doesn't pass this test. It's too niche.

2 people like this

Share this post


Link to post
Share on other sites
55 minutes ago, Azimech said:

1: To reduce load, radiance should be towards other craft only. The amount of calculations can be reduced even further: if no separate craft is within the radiance sphere, nothing will be calculated.

It's still more calcs than we have now, and will be in effect for every part in the bubble every time a staging or docking event event occurs.

55 minutes ago, Azimech said:

2: As you're probably aware there are multiple ways to transport a gas, fluid or electron stream from a static origin onto a moving carrier. A big example can be found in every modern car: hydrodynamic bearings and hydrostatic bearings. An opening on the shaft's surface might work as a rotating valve, accepting pressurized fluid every rotation. This fluid can be used to actuate or lubricate certain components.
Another fine example is the generators or electric motors using a commutator and carbon brushes, technology in use since 1832.

Literally, the possibilities are endless.

Simplified for use in KSP. We're all used to switching focus whenever we want to manipulate a separate construction like an axle or shaft. The ability to transfer a specific resource would remove this requirement.

I think you're approaching adding moving parts in KSP from the wrong direction. IMO it's way better to use the IR approach of having it be one craft with parts that create articulation between leaves of the part tree rather than enhancing the ability of two class in close proximity to work like one. I suspect very, very few players ever use the latter technique, while an update or DLC full of stock hinge, swivel and other articulated joint parts would likely be immensely popular.

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

 

2 hours ago, RatchetinSpace said:

I just don't see the need to enhance the thermal system further. Two craft at any significant temperature touching is such a niche case in KSP, you are almost always dealing with one or two craft in space (ideally not touching until docked), and at those points temperature isn't a concern 99% of the time.

Answer me these:

How many circumstances would the mechanics you're suggesting enhance gameplay/increase immersion?

Is the development cost (time and money) worth it for the amount of gameplay the player will get out of the mechanic?

In my opinion, advanced thermodynamics doesn't pass this test. It's too niche.

 

2 hours ago, Red Iron Crown said:

It's still more calcs than we have now, and will be in effect for every part in the bubble every time a staging or docking event event occurs.

I think you're approaching adding moving parts in KSP from the wrong direction. IMO it's way better to use the IR approach of having it be one craft with parts that create articulation between leaves of the part tree rather than enhancing the ability of two class in close proximity to work like one. I suspect very, very few players ever use the latter technique, while an update or DLC full of stock hinge, swivel and other articulated joint parts would likely be immensely popular.

 

Within the limitation of the space game I understand you completely. However, I'm talking about the (far) future, a much wider market than this niche of space exploration. Right now we're building rockets by stacking tanks. I'm talking about building engines, transmissions and possibly weaponry for completely different products. I don't think it's a coincidence Take-Two Interactive is the new owner. KSP has the best editor on the market, however crude and unpolished it might be. I believe the physics and the editor were the main selling points, not the space simulation.

 

Edit: take a look at this hangar, Almost every week I can add designs by multiple users nowadays. People who love building engines out of rocket and airplane parts, even if inefficient and crude. And this hangar is just for engines that burn fuel. Another one could be created for stock electric motors.

https://kerbalx.com/hangars/6515

Edited by Azimech
2 people like this

Share this post


Link to post
Share on other sites
On ‎2017‎-‎06‎-‎28 at 7:29 PM, Azimech said:

1: To reduce load, radiance should be towards other craft only. The amount of calculations can be reduced even further: if no separate craft is within the radiance sphere, nothing will be calculated.

I vehemently disagree, at least to the extent that you exclude the notion of usefulness of other possibilities.  After all, aren't certain specific parts more likely to radiate heat?  Aren't certain parts more vulnerable to overheating?  Just as we'd care to shield a heat-vulnerable part from heat sources within the same craft, so too would we not want to limit its opportunity to receive potentially destructive radiated heat from adjacent craft, particularly when docked if in space, or parked near each other when land based?

Share this post


Link to post
Share on other sites
8 minutes ago, MisterFister said:

I vehemently disagree, at least to the extent that you exclude the notion of usefulness of other possibilities.  After all, aren't certain specific parts more likely to radiate heat?  Aren't certain parts more vulnerable to overheating?  Just as we'd care to shield a heat-vulnerable part from heat sources within the same craft, so too would we not want to limit its opportunity to receive potentially destructive radiated heat from adjacent craft, particularly when docked if in space, or parked near each other when land based?

So you're saying you wouldn't want a limit on the distance right? Well ... it's true it wouldn't be realistic.

And without a limit some people would probably start to develop thermonuclear warheads. Just because they can XD

Share this post


Link to post
Share on other sites
13 hours ago, Azimech said:

And without a limit some people would probably start to develop thermonuclear warheads. Just because they can XD

Not probably. Will.

Share this post


Link to post
Share on other sites
On 6/27/2017 at 9:49 AM, Azimech said:

But transferring heat through radiation should be possible.

I just don't see this as an interesting use case.

The amount of radiated thermal flux goes with the fourth power of the temperature... and the heat received goes with the inverse square of the distance.

Translation:

  • Ships wouldn't radiate enough heat to affect one another significantly.
  • Ships wouldn't be close enough to each other for radiated heat to affect one another significantly.

Unless you had two craft that are so close they're practically touching, and one of them is blazing at thousands of degrees, there's just not going to be much heat transfer.  Could you model it?  Sure.  But if the effect is only to warm up another craft just a degree or two-- or even a hundred degrees-- it would have pretty much negligible effect on gameplay.

So modeling this would be a big development effort, and eat up large amounts of players' CPU power, in exchange for modeling something that has trivially small effect on the game play, to the point that players wouldn't even notice that it's there.

 

3 people like this

Share this post


Link to post
Share on other sites

I agree that ship-to-ship heating should be rather minor.  But I'd love to see a more interesting per-ship thermal model.  Real-life spaceships have a lot of machinery for temperature control, and working out those details was a big part of the progression that we like to roleplay in KSP.  Too hot in the sun, too cold in the dark; squishy people inside need one temp, machinery another, fuel tanks yet another, waste heat coming off electronics, etc.  I'd love to see a system where pods overheat when in the sun around the inner planets (unless you install a radiator system), freeze in the dark side of orbits or by the outer planets (requiring EC to run heaters, or things will lose controllability), etc.

There was once a RealHeat mod before my time; AFAICT it was mainly an improvement to aerodynamic heating that has since been mostly incorporated into the base game and didn't look at ECS.  Kerbalism made some noise about environmental control systems; last I looked it was on indefinite hold.

This could be something as simple as a small constant core temp generator attached to pods and probe cores (to simulate electronics waste heat) plus an inverse-square skin heat from solar exposure (same math as for solar panels).  Mostly just thinking out loud here.

1 person likes this

Share this post


Link to post
Share on other sites
1 hour ago, fourfa said:

I agree that ship-to-ship heating should be rather minor.  But I'd love to see a more interesting per-ship thermal model.  Real-life spaceships have a lot of machinery for temperature control, and working out those details was a big part of the progression that we like to roleplay in KSP.  Too hot in the sun, too cold in the dark; squishy people inside need one temp, machinery another, fuel tanks yet another, waste heat coming off electronics, etc.  I'd love to see a system where pods overheat when in the sun around the inner planets (unless you install a radiator system), freeze in the dark side of orbits or by the outer planets (requiring EC to run heaters, or things will lose controllability), etc.

There was once a RealHeat mod before my time; AFAICT it was mainly an improvement to aerodynamic heating that has since been mostly incorporated into the base game and didn't look at ECS.  Kerbalism made some noise about environmental control systems; last I looked it was on indefinite hold.

This could be something as simple as a small constant core temp generator attached to pods and probe cores (to simulate electronics waste heat) plus an inverse-square skin heat from solar exposure (same math as for solar panels).  Mostly just thinking out loud here.

It could be cool to have some form of temperature dependent operation. My main concern with this would be that this will make the already sheer learning wall even higher.

On another note, does the current RTG produce any heat whatsoever? Or is it just a "free electricity box" at the moment, with no downsides except weight?

Share this post


Link to post
Share on other sites

There is noise in the tooltips about heat, and quite a few lines in the config related to heat (I think).  But I've certainly never noticed any effect in the game.

Share this post


Link to post
Share on other sites

I imagine an Extraplanatary-Launchpads recycler (as an example of interesting use of colliders) that doesn't recycle, but instead transfers resources in or out.

And it is glorious.

1 person likes this

Share this post


Link to post
Share on other sites
5 hours ago, Snark said:

I just don't see this as an interesting use case.

The amount of radiated thermal flux goes with the fourth power of the temperature... and the heat received goes with the inverse square of the distance.

Translation:

  • Ships wouldn't radiate enough heat to affect one another significantly.
  • Ships wouldn't be close enough to each other for radiated heat to affect one another significantly.

Unless you had two craft that are so close they're practically touching, and one of them is blazing at thousands of degrees, there's just not going to be much heat transfer.  Could you model it?  Sure.  But if the effect is only to warm up another craft just a degree or two-- or even a hundred degrees-- it would have pretty much negligible effect on gameplay.

So modeling this would be a big development effort, and eat up large amounts of players' CPU power, in exchange for modeling something that has trivially small effect on the game play, to the point that players wouldn't even notice that it's there.

 

True, for normal KSP usage it's not worth the effort. However, it becomes interesting when you're building engines. I predict for a future product there will be a more pronounced emphasis on detailed engineering. And for the current product, imagine a toggle in the settings menu for the players who want it, "Advanced Thermals".

Maybe you've noticed, it's becoming increasingly popular to build your own engines in KSP. I sincerely hope this trend will continue.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now