EasyAR Multi-Target¶
EasyAR support to track multiple targets simultaneously. It can track multiple different targets, or multiple same targets, depend on the target you are loading. The interface is very flexible and there are two different ways to do that.
If you are using EasyAR SDK Pro, you can also track different types of targets - e.g. ImageTarget and ObjectTarget - simultaneously
Target and Tracker¶
EasyAR target is flexible, you can read more from EasyAR Target Configuration. A target represents one object that can be tracked by a tracker. For ImageTracker and ObjectTracker, the target can only be tracked after loading into a tracker. You can create many trackers in EasyAR, as many as you wish. When an target is loaded into a tracker, it will be tracked by that tracker and other trackers will not touch it. So when you load a target into a tracker, the load into another tracker will fail unless you unload it from the previous tracker first, one expection is that the Unity Behaviour interface will do the unload automatically.
Single Tracker solution¶
You can set simultaneous number to the tracker which will limit the max trackable targets. Only one call and the tracker will be able to track multiple targets. You can even change that number at runtime, it will work as you expect.
Multi-Tracker solution¶
You can create multiple trackers from the first day EasyAR out, and the concept hasn't changed since then.
You can use multiple tracker to track different target sets. A tracker can always track the simultaneous number of targets set into it, and it can track only the target loaded into itself. With multiple trackers, you can track a few targets simultaneously from one set, and others target in the same time from the other set, and the total max number of simultaneously tracked targets is the sum of the number all trackers.
Difference between the two solutions¶
The main difference between the two solutions is that with single tracker, you can track a pre-set number of targets simultaneously from the target set, but you cannot control which one can be always tracked even if it is in the scene, because the detect order is random. But with multiple tracker, you can assign a target to a tracker that always track one target, so it will always be detected and tracked when it is in the scene.
The multi-tracker solution has no performance impact compared to the single tracker solution. The performance is related to the total number of tracked targets only.
Editor Settings (Unity)¶
The simultaneous number can be set at Tracker inspector, and it can be changed at runtime. You can set the tracker a target need to be loaded into in the Target inspector and it can be also changed at runtime.
Center Mode (Unity)¶
There is there center mode now. You can get more details in the AugmenterBaseBehaviour Class API doc.
Performance and number limitations¶
EasyAR do not set limitations for the max number logically. The max trackable number will depend on the hardware and object size in the scene.
It is very smooth to track 10 or more targets on PC. And about 4~6 targets can be tracked smoothly on a mainstream smart phone.