Log in or register to post comments

Vuforia not initialized error or black screen_June 2020

June 8, 2020 - 10:40am #1

Hello ,

I have Unity 2019.3.12f1  and Vuforia 9.1.7 .I have ARCamera which Im running some animation when camera opens .The camera is added to the scene but not active until I activate the ARCamera via the the SetActive(true) code .

Sometime Vuforia fails to initialize which will result in some green screen with message Vuforia failed to initialize and sometimes the camera and AR opens but the background is black and I see frame rate drops .On Android ,I find this message ErrorSpacePayload='ArStatusErrorSpace::AR_ERROR_NOT_YET_AVAILABLE'] in Logcat 

The issue happens on Android and much less on IPhone ,my inquiy is :

-How can I make sure the Vuforia is ready before the Camera is opened ? I cant find a way to hook into the code and test this .And if Vuforia is not ready what should I do ,try to open it again ?

-What could be the reasons these errors happen ?

-What option of the camera device mode (Mode_Default ,Optimize_Speed,Optimize_Quality ) causes less frame rate drop and enhance animation performance in the AR experience .

Thanks in advance .

Regards

Ayad

Vuforia not initialized error or black screen_June 2020

June 15, 2020 - 1:15pm #7

Can you please help how to make sure ARCamera is ready before setting the ARCamera to active ?

 

Regards

Ayad

Vuforia not initialized error or black screen_June 2020

June 12, 2020 - 3:45am #6

Hello ,

Can you help clarify what is the code and the order it should be implemented and what other cases should trigger that ARCore error ?

Regards

Ayad

Vuforia not initialized error or black screen_June 2020

June 10, 2020 - 8:58am #5

How do you suggest I do this properly ,what is the code and the order it should be implemented ? And what other cases should trigger that ARCore error ?

Regards

Ayad

Vuforia not initialized error or black screen_June 2020

June 10, 2020 - 7:00am #4

Hi,

I believe the issue might be regarding the instantiation process. If you only instantiate the camera in a non-ar scene, then it will fail as first you need to init Vuforia Engine. You have this error: AR_ERROR_NOT_YET_AVAILABLE which is related to ARCore

If this is the case, my advise would be to init Vuforia normally, deactivate the camera and than only activate it when you need it.

Thank you.

Vuforia Engine Support

 

Vuforia not initialized error or black screen_June 2020

June 9, 2020 - 1:12pm #3

Thank you for getting back quickly .

Im using OnePlus 6 with Android 10 and OxygenOS 10.3.3 and iPhone 11 .Im building an augmented reality game in unity where 3d object animation is run in the augmented reality and camera is rotated using gyrscope .Im not doing any tracking and even disabled pose tracking ,just using the ARCamer as a place for the character animation .

What Im doing is Im adding an ARCamer the usual way and attached code it to play the animation ,then I would disable the ARCamera to make it inactive, and then create a prefab of the ARCamer object .During the game and when the game conditions are met ,I would instnatiate the ARCamer and keep the main camera active as follows :

     

       _AR_Holder = Instantiate(ARHolder);

       ARCamera = _AR_Holder.transform.Find("ARCamera").gameObject;

       ARCamera.SetActive(true);

 

After that line the camera would open in the AR and I see the 3d animation and when the animation is done ,I would destroy the ARCamera object using Destroy(ARCamera) .

 

I include two files ,one taken from inside the Android Studio ,where you can see the AR error .And one taken using the command line as your suggestion .

 

Regards

Ayad

 

 

 

 

 

AttachmentSize
Plain text icon LogcatViaCommandLine.txt26.8 KB
Plain text icon LogcarFromAndroid.txt40.87 KB

Vuforia not initialized error or black screen_June 2020

June 9, 2020 - 7:33am #2

Hi,

 

Could you please confirm the Android/iOS device you are seeing this?

Would it be possible to get the entire logcat dump using $ adb logcat AR:D Unity:D *:S after you reproduced the issue?

Also, could you please elaborate on your scene, using a MainCamera and ARCamera, what is the exact order and the purpose.

In regards to your last question, try using the option MODE_OPTIMIZED_SPEED. ( it is the least resource incentive)

Thank you.

Vuforia Engine Support

Log in or register to post comments