How do sceneform Anchor Nodes work? How are they able to snap back to their previously placed location when you look at them again?
I want to understand how an Anchor Node works. You put it at a certain location and when you look around and look back to where you previously put them, they immediately snap back to that original location. Does Sceneform use visual features to decide the placement of Anchor Nodes as well?
I actually have some objects that I originally put in the reference frame of the anchor and I make them the children of the anchor. The location of all these objects were pre-computed and now I want to show them on an android device. Right now, I put them, as Nodes, in the reference frame of the anchor but they drift if I stop looking at the anchor and move away from it. However, when I look back at the anchor and get close to it, the anchor and all the objects belonging to it snap back to their correct locations.
Now, I want to show these objects in the world reference frame (to possible eliminate the need of an anchor) and so I use the pose of the anchor and the pose of the objects to bring those objects in the world reference frame and then I create them as Anchor Nodes in the world reference frame. The problem, however, is that objects that were close to the anchor or initially in view of the camera, get placed more or less at their correct location. However, the objects that were far away from the anchor or never in view of the camera in the beginning, never snap back to the right place (for example, Anchor Nodes that are created behind the camera).
Based on this, I think Anchor Nodes also use visual features of the place where they were put in the beginning to snap themselves back to the intended location. Which is why, if you place an Anchor Node at a random position in an arcore world coordinate frame (and it was never in view of the camera at the start), they might not be in the right place and might never snap back to the correct intended location. Is my reasoning right?
[link] [comments]
Filed under: augmentedreality - @ 21. April 2021 18:42