Log in or register to post comments

Track multiple instances of real-world cuboid and replicate them in Unity scene

May 3, 2017 - 7:29am #1

Hi guys.

Let me start by saying I am new to vuforia and unity. I want to create an PC app where the user would stack lego-like blocks to produce some sort of ondulating wall --something like this but with much smaller blocks (the blocks would be painted with an AR tracker. Also ignore the robot). I would like Vuforia to recognize each block that is placed as it is being placed in the real world, and have Unity create a corresponding virtual block in the scene. The setup could be something like this (PC instead of iPad, since I don't have access to a macbook). 

 

Required:

  • A block appears in the unity scene when the real-world block is placed
  • Blocks can be added on top of each other

 

Not required:

  • Blocks update in unity when they are moved in real-world (although it would be fantastic). 
  • That blocks can be place behind others (although I could have a turntable if that helped)

 

I just started, and my approach has been creating a cuboid tracker, applying it on the blocks, and placing them in the real-world. However, it seems unity can only detect one at a time. Also, are there any advantages/disadvantages in using multi-trackers vs object recognition? Finally, does this project seem feasible at all? I want this to be a proof of concept, so if I am able to aggregate ~20 blocks I am satisfied. 

Any ideas about how I can achieve this are welcome! Thank you!

Track multiple instances of real-world cuboid and replicate them in Unity scene

May 23, 2017 - 10:35am #6

Hello,

Unfortunately, Vuforia 6.2 currently does not support tracking multiple instances of the same target at the same time. We continue to evaluate this feature for a future release, and I will log your requirement as input to the product development team.

Apologies for any inconvenience.

Thanks.


Track multiple instances of real-world cuboid and replicate them in Unity scene

May 15, 2017 - 1:45pm #5

I have made some progress, but still can't get to detect the same identical MultiTarget multiple times. I have my ImageTarget on a table, which is detected. Then, I have multiple versions of my MultiTarget that I want to be detected. However, at any given time, there is only one being detected. Based on the previous answer in this post, I assumed that using a single MultiTarget to track several objects was possible. However, based on some older posts in the forum, that is not possible. Could someone please clarify this? Thank you in advance!

See the picture below: The greenish cylinder is a child of the imageTarget, while the two orange cylinders are children of the multiTarget. Note that only one of my blocks is being detected. 

 

PS: If it is not possible to track multiple objects using a single image target, is there an easy way to accomplish what I want that doesn't require produce several different MultiTarget trackers?

Track multiple instances of real-world cuboid and replicate them in Unity scene

May 5, 2017 - 5:48am #4

Hello, thank you very much for your replies, medabit. I will do what you recommend and update the post with more specific information if  I ran into problems. Thanks!

Track multiple instances of real-world cuboid and replicate them in Unity scene

May 3, 2017 - 5:08pm #3

Hello,

A couple of additional thoughts and recommendations:

  1. For this use case, I strongly suggest using MultiTargets instead of ObjectTargets. The datasets for ObjectTargets can only be created using a Vuforia tool, which is an app that runs on Android. This creates additional overhead when creating multiple blocks which is not required for your proof of concept.
  2. MultiTargets are actually a collection of 2 to 6 ImageTargets, with accompanying metadata (packaged with the dataset) that provides hints to the SDK as to the spacial relationship for each side of the cuboid. These targets can only be detected when the camera can "see" a side of the cuboid.

Keep #2 in mind when you're designing your game. In the example image, some of the blocks are not in view of the camera. This will mean that if they have not already been detected, the SDK cannot do so unless one of the sides is presented within the camera's field of view. I would also suggest that you enable our Extended Tracking feature as this will help to better anchor the augmented experience as the blocks are laid out, entering and leaving the camera's field of view due to obstruction, etc.

Thanks.

Track multiple instances of real-world cuboid and replicate them in Unity scene

May 3, 2017 - 2:23pm #2

Hello,

Thank you for the detailed description. First, to address your technical question "it seems unity can only detect one at a time", this is likely because you did not increase the "Max Simultaneous Tracked Images" to a value greater than 1. This setting can be found in ARCamera Vuforia configuration settings, via Unity Editor's Inspector window.

Overall, I believe the concept is possible with Vuforia aside from the following caveats:

  1. Vuforia only supports mobile devices with embedded cameras. You can find additional details here: https://www.vuforia.com/Devices. The support for USB cameras is limited to Unity's PlayMode only.
  2. Detection of multiple, simultaneous targets will depend upon the size of those targets in the camera's field of view. Thus, the more targets you try to get into the camera frame, the smaller they become and thus the more challenging it is for Vuforia to detect them. Roughly, we've had success with up to 15 targets but this can vary depending upon lighting conditions, quality of the target, and the device camera.

Hopefully, this gives you some initial feedback for evaluating your proof of concept. I'll consider this further and may post again later if I have any additional, relevant points.

Thanks.

Log in or register to post comments