"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Using Cloud Reco to set 3D text (Unity)

I have a use case where an 3D text has to be set based on the scanned imagetarget. I have tried the three examples given by Vuforia (The books example, the vuforia core example and the guide written on https://library.vuforia.com/content/vuforia-library/en/articles/Solution/How-To-Implement-Cloud-Reco.html)

I have 2 images with an ID as name, and can be found while i try my application (i can Debug.Log the meta data). Everything works when i use an deviceDatabase, but i'm planning on adding extra images later on.

  • When i recreate the example given in the guide (https://library.vuforia.com/content/vuforia-library/en/articles/Solution/How-To-Implement-Cloud-Reco.html) the application breaks when i press "Restart Scanning" with the following error:

Exception in callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object   at Vuforia.StateManager.UpdateTrackablePoses (UnityEngine.Transform arCameraTransform, .TrackableResultData[] trackableResultDataArray, .VuMarkTargetResultData[] vuMarkResultDataArray, TrackableIdPair originTrackableID, Int32 frameIndex, Boolean updateTrackableStates) [0x00000] in <filename unknown>:0

However i can see an 3D text that follows the imageTarget.

  • When i try to edit the Books and Core (scene 3 - Cloud reco) example i can see that the 3D text has been set to the info i expect it to be. But the 3D text doesn't show up. I tried to reverse-engineer these projects but had no succes.I do not understand the CloudRecoContentManager at the Core Sample. I've got it working with editing the "OxygenTank" prefab to a 3D text but this is not what i'm planning to do (the prefabs and augmentations are hardcoded)

Summary

I have multiple images in my database with certain ID's as names (for the sake of testing). When Vuforia recognizes an target the name (read ID) will be set in a global 3D text object/ text mesh. I'm editing the "value" of text in my code.    

Question

Is it possible to use one text object for multiple imagetargets and what would be the best way to accomplish this? I do not have to display different kind of 3D augmentations/objects. I just need the image for setting certain parameters and set the 3D text. 

5Groningen

Sat, 05/12/2018 - 14:12

I've got it working. I used the books example and heavily edited the CloudRecoEventHandler and content manager (attached to the cloud UI object).

digitalillusions

Fri, 07/20/2018 - 17:53

5Groningen, Could you please elaborate more how you got rid of the exception you mentioned? I'm facing the same issue here when a try to restart the scanning process in the Cloud Reco.

 

Unity 2018.1.0f2

Vuforia: 7.1.31

 

Thanks