Description

Moved from Parent

Cloud Recognition Vuforia Not Scanning

Hello,

I am trying to scan my Image Targets uploaded on the Vuforia Cloud Storage. I am loading my assetbundles from a JSON file which are present on the Google Drive. But whenever I build the app, it doesn't scan the Image target. However the same code was working few weeks back now I need to add some more features but unfortunately I am not able to perform scanning.

SimpleCloudRecoEventHandler.cs

<pre class="brush: csharp">

using UnityEngine; using Vuforia; using System.Collections; using System.Collections.Generic; using UnityEngine.Networking; using UnityEngine.UI; using SimpleJSON;

public class SimpleCloudRecoEventHandler: MonoBehaviour {     private CloudRecoBehaviour mCloudRecoBehaviour;     private bool mIsScanning = false;     private string mTargetMetadata = "";     public string mTargetId = "";     public ImageTargetBehaviour ImageTargetTemplate;

    // Register cloud reco callbacks     void Awake() {         mCloudRecoBehaviour = GetComponent < CloudRecoBehaviour > ();         mCloudRecoBehaviour.RegisterOnInitializedEventHandler(OnInitialized);         mCloudRecoBehaviour.RegisterOnInitErrorEventHandler(OnInitError);         mCloudRecoBehaviour.RegisterOnUpdateErrorEventHandler(OnUpdateError);         mCloudRecoBehaviour.RegisterOnStateChangedEventHandler(OnStateChanged);         mCloudRecoBehaviour.RegisterOnNewSearchResultEventHandler(OnNewSearchResult);     }     //Unregister cloud reco callbacks when the handler is destroyed     void OnDestroy() {         mCloudRecoBehaviour.UnregisterOnInitializedEventHandler(OnInitialized);         mCloudRecoBehaviour.UnregisterOnInitErrorEventHandler(OnInitError);         mCloudRecoBehaviour.UnregisterOnUpdateErrorEventHandler(OnUpdateError);         mCloudRecoBehaviour.UnregisterOnStateChangedEventHandler(OnStateChanged);         mCloudRecoBehaviour.UnregisterOnNewSearchResultEventHandler(OnNewSearchResult);     }

    public void OnInitialized(TargetFinder targetFinder) {         Debug.Log("Cloud Reco initialized");     }     public void OnInitError(TargetFinder.InitState initError) {         Debug.Log("Cloud Reco init error " + initError.ToString());     }     public void OnUpdateError(TargetFinder.UpdateState updateError) {         Debug.Log("Cloud Reco update error " + updateError.ToString());     }

