Topic locked

GearVR Passthrough Camera Not Working - AR/VR Sample

February 15, 2016 - 11:00pm #1

I just opened the AR/VR sample scene, went through the setup, and it runs great in my Note 4 with Gear VR.  Everything except the video passthrough.  All I get is black.  Is anyone else having this same issue?

AR-VR Sample (native Unity VR)

Unity Pro 5.3.1f1 32-bit (Also tried 64-bit)

Oculus SDK v 0.8.0.0

Gear VR Innovator Edition

Note 4

 

Thanks for the help!

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 10:48pm #27

I have solved it! See this: https://developer.vuforia.com/forum/issues-and-bugs/split-binary-unable-find-extended-root-locations 

Don't check Split  Application Binary item in the Settings for Android->Pulishing Settings, when to build android app.

Thanks for your help, freele.

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 9:51pm #26

jiahf, 

so, what's the problem? Have you checked missing files? You can try to add again Vuforia package, or if you already changed the project and don't remember what exactly you changed, just start from the beginning carefully.

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 7:14pm #25

Hi, freele:

      My logs show me that dataset not found:

I/Unity   ( 9979): Data set Stones not present in application package, checking extended root locations

I/Unity   ( 9979):  

I/Unity   ( 9979): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

I/Unity   ( 9979): 

E/Unity   ( 9979): Unable to find Stones in extended root locations

E/Unity   ( 9979):  

E/Unity   ( 9979): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

E/Unity   ( 9979): 

E/Unity   ( 9979): Dataset Stones could not be loaded and cannot be activated.

E/Unity   ( 9979):  

E/Unity   ( 9979): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

E/Unity   ( 9979): 

     not the license error.

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 11:59am #24

Resolved. It seems that the problem was with the license type. Just lost it in the beginning of the logs. No idea why I started to review logs from the end instead of the beginning. Well, it was fun. 

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 7:46am #23

Compile error. DigitalEyewearBehaviour is not defined.

UPD:

Updated Unity to 5.3.3 and Vuforia to 5.5.9 back. 

I fixed the first error (onPreRender)

These left

