Custom Marker

Sep 8, 2011 at 2:59 AM

Hi Ohan, I was able to create a custom marker using the ALVAR's samplemarkercreator, however I couldn't make it to be recognized by Goblin XNA, I used the MarkerLayout tool and created ALVARconfig.xml and copied that to my project folder. And trying to pick it up by 

myMarkerNode = new MarkerNode(scene.MarkerTracker, "C:\\...\\ALVARConfig.xml");

and trying a test case in update

 if (myMarkerNode.MarkerFound)           

{                Console.Out.WriteLine("Marker Found");           



but it doesn't work. I think I am doing something wrong in MarkerLayout. I want to use only one marker so I have something like this


 layout.AddMarker(1, new Point(60 , 60), "raw_markers/ALVAR/MarkerData_myMarker.png");


the reason I am bugging you so much is that we are doing a senior design project in colorado state university, and we just started, so I am trying to learn Goblin. thank you so much for help. it is a great tool.

Sep 9, 2011 at 10:01 AM

ok something is definitely wrong with MarkerLayout tool. i created two different markers using the samplemarkercreator and when I generated ALVARConfig.xml files for both of them, they we completely identical. the only thing in that file is ;

<?xml version="1.0" encoding="UTF-8"?>

-<multimarker markers="1">

-<marker status="2" index="0">

<corner z="0" y="-34" x="0"/>

<corner z="0" y="-34" x="34"/>

<corner z="0" y="0" x="34"/>

<corner z="0" y="0" x="0"/>

</marker> </multimarker>


which doesn't seem whole lot of information. plus same for two different markers. I think this only has the information of the white box in the black box.(the coordinates) and not actually the information of the different patterns.

what am I missing?

Sep 16, 2011 at 5:27 AM

well i kind of figured it out. you only need to use the samplemarkercreator in alvar. it creates the xml's too if you have at least 2 individual markers in your array. i couldn't do the single marker one. but my friend said he got it. it's not a big problem. however i still dont get how the marker tracking works with as little information as that.

Sep 22, 2011 at 2:24 AM

You don't need an xml file for just one marker. You can simply pass the ID of the marker. Please see the API documentation of ALVARMarkerTracker.AssociateMarker function.