Log in or register to post comments

Keep multiple frame markers from moving

October 14, 2014 - 1:03pm #1

My environment has multiple markers each attached to signs planted in the ground, so they should never move. The idea is to walk around this park and see a bunch of virtual objects by pointing your device at the different signs that I've attached markers too. You should be able to see everything regardless of which marker you look at, the different markers are only so that you can view the scene from different locations. I do also have some different annotations I want to show depending on which marker is detected, but only 1 at a time.

This works perfectly when I use ImageTargets and set the max simultaneous targets to 1 and the world center mode to FIRST_TARGET. This way it always only sees one target at a time and only moves the camera within my virtual scene relative to it, keeping all the targets and other virtual objects where they should be.

However, I'm trying to switch to using Frame Markers because they seem to detect faster and more reliably and give me more control of the rest of the contents of the sign. But with Frame Markers, I have no way to set a tracking limit of 1. As far as my annotations go, I can just keep track of which was detected first, but positioning is a problem. If two frame markers are detected at once, one of them will be the world center and the camera will move relative to it, but the other will be moved in my scene. In theory my scene is modeled 1-to-1 with the real world, but it is still going to move a little bit due to slight errors and jitter. Even if it is lost it doesn't move back to its original location so then even if I detect only that one, it will be the world center for moving the camera, but from the wrong location. In my real installation it is very unlikely that two of these markers will ever be physically visible at the same time, but it has been a real problem in my test environment.

So two questions. 1) Is FIRST_TARGET world center mode (or any mode) is there any way to prevent subsequent targets that are detected from being moved? 2) When multiple targets are detected, is there any method or property that can tell me which target Vuforia considers the "first" and is using as the world center? I was hoping that StateManager.GetActiveTrackableBehaviours() would list the active ones in detection order, but it seems that it lists them in the same canonical order as StateManager.GetTrackableBehaviours() regardless of which order they were detected.

Keep multiple frame markers from moving

April 20, 2015 - 3:46pm #4

The World Center Mode on the ARCamera can be set to FIRST_TARGET or SPECIFIC_TARGET, but not both. Experiment with this in Unity to see the behavior.

Yes, the '3' in the forum name for Unity references a past version, but it is still appropriate to post Unity 4/5 related threads there.

 

Keep multiple frame markers from moving

April 19, 2015 - 9:35pm #3

If a regular Image marker is set as SPECIFIC_TARGET, when used in conjunction with Frame Markers, will that expected behavior continue--effectively over-riding this FIRST_TARGET re-orientation described?   

Also, not sure about 'Unity 3 Extension', but this is in the context of Vuforia Unity 4.0/4.1 and Unity 4.6/5.

Keep multiple frame markers from moving

October 30, 2014 - 2:26pm #2

Additional frame markers which are detected after the FIRST_TARGET marker might have minor movement in the position vectors as the tracker continually analyzes those markers in relation to the first for each frame from the camera. You can see the position values change on the FrameMarker objects while in PlayMode.

If you experiment with the Frame Markers sample app, you will see that the first target is the first marker that is detected, but if that marker is lost, then the next detected marker moves into first place. So if you find ID=3, ID=2, ID=0 in that order and then lose ID=3 while the other two are still being tracked, then ID=2 becomes the first target. With this understanding, you can implement your own app-logic to track the marker that is being used as FIRST_TARGET.

Log in or register to post comments