Support for Multiple Targets

Ref: https://docs.zap.works/studio/scripting/reference/targetfinder/
“While this API supports multiple Targets and TargetInstances, at present ZapWorks Studio only supports one Target and one TargetInstance.”

Hoping for new functionality be added that allows more than one Target to be supported for a progressive user experience.

There are 3 approaches that I can think of;

  1. Update the Z Class to expose functions that turn on multi-Target support for the developer
  2. Update Zapworks Studio to support n-number of multi-Targets (perhaps managed through one Target per Group)
  3. Update Zappar app to continuously look for the next ZapCode without user intervention (surely appreciated by wanting Zapbox fans)

M.

3 Likes

Hi Marc,

This functionality is definitely planned and our implementation ideas are similar to that of yours.

We don’t have a current ETA at the moment but will update this ticket as we make progress :slight_smile:

Mark

Any recent update about this feature?

Not at the moment, when we have an update we’ll post it here :slight_smile:

Since the API says it supports multiple targets but Studio doesn’t, would I be able to write script that would recognize multiple targets?

It would be possible to write a script that would recognise several tracking images, but only one would ever be tracked at any given time.

You would have to write some code that round-robins through targets until one is detected, making sure to add a check in case one is found (to stop the round-robin).

However, once the script starts looking for a new target image, the previous ‘TargetFinder’ will be unloaded, and will no longer be tracked.

2 Likes

Hi Seb!
this is very interesting!
A template for this would be gorgeous!
I’m thinking about a “double-face” tracking…

Cheers!

M

Hi, How are you going with this, would be similar to your approach with the multiple targets used for zapbox?

If the current limitations are due to the Z.admin’s ability to track target images and tracking images, maybe tracking images could go through a similar database as targets and a free account could have a limit of 5 tracking images, unless this is not what is stopping it. It would be great if I only need 1 target to activate multiple tracking images e.g. for a booklet with multiple images similar to Vuforia SDK.

Love your work

Regards,

Byron

Hi @byron.tik,

The limitations are a bit more complex than that, though support for multiple tracking images is something that the team have discussed briefly.

We don’t have any further information to share at this stage but I’ll let you know on this thread if there are any updates.

All the best,
Seb

Hey Seb,

Bump for interest.

Any update on this?

Thanks
Jason

1 Like

I don’t know if you have seen this yet.
Ancient History Competition Winner

Steve

Actually yeah I did see this. I didn’t see the tutorial for it. Awesome! Thanks Steve!

1 Like

Oh thats your project Steve?! Dang that looks like quite a lot of work, very impressive. Ok so how do you get multiple targets tracked? lol

Hi Jason,

One way, is to add the target images to subsymbols. Load the 1st sub symbol and check if it is seen or not. If not, unload the current symbol, load the next one, and so forth. When the subsymbol is found continue to check its seen status in order to restart the search loop as soon as it is not seen again.

Cheers,

Hi guys,

Just thought I’d mention a few things regarding multiple-image tracking in Studio.

While creating an experience that tracks from several targets is possible (as is evident from some experiences we’ve seen, including @stevesanerd’s competition entry), it is not currently supported nor recommended due to the instability and unreliability of the implementation in its current state.

Support for multi-image tracking has been discussed internally, but as it’s part of a much larger discussion we don’t have any further information to share at this point, unfortunately.

For those of you eager for this type of functionality, we’ve created a brief example to show how our internal team simulates tracking the same experience from multiple targets, using Deep Links.

We’ll be looking at creating more comprehensive documentation/examples around the use of Deep Links in the future.

The ZPP’s and target images can be downloaded here - Simple Deep Link.zpp (2.1 MB)
Simple Deep Link 2.zpp (2.3 MB)

To understand this I would suggest printing out both the target images.

SimpleTrackingImage1zapcode TrackingImageSimple2

To summarise - these targets are linked to similar experiences showing a 3D model and a screen relative button. When scanning the zapcode on the first target, the 3D model will be tracked to target image 1 (try looking at target 2 and the 3D model will not track).

Touching the button will 'launchUrl(…)` of a deep link and load the second experience. The 3D model will now be tracked to the second tracking image! Touching the button again will then re-load the first experience and re-track the model back to the original target, and so on.

Hope this helps.
George

1 Like

Thats great Jvouillon! Ill experiment with what you mentioned. Do you happen to have a sample of the code for this? I’m much more of a visual learner and i don’t really have a background in code.

I understand the seen and not seen scripts for sure, but the loop checks are where i may get held up.

Thanks!
Jason

I’ll try to make a simple example…

Meanwhile… the idea is,
in the subsymbol:

  • use the seen/notseen events, to set a variable to true/false
  • create a function which return the value of that variable

In the main root,

  • use the every() function to create a loop which call the sub symbol function.
  • then just check the value returned…

Hope it can help,
:smiley:

Hey jvouillon

I think ive got the subsymbol code, which works.

const Plane = symbol.nodes.Plane;

var tracker = function() {
Plane.visible(true).enabled(true)
}

parent.on(“seen”, () => {

tracker();

});

However, the root code and the loop check is where I’m a bit lost. Any help would be greatly appreciated.

Thanks!

The code of the trackingImage in the subsymbol, should be something like:

var trackingImageStatus = false;

parent.on("notseen", () => { trackingImageStatus = false; });
parent.on("seen", () => { trackingImageStatus = true; });
export function getStatus(){ return(trackingImageStatus); }

Then, from the main hierarchy, you can call the function this way:

var imageSeen = symbol.nodes.your_symbol.nodes.code.getStatus();

More informations about sub symbols communication

Thanks so much for all your help so far. I’m still a bit lost but have everything communicating properly. This might be a bit advanced for me at this point. Might need to do some JS tutorials to better understand a lot of this.

1 Like