I/Unity   (19344): Switching to AR: activating datasets
I/Unity   (19344):  
I/Unity   (19344): (Filename: ./artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
I/Unity   (19344): 
I/Unity   (19344): NullReferenceException: Object reference not set to an instance of an object
I/Unity   (19344):   at TransitionManager.ActivateDatasets (Boolean enableDataset) [0x00000] in <filename unknown>:0 
I/Unity   (19344):   at TransitionManager.Update () [0x00000] in <filename unknown>:0 
I/Unity   (19344):  
I/Unity   (19344): (Filename:  Line: -1)
I/Unity   (19344): 
I/Unity   (19344): NullReferenceException: Object reference not set to an instance of an object
I/Unity   (19344):   at VRIntegrationHelper.LateUpdate () [0x00000] in <filename unknown>:0 
I/Unity   (19344):  
I/Unity   (19344): (Filename:  Line: -1)

 

UPD 2: 

Errors in LateUpdate and OnPreRender fixed by pasting

				mLeftCamera = DigitalEyewearBehaviour.Instance.PrimaryCamera;
				mRightCamera = DigitalEyewearBehaviour.Instance.SecondaryCamera;

The error now is in TransitionManager.cs in ActivateDatasets function:

    private void ActivateDatasets(bool enableDataset)
    {
        //Disable/Enable dataset
        ObjectTracker objectTracker = TrackerManager.Instance.GetTracker<ObjectTracker>();
		// Here is the error occures (no error if commented):
        IEnumerable<DataSet> datasets = objectTracker.GetDataSets();

 

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 4:51am #22

Could you try adding these 2 lines at the very beginning of OnPreRender() method in VRIntegrationHelper.cs:

mLeftCamera = DigitalEyewearBehaviour.Instance.PrimaryCamera;
mRightCamera = DigitalEyewearBehaviour.Instance.SecondaryCamera;

?

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 4:40am #21

https://developer.vuforia.com/forum/digital-eyewear/gearvr-and-arvr-sample-unity-only-shows-reticle

The errors are the same as mentioned here by @natwales

 NullReferenceException: Object reference not set to an instance of an object
I/Unity   (25857):   at VRIntegrationHelper.OnPreRender () [0x00000] in <filename unknown>:0 

This is on vuforia 5.0.10 and Unity 5.3.1 (yeah, still digging). Both with and without helper script workaround.

I must say that I have almost no experience with Android debugging (my background is mostly about web dev), so any clues how to proceed would be highly appreciated.

 

GearVR Passthrough Camera Not Working - AR/VR Sample

April 6, 2016 - 2:53am #20

Check the device logs, via ADB

(you can capture them after running a GearVR session by unplugging the GS6 from the GearVR, then reconnecting it to the Mac or PC via USB, then running "adb logcat -s Unity" from the command line)

 

GearVR Passthrough Camera Not Working - AR/VR Sample

April 5, 2016 - 3:22am #19
Hello everyone, I just spent quite a bit of time trying to run GearVR demo with Vuforia, and still no luck.
Input:
GearVR + Galaxy S6
What is done:
OSX, Unity 5.3.3f1 + Vuforia 5.5.9, both tactics
OSX, Unity 5.3.4p1 + Vuforia 5.5.9, both tactics + 'workaround'
Windows 32, 64, Unity 5.3.3 + Vuforia 5.5.9, both tactics + 'workaround'
 
What I got:
Unity loading screen, after that black screen with yellow dot in the center (well, two dots if run in debug mode without GearVR set)
AndroidSDK 5.0.1
Android version (Galaxy S6) 5.0.2
 
What works well: 
Vuforia sample apps without VR.
VR sample apps without Vuforia.

GearVR Passthrough Camera Not Working - AR/VR Sample

March 24, 2016 - 7:38am #18

UPDATE:

we have identified a simple fix for the GearVR integration using the VR Support in Unity 5.3.4 (also applicable to 5.3.3 patch p2/p3):

- open the VRIntegrationHelper.cs script, located in Assets/Vuforia/Scripts/Utilities

- replace the code in void OnPreRender() with the following code:

 

void OnPreRender()
{
    // on pre render is where projection matrix and 
    // pixel rect are set up correctly (for each camera 
    // individually) so we use this to acquire this data.

    if (IsLeft && !mLeftCameraDataAcquired)
    {
        if (
            !float.IsNaN(mLeftCamera.projectionMatrix[0,0]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[0,1]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[0,2]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[0,3]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[1,0]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[1,1]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[1,2]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[1,3]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[2,0]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[2,1]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[2,2]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[2,3]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[3,0]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[3,1]) &&
            !float.IsNaN(mLeftCamera.projectionMatrix[3,2]) && 
            !float.IsNaN(mLeftCamera.projectionMatrix[3,3])
           )
        {
            mLeftCameraMatrixOriginal = mLeftCamera.projectionMatrix;
            mLeftCameraPixelRect = mLeftCamera.pixelRect;
            mLeftCameraDataAcquired = true;
        }
    }
    else if (!mRightCameraDataAcquired)
    {
        if (
            !float.IsNaN(mRightCamera.projectionMatrix[0,0]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[0,1]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[0,2]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[0,3]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[1,0]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[1,1]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[1,2]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[1,3]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[2,0]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[2,1]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[2,2]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[2,3]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[3,0]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[3,1]) &&
            !float.IsNaN(mRightCamera.projectionMatrix[3,2]) && 
            !float.IsNaN(mRightCamera.projectionMatrix[3,3])
           )
        {
            mRightCameraMatrixOriginal = mRightCamera.projectionMatrix;
            mRightCameraPixelRect = mRightCamera.pixelRect;
            mRightCameraDataAcquired = true;
        }
    }
}

 

GearVR Passthrough Camera Not Working - AR/VR Sample

March 16, 2016 - 2:53am #17

I've been able to successfully build and run on GearVR the ARVR Unity sample of Vuforia 5.5.9, using Unity 5.3.3f1, following the detailed instructions here:

https://developer.vuforia.com/library/articles/Solution/Integrating-Gear-VR-and-the-AR-VR-Sample-in-Unity-5-3-and-above

However, when I tried the same project with Unity 5.3.3p2, I got black screen.

So, it seems there might be an issue specifically connected with the Unity 5.3.3p2 patch release.

At present I would recommend sticking to Unity 5.3.3f1 with Vuforia 5.5.9 on GearVR, which appears to work correctly.

 

Alternatively, if you really need to use Unity 5.3.3p2 or newer, you can integrate with Vuforia 5.5.9 with GearVR using the Oculus Unity Legacy SDK, following the approach documented here:

https://developer.vuforia.com/library/articles/Solution/Integrating-Oculus-for-GearVR-with-the-ARVR-sample

this approach is usually recommended only for Unity versions prior to 5.3 (e.g. Unity 5.2), as the integration procedure is a littlem bit more involved than in the other approach,  however in practice it also works correctly using Unity 5.3.3 up to and including the latest 5.3.3 patches p2/p3 and 5.3.4.

 

 

 

 

GearVR Passthrough Camera Not Working - AR/VR Sample

March 15, 2016 - 11:36am #16

I think i will stick to 5.3.1f1 32-bit, vuforia 5.

As this is currently working for me.

I guess when there are no game breaking bugs, its safe to switch to this new setup.

(5.3.3-32bit, vuforia 5.5.9)

 

GearVR Passthrough Camera Not Working - AR/VR Sample

March 15, 2016 - 9:19am #15

I'm using Unity 5.3.3p2 32 bit and vuforia 5.5.9. I followed all the steps for Integrating Gear VR and the AR/VR sample in Unity 5.3. Launching the App on the galaxy s6, in editor mode, the screen becomes black, sometimes after pushing the home button and the back button the camera starts, but the AR object is not rendered on the target, it flies. If I try to switch to the VR scenario the screen comes back again.

May be Vuforia 5.5.9 doesn't support Unity 5.3.3p2?

Any suggestion will be appreciate.

 

 

GearVR Passthrough Camera Not Working - AR/VR Sample

March 13, 2016 - 8:31am #14

When i connect the note 4 to gear vr, the screen pass to black screen and i can't do anything, and the note4 is hanged. Do you know what's happening?

Unity version: 5.3.1f1
And i'd followed all the steps:
https://developer.vuforia.com/library/articles/Solution/Integrating-Gear-VR-and-the-AR-VR-Sample-in-Unity-5-3-and-above

Thanks xD

GearVR Passthrough Camera Not Working - AR/VR Sample

March 11, 2016 - 1:51am #13

32bit on Windows, 64bit on Mac, as in previous versions.

GearVR Passthrough Camera Not Working - AR/VR Sample

March 10, 2016 - 6:06pm #12

5.3.3 64bit, both or 32bit?

GearVR Passthrough Camera Not Working - AR/VR Sample

March 10, 2016 - 11:16am #11

@Clamps and those in this thread who have been experiencing Unity Editor crash on Unity 5.3.1p4, 5.3.2 or 5.3.3,  you may be interested in knowing that

Vuforia 5.5.9 has been released and fully supports Unity 5.3.2 and 5.3.3:

https://developer.vuforia.com/library/articles/Release_Notes/Vuforia-SDK-Release-Notes

https://developer.vuforia.com/downloads/sdk

Also, make sure to check the Unity Migration Guide before upgrading to Vuforia 5.5:

https://developer.vuforia.com/library/articles/Solution/Migrating-Unity-Projects-to-Vuforia-5-5

GearVR Passthrough Camera Not Working - AR/VR Sample

March 8, 2016 - 3:34am #10

The crashing part was happening to me on 5.3.3 not on 5.4.0b.
have you tried 5.3.1f1 32bit version?
What are your desktop specs?

I'm on win10, 64bit.

GearVR Passthrough Camera Not Working - AR/VR Sample

March 7, 2016 - 9:11pm #9

I've found that if I use any version of Unity 5.3.x, it crashes to desktop the moment I click on the ImageTarget object.

The only way I've been able to setup the scene as described in the instructions is to use Unity 5.4.0b8. 5.4.0b7 crashed just like 5.3.x

 

I'm also building this to the Galaxy Note 4, using exactly the packages listed in the instructions.

I only get a dot.

Sometimes the dot is in front of what looks like a full-screen "V" that changes colour as I move my head around.

This looks a lot like an old artifact from a few months ago, where the screen would be divided diagonally as if it were two triangles. One of them would change colour. The other was black.

GearVR Passthrough Camera Not Working - AR/VR Sample

March 7, 2016 - 9:00pm #8

Hi all, after 2 long nights of testing, downloading and frustration.

This worked for me:

Please the right combination for me is the following:

Samsung Gear VR:
http://www.amazon.com/Samsung-Gear-VR-Virtual-Reality/dp/B016OFYGXQ < this one specifically

Samsung Galaxy S6.

Unity Version 5.3.1f1 - 32 bit / 64 bit doenst seem to work.

Im only using vuforia-samples-eyewear-unity-5-0-10.zip

and only imported the arvr-5-0-10.unitypackage, nothing else.

and proceeded to open the scene Vuforia-3-AR-VR.unity and followed the steps, which after a lot of tries, i memorized.
followed to the point you change the ARCamera.

Then procceeded to vuforia license manager created a mobile key and added it to the ARCamera Asset.
Changed the User Calibration ID to 0.
and set the camera direction to CAMERA_BACK.
Built and installed to my mobile phone via command line *adb install appname.apk*
openned the app, plugged the phone to the gear vr.
and i almost cried when i saw it working.

 

 

AttachmentSize
Image icon vuforia-compatible-unity-version.png44.29 KB

GearVR Passthrough Camera Not Working - AR/VR Sample

March 7, 2016 - 8:54pm #7

i have tried a configuration that seems to work.

Please read above

GearVR Passthrough Camera Not Working - AR/VR Sample

March 7, 2016 - 12:52am #6

hey bzundel,

WHat version of unity are using?

when testing this out i havent been able to make it work.

All I see is black and a dot.

Thanks,

Fch

GearVR Passthrough Camera Not Working - AR/VR Sample

March 6, 2016 - 7:46pm #5

I've followed all the steps in this thread and the official guide, and nothing worked. All I see is the coloured dot.

Anyone got any better ideas?

GearVR Passthrough Camera Not Working - AR/VR Sample

February 16, 2016 - 6:23am #4

I think I was coming across the same issue... all I see in my test app is a single green dot that is stationary and everything else is black.

GearVR Passthrough Camera Not Working - AR/VR Sample

February 16, 2016 - 2:23am #3

One note:

you don't need to import Vuforia SDK and then the ARVR-5-0-10 sample package in 2 seperate steps;

you can just import the ARVR-5-0-20 sample package directly (just one step), because the sample package already includes the SDK.

 

SOLVED - GearVR Passthrough Camera Not Working - AR/VR Sample

February 15, 2016 - 11:48pm #2

Well, got it all working.  Seemed there was something that I was getting wrong in my project.  Started with a new project.  Here's what I did:

  1. Open your new project.  It should be empty.
  2. Import the Vuforia SDK package for Unity from https://developer.vuforia.com/downloads/sdk by going to Assets>Import Package>Custom Package and choosing the package file that you downloaded from that link.
  3. Import the Vuforia Digital Eyewear Sample Package (arvr-5-0-10) for Unity from https://developer.vuforia.com/downloads/samples by going to Assets>Import Package>Custom Package and choosing the package file that you downloaded from that link.
  4. Go to https://developer.vuforia.com/library/articles/Solution/Integrating-Gear-VR-and-the-AR-VR-Sample-in-Unity-5-3-and-above and follow the steps for "Using Vuforia with Unity's Native VR Functionality"
  5. Print the PDF of the stones from YourProject>Assets>Editor>QCAR>ForPrint>target_stones_USLetter.pdf (or the A4 version)
  6. Start the app on your Note 4 or GS6
  7. Insert into GearVR
  8. Enjoy!

KEY TO SUCCESS...

I installed the SDK first, and then the eyewear sample package.  If I did it the other way, Unity told me that I had everything already, which is not true.  Install SDK first, then sample, and all should be well!

Good luck!

Topic locked