caduceus and neocaduceus

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Makara wrote:
Ahhhh - so you are saying that the original quaternion (1 0 0 0) was a rotation about an undefined axis.
No, (1 0 0 0) is simply the normal, unrotated quaternion.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
Makara wrote:
Ahhhh - so you are saying that the original quaternion (1 0 0 0) was a rotation about an undefined axis.
No, (1 0 0 0) is simply the normal, unrotated quaternion.
To be specific: given an axis [x, y, z] and a twist angle α, the quaternion is (cos α, x sin α, y sin α, z sin α). Not rotating an object is equivalent to rotating it 0 ° about an arbitrary axis. cos 0 ° is 1, and sin 0 ° is 0, so the identity rotation is (1, 0, 0, 0) regardless of what axis you’re rotating 0 ° about. In other words, it is a rotation about an undefined axis, but it’s also explicitly a rotation of 0 °, so the axis doesn’t matter.

Oolite normalizes all quaternions it reads in, which means scaling all its components by the same value has no effect. (1, 0, 0, 0) is therefore equivalent to (47, 0, 0, 0) or (0.1, 0, 0, 0).

The obvious question is why you’d use such a brain-bending representation. I’m glad you asked!
  • Rotating a vector by a quaternion only requires multiplication and addition/subtraction, since the trig functions are already baked in.
  • Normalizing a quaternion only requires multiplication, addition and one square root.
  • Every normalized quaternion represents a rotation, and every rotation is represented by exactly one normalized quaternion. Quaternions which can’t be normalized, such as (0, 0, 0, 0), can reasonably be treated as the identity rotation.
The quaternion page on EliteWiki provides examples, and quaternions and spacial rotation on Wikipedia explains the maths (or, alternatively, makes your brain dribble out of your ears).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Ahruman wrote:
Oolite normalizes all quaternions it reads in, which means scaling all its components by the same value has no effect. (1, 0, 0, 0) is therefore equivalent to (47, 0, 0, 0) or (0.1, 0, 0, 0).
To ask a somewhat tangential side question then, how does the rotational velocity key for subentities work? That's defined as a quaternion, so is the rotation speed there fixed, or relating to the pitch/roll/yaw settings for the sub-entity, or something else?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Thargoid wrote:
To ask a somewhat tangential side question then, how does the rotational velocity key for subentities work? That's defined as a quaternion, so is the rotation speed there fixed, or relating to the pitch/roll/yaw settings for the sub-entity, or something else?
The rotational velocity key is rotation per second.

For instance, if you want to rotate once per 20 seconds around the Z axis:
α = 360 ° / 20 = 18 °
[x, y, z] = [0, 0, 1]
sin α ≈ 0.30902
cos α ≈ 0.95106
Q = (0.95106, 0, 0, 0.30902)

Given the normalization step, this can equally be written as (3.07768, 0, 0, 1), where 3.07768 = 0.95106 / 0.30902. In fact, in this form, the first number is the cotangent (1/tangent) of α, and the other three numbers are a unit vector. This works with any unit vector. How convenient. :-)

In practical terms, you could thus use 3 0 0 1 as the rotation parameters, and fiddle with the 3 until it looks right (higher values mean slower rotations).

Note: because this uses an orientation representation to represent rotation per second, it’s not possible to specify rotations faster than one rps. On the other hand, simply rotating a model isn’t a very good way to represent a propeller, because of temporal aliasing.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Happily I can confirm that if I make the 0 0 0 0 to 1 0 0 0 change on the cmounts using my jump gates, the Caddie Omega works fine with them rather than just exploding like it did before.

This is under 1.73, and also under 1.74 v2727 (which does the modification itself on the fly).
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Thargoid wrote:
Happily I can confirm that if I make the 0 0 0 0 to 1 0 0 0 change on the cmounts using my jump gates, the Caddie Omega works fine with them rather than just exploding like it did before.
Does it also work after several times of loading oolite / flying around without flushing the cache in between?

That's where my problem with the said fix is: I can fly through fuel stations, but after some time I cannot until I flush the cache again :?

Screet
Makara
Dangerous
Dangerous
Posts: 122
Joined: Sat Oct 17, 2009 6:34 pm

Post by Makara »

Thargoid wrote:
Happily I can confirm that if I make the 0 0 0 0 to 1 0 0 0 change on the cmounts using my jump gates, the Caddie Omega works fine with them rather than just exploding like it did before.

This is under 1.73, and also under 1.74 v2727 (which does the modification itself on the fly).
Eric did some interesting testing work on this problem (in this thread) and came up with some useful results. The popping problem still exists even without the cmounts being present - although they do seem to guarantee an explosion.

btw - yours aren't the only caddy-killers in the Ooniverse, Thargoid, just the most widespread :wink:
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

The jump gates (which I haven't released yet, but shouldn't be too long) were killing every time without fail. I've just tried a few back-and-forward trips with the mods made, and so far no explosions at all.

And I know my stuff isn't the only thing triggering the problem, but it frustrates me as much as ClymAngus and McLane as we all want all players to enjoy our OXPs to their full without worrying that they're going to mysteriously explode in the process (or at least that their Commanders might ;) ).
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Due to one of the changes in the current version of trunk (1.74) the Neo-Caduceus DCN no longer works with it (and gives log errors).

As these are beginning to be reported, and as I'd prepared it anyway - with ClymAngus's approval I'm offering an evolutionary upgrade of the DCN for anyone who wants to update it.

You can download it here - all you need to do is unzip that file and copy the script.js file within it to the Config folder in your neocaduceus.oxp install (you will overwrite the existing one). Then restart your game with the shift key held down to refresh your cache and your DCN should have evolved into the more powerful (and 1.74 compatible) version 2.0.

Note that this update IS NOT COMPATIBLE WITH OOLITE 1.73.4 or lower - if you try using it there it will just self-destruct and you'll still have no self-repair (although no more log errors either).

If you're using 1.73.4 just leave things as they are until you update to 1.74 when it's released. By that time hopefully ClymAngus will have his web hosting sorted and a new OXP version with this built-in.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Slight update just uploaded (same URL as above) to remove a rogue ship.hasEquipment which I'd missed, as it's now depreciated.
Cobramac
Average
Average
Posts: 13
Joined: Thu May 27, 2010 10:49 pm

Post by Cobramac »

Greetings,

Anyone able to post a working link for this OXP please, i would very much appreciate it.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

Hi Cobramac, and welcome to 'the friendliest forum this side of Riedquat'.

I think that the link will be restored in the next few days... ClymAngus had some problems with his hosting company, which he said will be sorted by the end of the month.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Cobramac
Average
Average
Posts: 13
Joined: Thu May 27, 2010 10:49 pm

Post by Cobramac »

Thanks for the quick reply and the warm welcome :)

I thought his site has been down for some time and may take some further time to establish at the new hosts, and in light of my eager anticipation of adding the OXP, was hoping someone would be kind enough to provide an interim link if at all possible :P

Thanks again for the warm welcome !
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

As a very temporary measure (until CA's site and normal download service is restored) I've hosted the NeoCaddy here.

Note that this already has the 1.74 version of the script installed. If you want the test release version, once you've installed the OXP (in the usual fashion) you need to go into AddOns/neocaduceus.oxp/Config and then rename script.js to script.174, then also rename script.173 to script.js .

Doing that will switch the ship to the DCN self-repair script for test rather than trunk.
Cobramac
Average
Average
Posts: 13
Joined: Thu May 27, 2010 10:49 pm

Post by Cobramac »

Thank you very much for hosting the oxp Thargoid, much appreciated :)
Post Reply