Log in or register to post comments

Using Cloud Reco to set 3D text (Unity)

May 9, 2018 - 2:04pm #1

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.

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. 

Using Cloud Reco to set 3D text (Unity)

July 20, 2018 - 10:53am #3

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

Using Cloud Reco to set 3D text (Unity)

May 12, 2018 - 7:12am #2

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

Log in or register to post comments