Jump to content

[1.10] Tilt'Em (Planetary axial tilt)


Dagger

Recommended Posts

One Issie I notice with this mod is that surface markers  end up underground when the planet turns around it axis

J6z3K0J.jpg

It mainly a cosmetic issue because when you load the vessel, it position itself at the the correct location at the surface

 

Edited by FreeThinker
Link to comment
Share on other sites

7 hours ago, FreeThinker said:

One Issie I notice with this mod is that surface markers  end up underground when the planet turns around it axis

J6z3K0J.jpg

It mainly a cosmetic issue because when you load the vessel, it position itself at the the correct location at the surface

 

Have you tried it in 1.1? You can get it from appveyor-> artifacts but you will have to install Kopernicus as well. I'm on holidays but if the error exists in 1.1 please do a GitHub bug report and I will look at it next week ;)

Edited by Dagger
Link to comment
Share on other sites

36 minutes ago, Dagger said:

Have you tried it in 1.1?

How do we get 1.1?  Your GitHub page includes only a 1.0 release.

I've also added further information regarding the issue I reported on GitHub.

 

Edited by OhioBob
Link to comment
Share on other sites

@Dagger is the tilt angle currently defined by the combination of TiltX and TiltZ?

Or is one of them "inclination" and another one "longitude of the ascending node" for the equatorial plane of the planet relative to the ecliptic (i.e. all planets with equal TiltX have axes with the same angle to the ecliptic)?

Link to comment
Share on other sites

2 hours ago, OhioBob said:

How do we get 1.1?  Your GitHub page includes only a 1.0 release.

I've also added further information regarding the issue I reported on GitHub.

 

Go to the appveyor build:

https://ci.appveyor.com/project/gavazquez/tiltem

Then go to the artifacts tab. Bear in mind that you need Kopernicus installed.

It's still not in releases as I want to be sure that the bug you put on GitHub is resolved. Once I'm back home on Tuesday I'll have a look at it

1 hour ago, Pand5461 said:

@Dagger is the tilt angle currently defined by the combination of TiltX and TiltZ?

Or is one of them "inclination" and another one "longitude of the ascending node" for the equatorial plane of the planet relative to the ecliptic (i.e. all planets with equal TiltX have axes with the same angle to the ecliptic)?

1.1 version has tiltz and tilx

Edited by Dagger
Link to comment
Share on other sites

4 hours ago, Tonas1997 said:

Has anyone tried to use this in KSP 1.3.1?

I tried the first version of this mod in 1.3.1, and it seemed to work with no other mods installed. When I installed other mods that modify planets (Kopernicus+Principia) the game still loaded, but no celestial body had axial tilt. This was in no way surprising.

Edited by Spica
clarification
Link to comment
Share on other sites

1 hour ago, Dagger said:

It's still not in releases as I want to be sure that the bug you put on GitHub is resolved. Once I'm back home on Tuesday I'll have a look at it

I just tested it in 1.1 and, unfortunately, the bug I reported is still there.  I left an additional comment about it on GitHub.

Link to comment
Share on other sites

2 hours ago, Spica said:

I tried the first version of this mod in 1.3.1, and it seemed to work with no other mods installed. When I installed other mods that modify planets (Kopernicus+Principia) the game still loaded, but no celestial body had axial tilt. This was in no way surprising.

Yeah, those planet packs will probably require custom configs. But thanks, will give it a try in RSS!

Link to comment
Share on other sites

7 hours ago, Dagger said:

Have you tried it in 1.1? You can get it from appveyor-> artifacts but you will have to install Kopernicus as well. I'm on holidays but if the error exists in 1.1 please do a GitHub bug report and I will look at it next week ;)

I'm having this same issue in 1.1.

