google carboard vr

I followed this tutorial (98) Google VR Cardboard Tutorial - Unity 2019 - YouTube but when i got the player setting it doesn’t have an option for vr supported. I followed all the steps and triple checked the check box isnt there.(sorry im new)

I think that’s slightly old info.

Cardboard sdk is handled outside of unity. They will probably lock this thread unfortunately. If so, PM me if u run it to trouble I just went through the setup a few days ago (only on android) or go to github

Here is the quickstart guide

It says only OpenGLES2 is supported but that is old info.
OpenGLES3 is now supported

https://github.com/googlevr/cardboard-xr-plugin

I was able to get everything working but it’s a little laggy feeling or motion blur, something not great about it compared to cardboard apps on the store, or compared to YouTube. Still trying to figure that out but until then I’m not feeling like its usable for me

I’m interested to know if the “hello cardboard” test scene using xr plugin with unity performs different than the native compiled apk. I have not tried that yet

thanks for the time i was trying to follow the developers.google carboard thing and i am having trouble installing git and setting it up. Is git optional and if its not how do i set it up. I searched up tutorials and they are all so confusing

You don’t have to install git, but you might want to try. I was also not using Git and got it to install after a bit of frustration
I will give options for both:

Instructions for windows 10 install git:

Install git w default options from the website

windows 10 start search area…start typing “environment”
select : “edit system environmental variables”

click:
…Environment Variables
…System Variables
…Path
Edit

add these new: (assuming this is where these are installed)
C:\Program Files\Git\bin\git.exe
C:\Program Files\Git\cmd

restart unity, maybe computer too i’m not sure.
command prompt, type git, enter. it should recognize it is there.

try unity importing the cardboard SDK again



if NOT using git:

go here

The green “code” button zip does not have the full files ( or didn’t before)
on the right side of this page, click releases, v1.4.1 latest…
it brings you here, for now:

download source code.zip

unzip it somewhere.

Create new 3d project
Package manager: click the +
“add package from disk”

find package.json from the newly unzipped folder)
cardboard-xr-plugin-1.4.1 > package.json

package manager should show the package, then samples inside it, hellocardboard
import that. Follow the rest of the instructions on the quickstart guide

note:
use OpenGLES3 when you get to the instructions that current say OpenGLES2
(take out vulkan i believe)

if the android manifest is not in your project files when it wants you to edit that part:

check off:
edit: project settings> player>publish settings >
custom main manifest

it will show up now in your project and you can edit it as the quickstart guide wants

make sure to uncheck optimize frame pacing when the instructions say so.

This should work.
I just now did a test on my PC importing the SDK this way instead of git and it works, the git way works too

I think the new CardboardVR plugin works really nice. The new Unity XR system also feels like an improvement.
Would say the new Cardboard test scene is comparable with the old one. It´s the one to one tracking that make it feel a bit laggy, and I guess it´s a side effect from the limited field of view. To make it more fit for gaming you has to crank it up a bit yourself by letting the camera rotate more to make a full turn in less than 360 degrees.

Still missing a proper method for recenter the tracking though.

Can you explain further? I’m not sure what you mean by one to one tracking or how I might crank it up myself

Turn your head 360 degrees, and the camera will also make a full turn. So if you are looking stright forward and wants to see something at 90 degree angle in some direction, the limited fov forces you to turn the head a lot more compared to real life. That makes if feels soggy, or laggy. One way to compensate for it is to let the camera turn more than your head so you dont have to turn your head so unaturally much when playing the game, and make it feel more snappy.

It´t easy to test by holding your hand at the side of your head, and note how much (little) you have to turn the head to see it. Compare that to the much more movement needed in the game.

Would you mind pointing me in the direction of how to change that?
I adjusted the Field of View on the camera in the inspector, but that must not be what your talking about as it keeps the same head turning amount/speed

The framerate on my pixel xl4 android is reading out as 200+ fps w cardboard app. with FPS bogs down as the motion blur happens.

I cannot seem to lock it to a lesser framerate. searching around seems to indicate its set by the SDK for most or all VR sdks. Anything I do to set the FPS or vsync seems to get ignored. The phone itself indicates its refresh rate is 90. This is also what non-VR unity apps read out as (90fps).

So, kind of seems like the 200fps is an issue.

I have a motorola g-shit android or something and it reads 30fps w cardboard. Its hard to compare them…

but reading out 220 fps and then bogging to 170fps seems match timing w the motion blur im describing

Don’t think the frame rate has so much to do with it. One way is to just check how much the XR subsystem has turned the camera since the last frame, and then add some fraction of it in y, to the player, or the camera parent.

Well I seemed to have failed to figure that out.

I cant figure out how to access any info related to xrsubsystem
I tried to edit the tracked pose driver but it over writes whatever i save in that file.
I did increase the camera rotation based on old/new frame difference in another class, but that doesn’t interact well with the pose driver, or whatever is setting the camera.

That being said though. When I run “cardboard” demo app from google play, everything is smooth, and its also 1 to 1, I spin my chair 360 degrees and land in the same position on screen.

