Log in or register to post comments

Many targets

April 6, 2016 - 2:08am #1

Hi, 

what should i do in case when i have like 30-50 different ImageTargets and want to track them all without switching something.

I mean i have 30-50 pictures, every pic is a target, almost never they will be together inside the view. They are distant one from another.

So i want take my phone go to the 1st pic and app recognizes it, i'll move leave that target behind and now i will look at another one.

Maybe sometimes there are will be more than 1 pic watched together. But i think its will be rare.

Should i pick up some article about multiple targets, is it what i am looking for? 

Many targets

April 15, 2016 - 7:28am #9

Hey,

happy to hear. Just fyi - i was curious:

I did assign a TrackableBehaviour script to such a "GameObject" and it detected the correct imagetracker-name. If I see the image through the camera, it also is detected correct. If I add a cube as child to it the cube stays correctly on the target :) DataSet and ImageTarget is in code set (through the id it names when creating it) - but this is not reflected in the inspector yeah.

Creating MeshFilter and MeshRenderer will display nothing useful i guess, since there is no underlying mesh on this GameObject - you could have made a plane with a collider on it and set it as child to the GameObject.

 

Looks like Vuforia creates all ImageTargets which are in a loaded database (if one did not already create one on it's own). I guess if you would load a database with 100 targets, but only use one target it would be less performant than if one creates a seperate database with only the required image in it.

Many targets

April 15, 2016 - 4:12am #8

Hi,

thx for the answer, but everything has changed.

Now i am associating to every trackable 1-10 planes put in different places, each one with their own collider(planes not ImageTarget).

When one of them receive a "hit" - something happens.

I've created 37 ImageTargets, because had 37 trackables.

Assigned each trackable to 1 target.

 

However, thx for your answer, i have seen those objects created only while running a project. But didn't what are they. 

They are similar to ImageTarget, but DataSet and ImageTarget are not set. And  "turn off behaviour", "default trackable event handler" script are missing.

during runtime in the editor inspector i have tried to add those missing scripts to them, but couldn't set Dataset.

However when i tried to set a dataset to those temp objects, "mesh filter" and "mesh renderer" with defaultTarget ( white thing) appeared.  

 

Why Vuforia creates them? Where i can read about that? What useful can be done with them?

 

Many targets

April 15, 2016 - 3:45am #7

Did this work for you?

Many targets

April 12, 2016 - 6:09am #6

Yes you are right - but if you don't create your own ImageTarget in Unity, Vuforia will create them for you when you start your scene. In your log you should see something like:

"Found trackable named xyz with id 1" (This one i have setup in my scene on my own)

"Creating image target with values: ID: 2"

"Creating image target with values: ID: 3"

"Creating image target with values: ID: 4"

 

And in the scene you see x GameObjects with a ImageTargetBehaviour component (which are the ones vuforia created on it's own). So I guess for you there should be 30 Game Objects created automatically.

In a script you could get all Trackables and add an MeshCollider.

foreach(TrackableBehaviour tb in TrackerManager.Instance.GetStateManager().GetTrackableBehaviours())
{
     Debug.Log("Trackable with name " + tb.TrackableName + " found".);

     // Add MeshCollider to tb.gameObject
}

Also you could add a TrackableBehaviour script to them, if you need it.

Many targets

April 7, 2016 - 2:57am #5

Probably i did everything wrong from the begining?

I though if have 1 imagetarget it's ok with 1 imagetarget to recognize 30-50 trackables.

Maybe i should create as many ImageTargets as many trackables i want to track?

All those ImageTarget prefabs will take 1 trackable from the same db.

So 1 ImageTarget - 1 Trackable

30-50 trackables.

thats mean that i've to create 30-50 ImageTargets, every will select 1 trackable from db.

Right?

 

Just in case if my thinking is right. 

What can i do if i have 30-50 trackables(all independent and won't appear together in same moment) and i don't want to associate something(objects) to them, but i want that all of them will have MeshCollider and will be recognized.

I must create 30 imagetargets, 1 for every trackable and in every imagetarget add MeshCollider or there is another way?

Many targets

April 7, 2016 - 2:18am #4

Hi, thx for answer.

I've watched an entire video tutorial and must say that i have done everything you said.

The video seems to be slightly outdated, i'm using the last version of a plugin and for example it doesn't have "QCARBehaviour", but "Vuforia behaviour"..

However it seems i've done everything right from the beginning. 

So maybe or i'm explaining bad myself /doing something wrong or this is some bug? I am using Unity 5.3.1p3 + vuforia unity 5-5-9

And even if inside a database there 2 targets. They are not similar.

Ok..i am looking at logs and i see only "trackable 1 found"/ "lost"

When i stop, go to "Image Target Behavior" -> "Image Target" -> "Image Target" -> changing it to trackable 2.

Then i am starting again and now it will recognize only 2 trackable. And logs will be blind if i put in front of camera 1 trackable. 

I mean it recognizes only 1 trackable from db which is selected in "Image Target Behabviour" - "image Target".

Those not selected won't see.

I have only 1 db with 2 images. 

 

Why is it so?

 

Many targets

April 6, 2016 - 4:37pm #3

Vuforia does not provide a limit on the number of targets in a dataset. If you associate 50-60 targets in a single dataset, then the SDK will be able to detect all those targets (assuming that they are sufficiently unique - you cannot have similar targets in the same dataset and expect detection).

Once the dataset has been downloaded from the Target Manager and integrated into your Unity project/scene, it only needs to be activated in the inspector to start functioning. If you're looking for visual proof that a target has been detected, then you'll need to assocate some sort of model with that target.

I suggest reviewing the following tutorial to insure success: https://www.youtube.com/watch?v=4u177CpPbp8

Many targets

April 6, 2016 - 2:39am #2

I am using a local database with 2 image targets in it, just for test.

And i can recognize only 1 target. Which was selected inside an Inspector of the Unity.

How can i recognize them both? Without switching programmatically. They are independent targets. 

I see only one of them at the time.

Log in or register to post comments