I'm also having a much more annoying issue that pretty much breaks the mod for me, not sure if anyone else is having the same issue. Basically the rotation of Kerbin in the tracking station seems to work fine, but it doesn't work correctly when viewed from vessels. Kerbin is tilted, but its axis of rotation is still vertical. So, instead of the axis of rotation going through the poles as it should, the poles just rotate around a point ~23 degrees off. This is very strange, as it only seems to affect certain vessels, possibly anything launched after I installed this mod? For example, I put a plane on the North pole to see if seasons would work properly and they did not. Meanwhile, if I load up a vessel that's been orbiting Kerbin since before I installed the mod, everything seems to be working fine. Any clue what's causing this?

EDIT: Turns out it's actually not an issue of whether the vessel was there before I installed the mod, it seems instead to be caused by vessels on Kerbin rather than orbiting something. So, from the perspective of a rocket that hasn't been launched, things won't work. But if that same rocket is in orbit, things work fine. Very strange.

Edited by ZingidyZongxxx
Link to comment
Share on other sites

11 hours ago, ZingidyZongxxx said:

I'm having this same issue in 1.1.

I'm also having a much more annoying issue that pretty much breaks the mod for me, not sure if anyone else is having the same issue. Basically the rotation of Kerbin in the tracking station seems to work fine, but it doesn't work correctly when viewed from vessels. Kerbin is tilted, but its axis of rotation is still vertical. So, instead of the axis of rotation going through the poles as it should, the poles just rotate around a point ~23 degrees off. This is very strange, as it only seems to affect certain vessels, possibly anything launched after I installed this mod? For example, I put a plane on the North pole to see if seasons would work properly and they did not. Meanwhile, if I load up a vessel that's been orbiting Kerbin since before I installed the mod, everything seems to be working fine. Any clue what's causing this?

EDIT: Turns out it's actually not an issue of whether the vessel was there before I installed the mod, it seems instead to be caused by vessels on Kerbin rather than orbiting something. So, from the perspective of a rocket that hasn't been launched, things won't work. But if that same rocket is in orbit, things work fine. Very strange.

