R-T-B / Kopernicus

Kopernicus is a mod for Kerbal Space Program which allows users to replace the planetary system used by the game.
GNU Lesser General Public License v3.0
32 stars 11 forks source link

comet tails follow whichever star is closest to the camera. #23

Open WhirligigGirl opened 4 years ago

WhirligigGirl commented 4 years ago

from one angle it follows the big star (Kaywell) image

from another it follows the small star (Limnell) image

Not sure what the physically correct behavior would be--ion tail pointing at some weighted center of where the illumination is coming from? Two ion tails with different brightnesses depending on the illumination source)

An easier solution might be to have the comet tail always follow only the star which the comet receives the most heat from.

R-T-B commented 4 years ago

"An easier solution might be to have the comet tail always follow only the star which the comet receives the most heat from."

Yep, that is the eventual plan.

I am thinking next release maybe we should turn off the stock asteroid generation by default, and have them opt-in. Thoughts on the default until we have better control?

R-T-B commented 4 years ago

I will be reimplementing comets hopefully over the next week in Kopernicus code like we do for asteroids. While I'm at it, I'll make sure this code becomes star-aware. Right now it obviously is not.

WhirligigGirl commented 4 years ago

for what it's worth, I asked my friend Dr. Alicia Aarnio, a stellar physicist, about how the comets should behave.

Gregrox: can you help me answer a question about comet tails? Here we have a comet orbiting two stars. How would the tails behave? Would there be two ion tails, one for each star? Would the ion tail point away from some weighted center of where both starlight is coming from? What if the comet were between two stars? currently, the implementation of comets in this game supports only a single star. For my modded three-star system, the comet's tail changes where it's pointing based on the position of the camera.

Dr. Alicia Aarnio Hmm, I can try- that's a really good question. Orbiting a single star, the ion tail would always point radially away from the star. For a double star system, it would depend what the net stellar wind flux is on the comet from both stars. This, in turn, depends on the masses and ages of the stars in the system. If they were both main sequence, I'd wager the ion tail would point away from the more massive star. If the low-mass star is pre-main sequence, well.. M dwarfs are kind of a different beast altogether, they have higher levels overall of activity. We don't know much about stellar winds because they're extremely hard to measure, but you could guess that M dwarfs probably have more frequent coronal mass ejections, so the comet might have an ion tail that mainly points away from the higher mass star, but has sporadic shifts in direction as the M dwarf activity happens.

R-T-B commented 4 years ago

So in a simple sim, point away from the star with the highest flux-at-location probably? Because we can do that.

7ranceaddic7 commented 4 years ago

Umm, I think in a simple system (all things being otherwise equal) a coment tail would be the result the combined radial vector. I think the Kerbal-verse is all main sequence stars. So, pointing mostly away from the highest-flux star but not completely perpendicular.

R-T-B commented 4 years ago

Umm, I think in a simple system (all things being otherwise equal) a coment tail would be the result the combined radial vector. I think the Kerbal-verse is all main sequence stars. So, pointing mostly away from the highest-flux star but not completely perpendicular.

That could be done. It's slightly more complicated math but nothing terrible. As long as it doesn't present a horrendous code challenge in some way (it shouldn't) this is probably what I'll attempt.

WhirligigGirl commented 4 years ago

Umm, I think in a simple system (all things being otherwise equal) a coment tail would be the result the combined radial vector. I think the Kerbal-verse is all main sequence stars. So, pointing mostly away from the highest-flux star but not completely perpendicular.

main sequence stars can have vastly different luminosities. The relative luminosity must be accounted for.

7ranceaddic7 commented 4 years ago

I don't know one way or the other, what fluxes are modeled in Kopernicus?

R-T-B commented 4 years ago

I don't know one way or the other, what fluxes are modeled in Kopernicus?

Basically, we use the ingame flux system just multiplied by more stars. So vessels in KSP have a function I can call to get "flux at location" which is essentially the amount of energy hitting a vessel at a location in space. With Kopernicus, we can do that too, we just have an additonal parameter for a star. So we can directly ask the game how much energy at a location is coming from a given star (this is also how autotracking decides what to track on panels).

After determining that, we can then determine the direction of the star relative to the craft (comets are modeled as vessels, believe it or not, in game logic). Then, we can do whatever we want to model it based on those two paraemeters basically.

So for KSP, it's pretty simple. Flux is just energy emitted from a star.

R-T-B commented 4 years ago

This is going on the backburner for a tiny bit though, my workload at work has increased, and CKAN of version 1.9.1 is our top priority.

I still consider these comet bugs important, just want to update you that this will probably not be happening this week.

WhirligigGirl commented 2 years ago

was this issue closed because it is not going to be supported, or because it has been fixed? I don't see anything in the changelogs about it.

R-T-B commented 2 years ago

I believe it was closed because this would be something that would require harmony, which at the time our official policy was "nope." I'll reopen it now that we actually gave in and use harmony though.

It's not fixed yet, I do not think.