Unfortunately there is still a problem with planetary orientation for textured planets.
In versions pre 1.70, whatever
orientation = "w x y z"; (quaternion) you defined in planetinfo.plist, the planet always rotated in the same direction (around one of the internal axes, I think). The only thing that changed was the orientation
in which the texture was wrapped around the planet.
The result of this was that the rotational poles of the planet were
never the poles (= upper and lower edge) of the texture. The closest I ever got to having a planet rotate around its actual poles was with
orientation = "0.9659 0.2588 0 0";. The values represent cosine and sine of 15 degrees, meaning that there is a rotational offset of 30 degrees around the x-axis. These were the
only values producing a rotation actually around the planetary poles. You couldn't change these values without producing a planet rotating in a ridiculous way. Not a great variability for a scripter.
In 1.70 Ahruman has fixed
part of this. Now the
orientation-key actually changes the orientation of
rotation, not only the orientation of the
texture. But the
offset is still there.
This means that in 1.70 it has become impossible to have a planet rotate around the poles which are defined by its texture (the upper and lower edges).
Here's a small sample-planetinfo.plist, demonstrating the problem (my test-pilot is currently in Bixein in Galaxy 3, represented by the "2 22" in the first line; please substitute with your own current whereabouts):
Code: Select all
{
"2 22" = {
"ambient_level" = "1.0";
"script_actions" = (
"addMoon: testplanet_A",
"addMoon: testplanet_B",
"addMoon: testplanet_C",
"addMoon: testplanet_D"
);
};
"testplanet_A" = {
orientation = "1 0 0 0";
"polar_color_factor" = "2.5";
position = "50000 0 300000";
radius = 2000;
"rotational_velocity" = "12.0";
texture = "grid.png";
};
"testplanet_B" = {
orientation = "1 1 0 0";
"polar_color_factor" = "2.5";
position = "100000 0 300000";
radius = 2000;
"rotational_velocity" = "12.0";
texture = "grid.png";
};
"testplanet_C" = {
orientation = "1 0 1 0";
"polar_color_factor" = "2.5";
position = "150000 0 300000";
radius = 2000;
"rotational_velocity" = "12.0";
texture = "grid.png";
};
"testplanet_D" = {
orientation = "1 0 0 1";
"polar_color_factor" = "2.5";
position = "200000 0 300000";
radius = 2000;
"rotational_velocity" = "12.0";
texture = "grid.png";
};
}
The
rotational_velocity is really high, so the "rotation-pole" becomes immediatly visible. Here's the sample-texture belonging to this. Just move it to your desktop and name it grid.png:
You will notice that all the planets rotate in a different direction, but their rotational axis goes through the two points marked with "x",
not through the points that are north- and south-pole texture-wise.
This is a major issue for any
realistically rotating textured planet. So I hope some of you "people with magic powers who actually look into the code"
can solve it. Preferably by understanding where this roughly-30-degrees rotational offset comes from and fixing it.
Or, alternative B: make it scriptable by transforming the default offset into a
rotational_offset-key, because sometimes this kind of an offset could be useful. But generally one would expect a planet to rotate around its poles, and one would expect the poles to be represented by the upper and lower edge of its texture.