Rotation in .thn files
-
In an ambient .thn file () there is the following piece of code:
(NB Indents and tabs do not come thru the forum makeup)
template_name=“starsphere_Li07”,
spatialprops={
orient={
{
-0.727152,
-0.034093,
-0.68563
},
{
-0.046834,
0.998903,
0
},
{
0.684877,
0.032111,
-0.72795
}(N.B. the starsphere_Li07 does not exist normally; it’s a slightly moderated version of either starsphere_Li02 or starsphere_Li03)
How should I interpret these orientation values? There seem to be three sets of three, which seems to be three times as much as necessary, if this were an .ini file… I do understand though that the numbers can go from 0.0 to 1.0, buy why 3 per axis? (or, at least that’s how I’m trying to read it)
Can some enlighten me? What I’d like to know in particular is how to rotate the starsphere about -90 anticlockwise (as looked upon from above the central plane. So, the same point of view as the NavMap)
Thanks!
-
Moonhead wrote:
In an ambient .thn file () there is the following piece of code:Thanks!
Those number should be the Rotation matrix. Try this tool to calc it:
-
NeXoSE wrote:
Moonhead wrote:
In an ambient .thn file () there is the following piece of code:Thanks!
Those number should be the Rotation matrix. Try this tool to calc it:
Thanks! When I follow the link to the article, it does indeed seem to address the rotation method used in the .thn files.
However, it’s far over my head…
Oh well, it’s past 4:30 here, should go to bed anyway.
-
Moonhead wrote:
Thanks! When I follow the link to the article, it does indeed seem to address the rotation method used in the .thn files.
However, it’s far over my head…
Oh well, it’s past 4:30 here, should go to bed anyway.
Just finished my lunch LOL.
btw, don’t sleep too late or you hiting your body, best sleep time…let’s see…is ten o’clock PM.
-
there is even an excel table in our downloadssection. its called “FLOrientation”. there you could eventually understand the calculation process and reverse it so you can enter the code and get the orientation in degrees as result.
to the question of what it is:
the three first values are the x axis of the object, the second three the y and the last three the z. why three values? because it is the projection of these axises on the axises of the room they are in. the default one is```
{1, 0, 0},
{0, 1, 0},
{0, 0, 1} -
@ Gisteron: Thanks!! In comination with what I read yesterday (or tried to, rather) it does make some sense, (somewhere in the hinterlands of my neocortex
) I’m confident now that I might eventually gain some basic insight in this.
Right now I’m busy with the more mundane task of finding where the ambient coloration of the asteroids floating outside the window of my base is setup…
It’s a good thing the first few .thn files I looked into made more sense than the later ones, or I wouldn’t have bother at all. I had the (pseudo?)memory that all the lightgroups (e.g. lt_grp=23 etc.) had their own setup… But this doesn’t seem to be the case.
-
That is an identity matrix (3x3 format). If you multiply a 3d point by that you will get back the exact same point. The reason is that matrix specifies a 0 degree rotation with a scaling of 1. To have translation (position offset) it would require a minimum of a 3x4 matrix (translation is stored in the fourth row).