This project is read-only.

Detecting markers and disabling the rendering of nodes

Dec 5, 2010 at 11:49 AM


I'm using ALvar and Vuzix IWear with CamAR. I have an x amount of markers added to a scene, but only a subset of those markers are actually visible to the camera in a particular frame. Assuming I do not know which markers are visible, is there a function that would return a list of only those markers detected? Should I be using Process_Image() from AlvarMarkerTracker? 

Also, if I want to be able to detect a marker, but I do not want an image such as a Geometry node rendered, how would I go about disabling those images? Should I just disable the children of that node? 

Essentially what I am trying to accomplish is that only after detecting marker A, will geometric nodes be rendered on top of markers B, C and D.


Dec 8, 2010 at 9:12 AM

You shouldn't call ProcessImage() yourself since it needs to be called at correct timing assuming that you track those markers through MarkerNode in the scene graph. There is no function that returns a list of all visible markers, but you can figure out which ones are visible by checking the MarkerNode.Found property for each marker node you've added assuming each marker node handles one marker, but not multi-marker. In the case of multi-marker, you need to register each marker ID through IMarkerTracker.AssociateMarker(...) and save the returned ID so that you can later check whether that ID is found in the video by calling IMarkerTracker.FindMarker(...) method.

You can set GeometryNode.Enabled to false if you don't want to render them. Alternatively, you can set it's opacity (GeometryNode.Material.Diffuse.W) to 0.