Object Recognition and sub menu

Hello, I have a Displax Foil and I was able to perfectly work the sample file of TUIO. But I encounter problems to achieve my project. I would like to be able to place product objects in a certain area (I use for that conditions on the coordinates of the object placed), then to display a content for this product (background image, name, ect.) and sub menu according to extra tags placed on the screen. I managed to display the content of the product according to the tag placed (I make conditions on the ID of the tag present directly in the trigger TUIO Object added). For submenus it will be quite close to the sample file. But how to return to the initial screen when I remove the product and not when I remove a submenu. It seems that the Object Removed trigger can not recognize the item that was removed. If I use it, when I remove a sub menu tag, it also removes the the product. I do not understand what the predefined tag is for. I thought that we could associate TUIO Interface asset with actions that occur only on some tag using the predefined tag but it does not work. I attach a diagram of the operating principle. Thank you in advance for your help.

Maybe the question would simply be: is it possible to trigger an event when an identified object tag is removed. It’s possible when it is added but not when it’s removed, it seems to me. For exemple, when Tuio Tag 203 is remove, do something… I think Tuio send a message for that.

Hi Fernand,

From the dedicated article in Help Center, among the triggers, we have “Object Removed”.

Regards,

Alex.

1 Like

Hi alex,
Thank for the answer…
Yes I see it, this trigger occurs when an object is removed, but how to trigger an event when an object with a known ID is removed ?
I created a TUIO Interface asset with a predefined tag, when the object is added I can trigger an action, but when it is removed the trigger does not appear associated with the predefined tag. So, if I remove another object, the trigger fires.

Although there is no support for this IA, all I can say is that you will need an If statement which should solve this issue you are encounter.

Kind Regards

1 Like

On the “Object is removed” trigger, you have several parameters, Symbold is one of them.

This means you can have conditions on it, for instance:

Object removed AND SymbolId equals etc …

Regards,

Alex.

3 Likes

Hi, Thanks a lot. I tried this solution but not as it should. It works very well now.

2 Likes

Another problem for me: if I check the checkbox Use predefined Ids (because I want to get the angle of a particular tag)…


the events do not occur.

If I uncheck the checkbox Use predefined Ids, they happen. Do you know why ?

Yes, because I created the “predefined IDs” for a specific usage of @Louie_Smith and couldn’t find a better way to name it :slight_smile:

In the general case or you want between 1 & N tags on your table and you’ll use the object added / removed trigger, do not use the predefined ids.

If you have 4 tags with always the same IDs, known in advance, you can check the box and design a specific “template/design” for each of these tags without having to rely on a data feed. In this mode, objects are never “removed” but just moved out of the scene when the physical object is removed.

Seb

3 Likes

@fernand @seb is correct, if you need help building an experience or need any pointers, give me a shout I have built plenty of Object Recognition experiences. The reason predefind IDs are great in a scenario of 16 Objects, is that again you grab the angle of a specific ID and trigger say said menu or submenu. Before in v1 OR IA it had to be done in a dataset which is lead to @Seb building the v2 for this specific reason.

2 Likes

Thank @Louie_Smith, actually I used the predefined Ids for this purpose: retrieve the angle of a particular object. It would have been great to be able to also add triggers to it.

You can do this by creating a time which elapses every 0.1 second to trigger Something.

in this case you could trigger say a menu button to check etc when it reaches a certain angle.

2 Likes

Yes, I use a toggle button for that. In terms of performance, what is the best way: a time which elapses every 0.1 second and listen to the angle or a toggle button that changes state when the object takes a specific angle?

I have achieved this by using the 0.1 second timer elapsed “Repeat Indefinitely” and then create an IF statement for when the angle of the ID is more than or less that [Value]

Kind Regards

1 Like