    public void OnStateChanged(bool scanning) {         mIsScanning = scanning;         if (scanning) {             // clear all known trackables             var tracker = TrackerManager.Instance.GetTracker < ObjectTracker > ();             tracker.GetTargetFinder < ImageTargetFinder > ().ClearTrackables(false);         }     }

    // Here we handle a cloud target recognition event     public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult) {         TargetFinder.CloudRecoSearchResult cloudRecoSearchResult =             (TargetFinder.CloudRecoSearchResult) targetSearchResult;         // do something with the target metadata         mTargetMetadata = cloudRecoSearchResult.MetaData;         // Unique target id         mTargetId = targetSearchResult.UniqueTargetId;         // stop the target finder (i.e. stop scanning the cloud)         mCloudRecoBehaviour.CloudRecoEnabled = false;         // Build augmentation based on target         if (ImageTargetTemplate) {             // enable the new result with the same ImageTargetBehaviour:             ObjectTracker tracker = TrackerManager.Instance.GetTracker < ObjectTracker > ();             tracker.GetTargetFinder < ImageTargetFinder > ().EnableTracking(targetSearchResult, ImageTargetTemplate.gameObject);         }     }

    void OnGUI() {         // Display current 'scanning' status         GUI.Box(new Rect(100, 100, 200, 50), mIsScanning ? "Scanning" : "Not scanning");         // Display metadata of latest detected cloud-target         //GUI.Box(new Rect(100, 200, 200, 50), "Target ID: " + mTargetId);         // If not scanning, show button         // so that user can restart cloud scanning         if (!mIsScanning) {             if (GUI.Button(new Rect(600, 2200, 250, 100), "Scan Another ARt")) {                 // Restart TargetFinder                 mCloudRecoBehaviour.CloudRecoEnabled = true;             }         }     } }

</pre>

Issue with Standard Model Target generation

During generation of standard model target I am facing error code saying 'Model Target generation failed' without any explanation (screenshot in the attachments). I was trying another .obj and any types of 3d objects but no success at the end unfortunately.. It makes a lot of problems for me because I have to generate this specific model to import it and track in my application made in Unity. Could you please advise me what should I do in this case ? I have checked the same application on my friend's macOS system and it is working as expected but for me not which is suprising me.

Model Target Generator - version 10.6.3

vup file as well as all screenshots attached.

Please let me also know if do you need something else to troubleshooting activity.

Hey there,

 

Could you share the .obj file with me through the forums? 

 

Kind regards,

Patrick Scheper

Technical Community Manager

Hey there,

 

I was not able to reproduce your problem. I was able to successfully create a Standard Model Target through the MTG. I would recommend checking your files though. Especially the .obj file positioning was not centered and strange. (see attached picture)

Attachment

Problem training model target

I was trying to train a model target but i received an error asking me to contact support

 

Training failed: Something went wrong. Please retry later and contact support if the issue persists

 

Any idea what i am doing wrong? 

 

Justinrobinson770

Tue, 04/26/2022 - 01:37

Im having the same issue, I can get all the targets generated, but when I get all the way to pressing the train button nothing happens.  The train button goes grey and it even says pending for about 30 seconds, it hen returns to the unchecked version of the train button.

Hey both,

 

@zoggie, it seems that your unit size is too small (4 by 2 by 0.5 millimeters). I think you should increase your unit size. 

Model Target generator display issue

Hi,

I am trying to use my GLB model as model target in "Model Target Generator 10.5.5" tool (under windows 10 OS). I can launch the tool, add the model but have difficulties to see it in the list and event more annoying I cannot open it to configure it so I cannot achieve the BDD training and use it in my Unity app.

Is there a configuration I can do (setting parameters in a config file or adding compatiblity features while launching) to fix that ?

I saw some older posts talking about something similar (but in 2019 I think), I hope you could help,

Regards,

Marc

Hey there,

 

I believe the GLB file format is not supported. You can find the supported formats here: https://library.vuforia.com/objects/model-target-generator-user-guide#model-requirements-and-preparation

 

Kind regards,

Patrick Scheper

Create AssetBundle as child of the Image Target

I'm trying to make an AR app where I'm loading asset bundles from the server. Asset bundles are loaded perfectly from the server but I want them to load as the child of image target.

I'm following this script for loading the asset bundle: https://library.vuforia.com/articles/Solution/Working-with-Vuforia-and-Unity.html

The attached image is showing how it is currently loading.( I want that assetbundle to be the child of ImageTarget).

Hey there,

 

It sounds like you should parent your objects after loading onto the Image Target.

 

Kind regards,

Patrick Scheper

Technical Community Manager

Attachment

Model Targets Android Zoom Unity

Hi, I exported my app to Android but for some reason the camera starts with a zoom in, how can I change this?

Hey there,

 

Can you share some video footage of the issue you're describing? Also please share more details: https://developer.vuforia.com/forum/general/how-report-technical-issue

 

Kind regards,

Patrick Scheper

Sure, here in this video you can see the difference in zoom between the device camera and the Vuforia App

 

https://www.youtube.com/watch?v=gmzH928ZhWk

the streamingasset folder read only

I want to dynamicly load mode target data, but the streamingasset folder read only. How to solve the problem?

Hey there,

 

If the Model Target is stored in the StreamingAssets folder it should be fine if it's read only? Are you experiencing any issues with that?

 

Kind regards,

Patrick Scheper

Technical Community Manager

Model target Database: Included Files

Hi everyone, 

Can someone tell me what files are included in the Model Target Database? 

I guess:

- authoringinfo.xml is for informational reasons for unity/ vuforia

- LokinkRaderv3.xml might be something for the Guide View????

- LokinkRaderv3.dat is the 3D Model for detection

 but what is this 193ecc5814.... in the Editor?

 

I need this information for my thesis- Thanks!

 

 

Hey there,

 

Would love to help you with your thesis. Here's some more information about the files that are imported in Unity when you add a database:

Attachment

Model creator failed to create model

I have a scanned 3D model in obj format. I load it into the latest 10.3 Model creator and everything is all green lights across the top. I click created model target and I just get a pop up that says it failed. No more info and I can't find any logs.  However in my old 8.x version of model creator it creates the model just fine.  Any advice on where I could look to figure out this failure? 

 

I tried to attach my obj file but the forum says:

The file inside_breakera.zip could not be saved, because it exceeds 0 bytes, the maximum allowed size for uploads.     The file in the field was unable to be uploaded.

 

Thank you.

Hello,

Can you upload the file that fails to a sharing service and post the link here? This would give us the best opportunity to evaluate the issue.

Kind regards,

Dave Downing

Technical Support

Multiple Model targets to one Model Target

Hello everyone, 

I just found out that it is not possible to track several model targets at the same time. In my Unity project we have a big problem that we have over 2000 models which need AR content. It is too much work to edit every single one. So the idea was to split them up in 4 different components (e.g. arms, legs, body, head), each of them with different variations (long body, short body, ...). The idea was just to download the necessary parts (e.g. short arms, long legs, round body and red head) and make each of them so a single model target. 

Now that this is not possible, I need a different solution. Since every part is always at the same position I asked myself if it is possible to download several 3D-Models (+AR-Content) and merge them to one big Model Target. 

Thanks for your help and I am also happy for any other ideas. 

Sophie