This project is read-only.

Understanding Marker Coordinate behavior

Apr 14, 2009 at 11:58 PM
Edited Apr 15, 2009 at 7:23 AM

Hello,

I am using the ARTag SDK 'panel_set.cf' configuration file and the 'base0' and 'toolbar0' markers.  However, my game has the following irregular coordinate behaviour:-

 - Incrementing X has the effect of decrementing Z (right-handed coordinates)  i.e. The object gets nearer to the camera.
 - Incrementing Y has the effect of incrementing X (right-handed coordinates)   i.e. The object moves to the right.
 - Incrementing Z has the effect of incrementing Y (right-handed coordinates)   i.e. The object goes up.

and conversely...

 -
Decrementing X has the effect of incrementing Z (right-handed coordinates)   i.e. The object moves further away from the camera
 - Decrementing Y has the effect of decrementing X (right-handed coordinates)  i.e. The object moves to the left.
 - Decrementing Z has the effect of decrementing Y (right-handed coordinates)  i.e. The object move downwards.

At first I thought it was something I was (or wasn't) doing in my code, however the same behaviour occurs in the Tutorial 8 project (again using the 'panel_set.cf' config file and 'base0' / 'toolbar0' markers - NOT the default 'artag.cf' and 'ground' marker).  I am unable to print the 'ground' marker sheet because it is very big (I am assuming I cannot de-scale it).

To clarify, I would expect the right-handed coordinate system behaviour - where incrementing X moves the object to the right; incrementing Y moves the object upwards; and incrementing Z moves an object further away from the camera.


Any help would be greatly appreciated!

Simon

Coordinator
Apr 15, 2009 at 9:49 PM
What do you exactly mean by "incrementing" or "decrementing" your coordinates? 

If you mean by incrementing or decrementing the translation component of an object attached to a marker, then the translation is based on the marker coordinates, but not the global coordinates. In global coordinates, you would excpect incrementing X moves object to the right, and incrementing Y moves object upwards, and so on, but this is not true if an object is attached to a marker. 

The marker coordinate is +Z up, +X right, and +Y further relative to the marker transformation. 

Ohan
Apr 15, 2009 at 11:06 PM
Edited Apr 16, 2009 at 8:58 AM
Hi Ohan,

Yes, I was referring to the translation component of an object attached to a marker.  Apologies for the ambiguity. 

As you've probably already guessed, I was under the impression that objects still adhered to global coordinates even when attached to a marker.  This is obviously not the case, so thanks for straightening this out for me!

I'll go and have a play around, keeping the marker coordinate system behaviour in mind.  This may generate some more questions so I may need to keep this discussion alive for a little while longer :) 

** I've actually just removed quite a lengthy question because I want to get all my facts straight first ***

Cheers
Simon
Apr 17, 2009 at 11:31 PM
Edited Apr 17, 2009 at 11:44 PM

Hi Ohan,

When my 'base0' marker sheet is laid out like the front-cover of Mark Fiala's book (Augmented Reality. A Practical Guide), I get the following behavior:-

   +Z up, +X nearer, and +Y right

 .. which of course is incorrect.  In order to get the expected marker coordinate behavior (i.e. +Z up, +X right, and +Y further away), I must rotate the sheet 90 degrees anti-clockwise so that the X-axis runs vertically (with the X label on the right-hand side of the captured frame) and the Y-axis runs horizontally (with the Y label displayed top-center in the captured frame).

I am just a little puzzled as to why this is the case?  I am not rotating the model in any way, just appling a Scale Vector.

Hope I've explained myself well enough.

Simon

 

Coordinator
Apr 20, 2009 at 9:14 PM
Hi Simon,

Sorry, I missed your last post. 

I didn't realize that the panel0 has X & Y flipped. I'll check it, but since I'm very busy with conducting user study this week, I will probably work on it next week.

Ohan
Apr 20, 2009 at 10:33 PM
Hi Ohan,

No stress.  I appreciate you're a busy guy!  The behavior isn't holding me back anyway; I'm making great leaps forward thanks to your feedback.  The Goblin tutorials have been a big help too.  I've also been reading Mark Fiala's book on ARTag (something I should have started a lot sooner ;)

Thanks again
Simon