What I’m seeing is w the unity hellocardboard build is almost a jitter, turning head fast or slow. I don’t think increasing the rotation speed will change it… I feel like there has to be a stupid setting I am missing.

Even If I figure out how to change the rotation speed as you say. If your turning your head slowly looking at something it still will see jitter I believe.

I think this person might be referring to the same problem as me
https://github.com/googlevr/cardboard/issues/163

The response was:
the sensor fusion is performed by a Kalman filter in the SensorFusionEkf class. You can find details about its implementation here.

but I don’t find the equivalent to that file in the unity sdk version

If its not obvious I’m still fairly new at this

What phone are you using that you feel its working well on?

Yeah it would be nice if there was a setting for it, to change the game camera rotation ratio from the real world head rotation. For now I guess you have to keep track of it yourself by storing the eulerAngles, or localEulerAngles in each frame to see how much it has changed to the next frame.

I haven’t noticed any jitter from the new XR subsystem. The only degradation was when using the old built in VR in Unity 2019.4, where the tracking made the camera vibrate, like never before, kind of moving the camera one step forward, and a half step back every second frame.

It almost seems that way on my device now. intermittently, its not really a lag thing as much as something seems off w the frame timing.

looks like someone else just filed a similar issue:
https://github.com/googlevr/cardboard/issues/180

does someone have a tutorial or a video i can watch, i suck at following direction. I am 13 so i have a lot of school work and i totally forgot about my project i was working on.

Think there aren’t any youtube tutorial for it yet, only for the previous VR SDK which is fine for Unity 2018.
Maybe you could make one for the new XR System? :slight_smile:

All the the few steps for the new XR System are in the quickstart guide as Treecrotch pointed out. Just add the demo scene. The stuff for downloading Unity, and building the app, and running it on a device are the same as for any non VR game for Android, or iOS.

not yet that I know of

You do not have to use git if you don’t want to. You can do this instead:

That should get you past the git part you first reported being hung up on.
There are some other details in post#4 if you run in to a snag with the quickstart guide.

I agree videos are nice, but if you keep at it line by line its not to difficult to get the sample project going.

I was complaining of poor tracking in cardboard SDK on my android pixel 4 xl.
similar threads over at github were pointed towards this bug

I’m going to assume i am experiencing this same issue, I think my original description siting “motion blur” was not really the best choice of words.

I still remain at a point where I cant build anything with this for my pixel without it performing worse than any other cardboard app on google play

I couldn’t get it to work probably because im dumb but i followed all the directions. Im using it with unity remote 5 which is working but the tracking is not working, when i rotate the phone the game doesn’t do anything.
here what i did for the directions
I tried doing it without git but there were no json files to choose from so i chose the git way
I added the package from git url with this url GitHub - googlevr/cardboard-xr-plugin: Google Cardboard XR Plugin for Unity
I skipped steps 5 and 6 because they are just for the scene
then i switched platfroms to android
then i switched the defaul orientation to landscpq left and unchecked fram rate pacing.
Then removed vulcan and kept opengles2
then i selected IL2CCP
I choose both ARMv7, ARM64
then i slected require internet acess.
then i went to build settings and selected custom main graddle templete and also checked custom main manifest and checked custom launcher manifest
then i went to Assets/Plugins/Android/mainTemplate.gradle
i clicked on maintmeplate which opened a notepad and I pasted this
implementation ‘com.android.support:appcompat-v7:28.0.0’
implementation ‘com.android.support:support-v4:28.0.0’
implementation ‘com.google.android.gms:play-services-vision:15.0.2’
implementation ‘com.google.protobuf:protobuf-lite:3.0.0’

in the notepad,

edit: sorry for the bad spelling i was in a hurry

then i went to Assets/Plugins/Android/main manifest
and clicked on androidmanifest which opened visual studios and I pasted
<application android:requestLegacyExternalStorage=“true” … >


in the visual studio

then i went to project settings and Selected Cardboard XR Plugin under Plug-in Provider
then i changed the devices to all android devices
it is appearing on unity remote 5 but its not in vr form

plzz help

So you do see the hello cardboard scene but nothing happens?
can you do a debug build sent to the phone and check for errors? Can you just push it to the phone like a regular build with no unity remote?

I’m not all that experienced around here either, I’ve tried unity remote before and couldn’t get it to work so I’m not familiar with it.

I do recall running in to a situation at first where the hellocardboard was on the phone but nothing happening. when i published a debug build and linked it up there was an error i had to fix.

…i would assume unity remote does something similar

EDIT:
oh i see you said you skipped the steps with the sample scene. I would go back and get that sample scene working. It has the camera setup with the tracked pose driver and stuff.

get the sample scene working. and then all you have to do is turn off the “cuberoom” game object and you basically have a blank working with camera and tracking and stuff.

Without that sample scene, even if you did import the SDK properly you didnt setup a camera w the components it needs.

also are you able to import from git without error now? if not then nothing is in there

I got the hello cardboard scene but nothing really happens, there are no errors either. I tried building the game but it kept saying build failed so i just used unity remote 5. the scene shows up but the camera doesnt move at all