Hello,
I am trying to create a very basic Vuforia application in Unity. I followed the "Getting started with Vuforia Engine in Unity" at https://library.vuforia.com/getting-started/getting-started-vuforia-engine-unity, but am encountering a "failed to create ImageTargetObserver: DATABASE_LOAD_ERROR" error that prevents the whole thing from displaying anything once I press Play.
I'm on Windows 10, Unity 2021.3.16f1 LTS, Vuforia 10.12.3. Desktop + a Logitech C270 external camera. Here's my complete project walkthrough:
- Create a new 3D project from Unity Hub in Unity 2021.3.16f1
- Import the Vuforia unitypackage, click Import, click Update when prompted
- Add an ARCamera to the scene
- open the configuration from the ARCamera inspector
- input my license key and click "Add license" (which opens up the License Manager page on Vuforia's website, ignored that)
- delete the MainCamera
- add my custom PNG to the project assets
- add an ImageTarget to the scene
- in the inspector, select Type > From Image and select my PNG in the list
- add a Cube as a child of the ImageTarget and place it above the ImageTarget in the scene
At this point, my project's hierarchy is completely identical to the one described in the official tutorial linked above. However, when pressing Play, my camera's status LED flashes up for a fraction of a second before I get an error (only a black screen is displayed). Here's the full trace:
Exception in callback: Failed to create ImageTargetObserver: DATABASE_LOAD_ERROR. UnityEngine.Debug:LogErrorFormat (string,object[]) Vuforia.Internal.Utility.UnityLogger:LogError (string,object[]) Vuforia.Internal.Utility.Log:Error (string,object[]) Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate (System.Delegate,object[]) Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling<Vuforia.VuforiaInitError> (System.Action`1<Vuforia.VuforiaInitError>,Vuforia.VuforiaInitError) Vuforia.Internal.Core.Engine:InitOnCameraReady () Vuforia.WebCam:HandleFirstWebCamFrame () Vuforia.WebCam:<Init>b__33_0 (bool) Vuforia.Internal.Utility.VuforiaCoroutineUtility/<RunCoroutineWithTimeout>d__1:MoveNext () UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
This error is similar to the one depicted in this older thread on this forum: https://developer.vuforia.com/forum/general/failed-create-imagetargetobserver-0
However, reinstalling Unity & Vuforia didn't help, neither did trying this in Unity 2020.3.44f1 LTS or replugging the webcam multiple times.
Is this a known issue?
Thank you for your help!
Hey there,
Hey there,
Can you share the Image Database so I can see if the issue is reproducible based on your provided steps?
Thank you!
Kind regards,
Patrick Scheper
Vuforia Engine Product Manager
Hi,
Hi,
Thank you for your answer. Assuming by "database" you mean the image file I load into my Unity project assets, this is a link to one of the sample images I tested: https://i.pinimg.com/736x/90/bd/34/90bd3417b567a2ede0b888d305f8fb80.jpg
Hey there,
Hey there,
Hello,
Hello,
Hey there,
Hey there,
Very strange. I tried to reproduce the same issue as you're experiencing but (sadly) I was able to not reproduce it and was able to track the image (see .zip file video). I followed the same steps as you described.
Hi Patrick,
Hi Patrick,
Today I tried using a
Today I tried using a different webcam and Unity gave me a black screen.
There could be several
There could be several reasons why you are getting a black screen in Unity despite the webcam being functional in other applications. Some possible causes are: