This project is read-only.

goblin xna 3.6 ALVAR marker size and xna conversion

Mar 6, 2012 at 11:53 PM


Im working with the 3.6 version of goblin xna and have two questions:

1) First question is about configuring the size of the markers. I have tried out "MarkerLayout.exe" from the tools subdirectory to get a self customized marker array. For this purpose i edited the file "SampleLayout.xml". I am not sure if the parameter "pixelPerInch" is what i think it is: I thought this is the number of image pixels per printed inch on paper. The default value was set to "10" which seems quite small. The size of a single marker as given in the ALVAR raw-markers .png-files is already 108 pixels per edge, so this would result in a marker which has an edge length of 10,8 inches when printed on paper (big...). When i looked into the generated file "ALVARConfigFromXML.xml" i found out that all markers there actually had an edge length of 10,8 (i assume that the unit used in this file is also inches). Or does "pixelPerInch" stand for something different?

2) I would like to know how and where the computed spacial metric coordinates of the marker (meters, millimeters, inches) are being transformed into xna-coordinates and what is the conversion factor.

I would be very happy if you could help me and answer these questions.

Thanks in advance,


Mar 7, 2012 at 4:01 PM

1) Yes, your understanding is correct. 10 is just a sample number, so feel free to modify it to whatever the actual number should be. From v4.0, the notation has been changed though. You probably want to print out the paper first and measure the actual size of the marker. Then calculate pixelPerInch based on your measurement. By the way, even though it's called pixelPer'Inch', it can be cm or mm or whatever measure you like. It basically specifies the unit used in your app.

2) If you use inches measure, then 10 unit in the XNA program means 10 inches. If you use millimeter measure, then 10 unit in the XNA program means 10 millimeters.