Yes I am having this issue as well. Everything looked wonderful from the tracking station until I went in to launch a vehicle. I was trying to find my launch window when I realised that KSC was rotating under the equator the entire time (tilt seemed to be totally locked all of a sudden. Also, another strange thing I am seeing when in orbit is the whole galaxy swaying back and forth. It's all very weird.

Edited by marcushouse
Link to comment
Share on other sites

5 hours ago, marcushouse said:

Yes I am having this issue as well. Everything looked wonderful from the tracking station until I went in to launch a vehicle. I was trying to find my launch window when I realised that KSC was rotating under the equator the entire time (tilt seemed to be totally locked all of a sudden. Also, another strange thing I am seeing when in orbit is the whole galaxy swaying back and forth. It's all very weird.

Yep that's exactly what I have as well.

Link to comment
Share on other sites

So, huh, how is the cfg supposed to be used? Are the first numbers the celestial bodies in some sort of order and the second number the axial tilt of that body? So if I wanted to apply it to RSS*, do I need to figure out which planet/moon is 0, which one is 1, etc and then write the axial tilt. And if so, how do I figure out which one is which?

 

*Stock Size RSS, TBH

Link to comment
Share on other sites

22 minutes ago, juanml82 said:

So, huh, how is the cfg supposed to be used? Are the first numbers the celestial bodies in some sort of order and the second number the axial tilt of that body? So if I wanted to apply it to RSS*, do I need to figure out which planet/moon is 0, which one is 1, etc and then write the axial tilt. And if so, how do I figure out which one is which?

The format is changing in the next release.

https://github.com/LunaMultiplayer/TiltEm/blob/master/TiltEm/TiltEm.cfg

Link to comment
Share on other sites

22 minutes ago, juanml82 said:

So, huh, how is the cfg supposed to be used? Are the first numbers the celestial bodies in some sort of order and the second number the axial tilt of that body? So if I wanted to apply it to RSS*, do I need to figure out which planet/moon is 0, which one is 1, etc and then write the axial tilt. And if so, how do I figure out which one is which?

Version 1.0 references the body by index number, but that has changed in v1.1.  But it's still a work progress, and there are likely more changes are on the way.  So I recommend you just sit tight for a little while and wait until Dagger has worked out all the bugs.

Link to comment
Share on other sites

22 hours ago, ZingidyZongxxx said:

I'm having this same issue in 1.1.

I'm also having a much more annoying issue that pretty much breaks the mod for me, not sure if anyone else is having the same issue. Basically the rotation of Kerbin in the tracking station seems to work fine, but it doesn't work correctly when viewed from vessels. Kerbin is tilted, but its axis of rotation is still vertical. So, instead of the axis of rotation going through the poles as it should, the poles just rotate around a point ~23 degrees off. This is very strange, as it only seems to affect certain vessels, possibly anything launched after I installed this mod? For example, I put a plane on the North pole to see if seasons would work properly and they did not. Meanwhile, if I load up a vessel that's been orbiting Kerbin since before I installed the mod, everything seems to be working fine. Any clue what's causing this?

EDIT: Turns out it's actually not an issue of whether the vessel was there before I installed the mod, it seems instead to be caused by vessels on Kerbin rather than orbiting something. So, from the perspective of a rocket that hasn't been launched, things won't work. But if that same rocket is in orbit, things work fine. Very strange.

 

11 hours ago, marcushouse said:

Yes I am having this issue as well. Everything looked wonderful from the tracking station until I went in to launch a vehicle. I was trying to find my launch window when I realised that KSC was rotating under the equator the entire time (tilt seemed to be totally locked all of a sudden. Also, another strange thing I am seeing when in orbit is the whole galaxy swaying back and forth. It's all very weird.

Already answered on GitHub but I will answer here aswell.

When you are below a certain altitude KSP tilts THE SKYBOX and not the planet. This means that all the planets, the sun and the skybox that is behind them is moved around the sky, this is why when you go to map view and your vessel is landed / at low altitude you won't see kerbin tilted and you will see a weird "jittering" when looking at the sun from the map view). Once you go to a higher orbit, KSP switches the mode and then THE PLANET is tilted and the skybox is static.

This is how KSP works and it works fine, it's the expected behavior. If you want to check if this system works, just warp until the North Pole is in winter and land there with a plane. If you see the sun then there's a bug, if there is dark all the time then it's fine.

Base your tests on facts and not on what you "see" as KSP had to do a lot of hacks to be able to work on unity ;)

 

Edited by Dagger
Link to comment
Share on other sites

4 minutes ago, Dagger said:

This is how KSP works and it works fine, it's the expected behavior. If you want to check if this system works, just warp until the North Pole is in winter and land there with a plane. If you see the sun then there's a bug, if there is dark all the time then it's fine.

That's exactly the problem I have actually. In fact, there is no "winter" or seasons at all for that matter. The sun will rise and set the exact same way for the entire year.

Link to comment
Share on other sites

22 hours ago, ZingidyZongxxx said:

That's exactly the problem I have actually. In fact, there is no "winter" or seasons at all for that matter. The sun will rise and set the exact same way for the entire year.

Then probably there's a bug when tilting the planetarium. I will have a look at it during the week

Link to comment
Share on other sites

14 minutes ago, lajoswinkler said:

@DaggerCan you tell us how to use this mod for custom made planetary bodies? I'd like to include it in one mod.

It's just a proof of concept at this stage. I'm trying to fix some of the bugs, once they are fixed it will work as a plug-in for Kopernicus

Link to comment
Share on other sites

On 10/26/2018 at 1:27 PM, Dagger said:

I'm still not satisfied with the "TILTX" and "TILTZ" names... There must be some more technical name...

The standard astronomical convention is to use the right ascension and declination of pole (α0 and δ0 in figure 1 of https://astropedia.astrogeology.usgs.gov/download/Docs/WGCCRE/WGCCRE2015reprint.pdf).

They probably don't map directly to the numbers you use: (90° - α0, 90° - δ0, W) are ZXZ Euler angles, i.e., the rotation of 90° - αis about the celestial north Z, the rotation of 90° - δ0 is about the rotated X axis (lying on the celestial equator, 90° - α0 from the origin of right ascension), and the reference system used is right-handed (with Z being celestial north).

From a cursory reading of your code, you seem to be applying those rotations around X and Z in left-handed, Y-up reference systems instead (it's not clear to me which one is applied first when starting from the celestial frame), so that the transformation between (TILTX, TILTZ) and (α0, δ0) would be nontrivial.

Link to comment
Share on other sites

On 11/6/2018 at 10:35 AM, eggrobin said:

The standard astronomical convention is to use the right ascension and declination of pole (α0 and δ0 in figure 1 of https://astropedia.astrogeology.usgs.gov/download/Docs/WGCCRE/WGCCRE2015reprint.pdf).

They probably don't map directly to the numbers you use: (90° - α0, 90° - δ0, W) are ZXZ Euler angles, i.e., the rotation of 90° - αis about the celestial north Z, the rotation of 90° - δ0 is about the rotated X axis (lying on the celestial equator, 90° - α0 from the origin of right ascension), and the reference system used is right-handed (with Z being celestial north).

From a cursory reading of your code, you seem to be applying those rotations around X and Z in left-handed, Y-up reference systems instead (it's not clear to me which one is applied first when starting from the celestial frame), so that the transformation between (TILTX, TILTZ) and (α0, δ0) would be nontrivial.

Yeah also the TiltX and TiltZ should be relative to the ecliptic and at this moment they are relative to the unity "world" axis so they must be worked on... Hopefully I will get into this once I manage to fix the bug described below :)

--------------------------------------------------------------------------------

I've been stuck with a bug and perhaps someone can help me on that...

The basic idea of this mod is that on every CelestialBody_update of the planets if we are NOT rotating with the planet, I tilt the celestial frame of that body as seen in here and here. If the planetarium was tilted (more about this later) then it must be reset to the default state, this is done here. Fortunately this whole tilting of planets didn't caused much issues and it's what the released version 1.0.0 does

The problem is that whenever you're below 100k meters of a planet, landed or in the KSC, the ROTATING FRAME is triggered and then you rotate WITH the planet and the planetarium is moved around instead. This basically means that the main body you're orbiting becomes static and the sun and all the other planets are moved around (basically what Aristotle said ;)). To properly apply axial tilt I had to tilt the planetarium celestial frame as it's shown here and here. Also, if before entering the rotating frame your planet had a tilt, it must be removed and set it to 0 as it's done here. This behavior was not existing on version 1.0.0 and this means that when you're landed or below 100k meters you don't see any axial tilt...

This new functionallity caused several issues and here I explain how I solved them...

1: The orbit of the packed vessels and planets must be tilted aswell! This is done by tilting the orbit frames here just before their orbit calculations are done. This doesn't apply to unpacked vessels (more about them below)

2: As the whole universe is tilted, all the vessels that are unpacked (with orbitdriver mode set as "track physics") including the active vessel must be moved to the new universe-tilted position.

IMPORTANT NOTE: In KSP, whenever a vessel is unpacked the orbit is updated based on the current vessel position otherwise, when the vessel is packed (with the orbitdriver mode set as "update") the orbits are updated on every frame and then, the vessel is moved to there the orbit says it should be

To fix this behaviour, I put the orbit driver of unpacked vessels (including your own active vessel) to "Update" mode for 1 frame, this makes the vessel go to where the orbit specifies and then it returns back to it's "track physics" mode. This is done here

------

This new functionallity mostly work fine, however there are some bugs in the positioning as you can see in this gif:

https://i.imgur.com/lIO3aVv.gif

As this detail image shows, the orbit "end" is not the same when the planetarium is tilted

prXiA2r.png

 

Does someone know what could be happening with the orbit vector? For that particular case I had to apply a rough correction of:

tilt = new Vector3d(tilt.x - 4, -10, tilt.z - 2);

To the planet tilt when applying it to the planetarium here but it doesn't make any sense and I only got those numbers by trial and error and the might be different if the planet tilt varies or perhaps even if the vessel orbit is different.

 

In case you want to test it yourself, get a debug build (so you have the debug panel and you can change the rotating frame) hereRemember that you need to have kopernicus installed!

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