Log in or register to post comments

One object with several Image targets

March 8, 2019 - 6:38am #1

Hi!

 

I'm working on a Hololens app in which I will have a plane covering the whole floor of a large space. The problem I'm having is with drifting due to the large area when walking from one end to the other. Is there some easy way to implement several image targets for the same object throughout the room, so that the position of the plane can be adjusted and alligned correctly upon looking at a new image target far a way from the initial one? Maybe there's some other way to deal with this effectively, sorry if my explanation is really bad...

 

Thanks!

One object with several Image targets

March 13, 2019 - 2:26pm #9

Hello,

hassehans wrote:

Had a look at that and I seemed to get the hang of it, however, there are some strange things that I don't understand.

1. I have 4 ImageTargets under my MultiTarget, as you described how to do earlier. All these targets have the exact same values, but still one random target(in this case "Drone_Warehouse") has the Z-rotation of 360 degrees in Unity while the others don't, is this just a bug? Here's the part from the XML file.

<MultiTarget name="WarehouseImages">

      <Part name="Oxygen_Warehouse" translation="1 0 0" rotation="AD: 1 0 0 90"/>

      <Part name="Fissure_Warehouse" translation="2 0 0" rotation="AD: 1 0 0 90"/>

      <Part name="Drone_Warehouse" translation="3 0 0" rotation="AD: 1 0 0 90"/>

      <Part name="Astronaut_Warehouse" translation="4 0 0" rotation="AD: 1 0 0 90"/>

I could find no bug on this issue, but I did find a comment on an unrelated bug that basically states that visualizations of hand-edited MultiTargets in Unity, Editor or PlayMode, may not match expected results. In other words, if your MultiTarget is not a cube or cuboid, how it behaves in Unity is untested.

Thus, are your observations from the Editor, PlayMode or how it behaves on device? If it is either of the former then the behavior is basically undefined.

hassehans wrote:

2. I don't seem to understand the syntax of the rotation="AD:..... How do I for example change rotation of the Drone target to 90X, 0Y, 180Z in Unity from here? All the above gives me -90X, 0Y, 0Z, except for the drone.

After the "AD:", the first three values are boolean and indicate the rotation axis. Thus, in your example above, each side will be rotated +90 degrees on the X-axis. Although it is not directly documented, you can include multiple sets of these values to rotate on multiple axis. Here is an example:

<Part name="FancyCube.Front" translation="0.002 0.01 0.055" rotation="AD: 0 0 1 -50; 1 0 0 42"/>

Now for the bad news: there is a bug in the SDK when using multiple rotations. One customer reported that "..when start the application the tracking works when the camera see the other targets [with single rotation value set], but not when is looking at the multiple-rotated marker..." The bug has been deprioritized as we only get one user a year who is trying to use MutliTargets like this.

Please let me know how it goes.

Thanks,

Vuforia Engine Support

One object with several Image targets

March 13, 2019 - 10:00am #8

Hi @medabit,

 

Had a look at that and I seemed to get the hang of it, however, there are some strange things that I don't understand.

1. I have 4 ImageTargets under my MultiTarget, as you described how to do earlier. All these targets have the exact same values, but still one random target(in this case "Drone_Warehouse") has the Z-rotation of 360 degrees in Unity while the others don't, is this just a bug? Here's the part from the XML file.

<MultiTarget name="WarehouseImages">

      <Part name="Oxygen_Warehouse" translation="1 0 0" rotation="AD: 1 0 0 90"/>

      <Part name="Fissure_Warehouse" translation="2 0 0" rotation="AD: 1 0 0 90"/>

      <Part name="Drone_Warehouse" translation="3 0 0" rotation="AD: 1 0 0 90"/>

      <Part name="Astronaut_Warehouse" translation="4 0 0" rotation="AD: 1 0 0 90"/>

 

2. I don't seem to understand the syntax of the rotation="AD:..... How do I for example change rotation of the Drone target to 90X, 0Y, 180Z in Unity from here? All the above gives me -90X, 0Y, 0Z, except for the drone.

 

Sorry for bombarding you with stupid questions

 

Best regards

One object with several Image targets

March 12, 2019 - 12:50pm #7

Hello,

The translation and rotational values will be key for defining your MultiTarget with more than 6 sides.

I suggest that you closely study the file Assets/StreamingAssets/Vuforia/VuforiaMars_Images.xml from the Unity Core samples to understand how the translation and rotation values impact the MultiTarget definition. Understanding that will be key to your defining your own, custom target.

Once you understand that, I believe you should be able to update the XML values in the device database using scripting. However, any changes will only be applied once the device database is again loaded by Vuforia.

Thanks,

Vuforia Engine Support

One object with several Image targets

March 12, 2019 - 5:54am #6

Thanks a lot for the help @medabit! Just one last thing, is the translation and rotation in the XML script needed or maybe editable from unity? I want to be able to rotate and move around my targets inside the unity editor.

 

Thank you!

One object with several Image targets

March 11, 2019 - 5:16pm #5

Hello,

Here is the authoring workflow for creating a MultiTarget with more than 6 sides:

  1. Create a new device database in the Target Manager
  2. Upload all images to be included in the MultiTarget as single image targets (with appropriate size values)
  3. Select all images in the Target Manager, and download the device database (non-Unity Editor packaging)
  4. Hand edit XML file to create the custom MultiTarget: https://library.vuforia.com/content/vuforia-library/en/articles/Solution/How-To-Modify-the-Dataset-Configuration-XML-File-Outside-the-Target-Manager.html#how-to-modify-multi-target

In order to utilize this device database in the Unity Editor, you'll need to take the following additional steps:

  1. Close the MultiTarget project and the Unity Editor
  2. Copy the modified XML file, and DAT file, in the Assets/StreamingAssets/Vuforia folder of the MultiTarget project
  3. Open the MultiTarget project

At this point you'll be able to select the customized device database from the Inspector window, but you won't see any of the preview images (as they're normally packaged by the Target Manager in the .unitypackage file).

Good luck,

Vuforia Engine Support

 

One object with several Image targets

March 11, 2019 - 7:08am #4

Thank you for the help, @medabit @dpizzle! I've looked in to multi targets now and it seems to be a possible solution for me, however, is there a way to add more than 6 "sides" to a multi target? I think I might need more than 6 targets throughout the room.

 

Best regards

One object with several Image targets

March 8, 2019 - 5:18pm #3

Hello,

Thanks @dpizzle - agree with your suggestion.

Here is a post that describe a similar problem with large murals, and how MultiTargets were used to solve this use case: https://developer.vuforia.com/forum/unity/ar-image-tracking-tradeshow-booth

I'm also aware of the successful use of MultiTargets for a set of "distributed" targets to act as one. Techniques are the same as described in #2.

Thanks,

Vuforia Engine Support

One object with several Image targets

March 8, 2019 - 1:42pm #2
Log in or register to post comments