XR Plugin
This is Unity XR plugin on Quest 2 in Oculus App Rift mode.
93 Replies
Trying to fix remaining issues.
So non-Android build looks good. Just some issues with which DLLs to package I think.
Sweet!
I'll see if I can help with anything
Interestingly, if you look at the Oculus App now, under Beta, it says "OpenXR Runtime"
The faster we can get this fixed, merged into mainline and move on the better. It's almost there.
I fixed the build system for Unity XR. We still have VR SDK, as you can still use Oculus overlays with XR input. And we also want monoscopic, and video.
This is in Quest 2 Android. You can see controllers under floor! Haven't figured this one out yet. Why does it work on non-Android?
The star there are a couple of cubes i put at the VrSystem origin. It is on floor, as (I think) it would be.
Noticed this! they're really pushing towards openXR which is good
That's interesting ๐ค
Any ideas?!
Surprised it's any different from desktop oculus
I'll grab the quest and see what's up
Are there different floor values, or the cage is different on mobile?
That's what I was thinking might be the issue
Is there any emulators inside unity for mimicking an android based device?
There is a fake one in TB. There is a flag for it. Not sure about Unity.
Just been thinking about it, and I wonder if it is an order of initialisation thing.
pre Unity XR we create the controllers in Awake (I think), but in XR we query for them with callback for event, and they are created just before Start.
I did spend some time looking through this. I wonder if it is somehow different on Android.
I was looking at the assets, the prefabs to see if there is any difference, but I can't see any, and if there were it would have happened before this?
Ha! I have "spoof mobile hardware" turned on in OB and it didn't happen in the editor.
ooh, interesting. where's that flag?
ah!
Are running in Rift mode in Editor?
Yeah
All working?
okay i got it to init without any headset by enabling mock hmd loader in the plug in management
Useful to know
That for testing?
Yeah, though i'm not sure it provides anything other than the headset
Should I be setting the SDK mode to Unity Xr?
Use Oculus for Quest. I think UnityXr should work, it just uses mobile for overlays etc.
Ah okay, so it still gets funnelled through unity XR?
In theory we can use it for Vive and anything not listed.
it should do. There is a switch in App Config
Sdk Mode for editor, and controller input mode. Default uses the old controller SDK/mapping and XrManagement uses the new XrController, which should work for everything, as the mappings are all in Unity XR/OpenXR now.
It is temporary, the second switch. We should be able to replace all controllers with XrManagement (which is kind of the point of it)
Cool, and yeah I figured ๐ glad the mappings came across, that was apparently a pain point
It needs some testing. There are some legacy hacks in some of the controllers. They just come from features being added to various devices over time and the inconsistency between them.
I actually thought it would be harder. I mostly copied the Oculus one, so we'll see if there are differences or not.
I'm getting this error when trying to build for quest
which would be fun with OB's gamma preference
have you got it running linear?
I think the latest supports Gamma.
ah, i'll check for updates
Yeah mine is gamma.
I think the earlier Unity XR plugins only supported linear. They are gradually adding more features.
That's good to hear
I was worried they'd stick with only linear, which seems to be recommended for VR, i'm not knowledgeable enough to know why
okay yeah that looks to have fixed building, ta
Oh, where did you read that? Thought it would be the opposite. Good to have the flexibility of gamma.
The steamVR plugin constantly telling you off for using gamma ๐
I dont think it is just VR. Linear space is preferred for photo-realistic rendering.
Does it work?!
Sorry, for some reason it kept the old version of oculus utilities around when i upgraded, then adb duplicated itself causing builds to fail restarted PC and gone straight to building haha
you still need the Oculus SDK bc it uses assets from that.
Not the desktop, the Oculus Integration. The desktop should be gone. XR replaces this.
I thought I fixed that. I'm on 2019.4.25f
i'm on .28
is it possibly to do with the minimum sdk target?
This happens bc OB has its own gradle template, which we had to delete because it is obsolete.
I think i need to check that in.
i match this
that one?
I committed it.
okay, that worked
brb
I think whatever was added in that is now integrated into Unity.
uh, it's launching as a 2D app for some reason? ๐
in VR?
might have broken something while playing around, i'll resync branch
yeah!
I can't see anything in remaining diffs.
Project packages:
๐ค
Bedtime now unfortunately, early start ๐
I'll get there, thanks for your help so far!
Ok. I have seen that error, but I don't get it.
And thought i fixed it. Ok. laterz.
Aha! Fixed under the floor bug!
Oh, nice one!!
cool! Can we try it?
its in
back sunday
Ah. I keep looking in the wrong place. I was looking on your Github account. For future reference it's here: https://github.com/icosa-gallery/open-brush/tree/feature/xr_plugin
GitHub
GitHub - icosa-gallery/open-brush at feature/xr_plugin
Open Source Fork of Tilt Brush. Contribute to icosa-gallery/open-brush development by creating an account on GitHub.
Did you get this compiling and running on Android?
I've been ill all weekend so haven't felt like putting a headset on! gonna try tonight ๐
Oh no! Hope you are feeling better. I'm trying to get a Vive build together
Finally got around to it, it's working great!! Excellent job ๐
I was meant to be using these settings right?
Only thing i noticed was that the start point was off the ground compared to where it should be - compare to official release as you spawn in for reference
I also tried UnityXr -> Android -> mono, which started to load with our loading logo, but after that it was just black
I also had to raise the minimum api level to 25 from 23
Does that mean we can try flipping the AR passthrough on? ๐
Oculus works. Still canโt get Wave XR plugin to load. I got APK installed and you can see it running and OB loading screen there but not presenting properly.
I can give it a shot!
That fixed now
As in "Wave is now working"? Does it run on the Focus properly?
No. Oculus android works but wave is crashing. Something to do with EGL. Iโll try and sort out this week and ask them.
Tried to get this working this evening but no joy. Wave plugin seems problematic.
Well - this is where Vive can pull their finger out and help.
Forgot to say that I tried to build for UnityXr + Windows, it built fine but on running, I get the tiltasaurus message. running in unity it seemed like the HMD detection happened after the Start function checks to see if a headset it valid
Same for me with a Quest. I tried Virtual Desktop, Oculus Link and I tried with both SteamVR and Oculus as the OpenXR runtimes.
@bill any chance this is related to your Focus issue? i.e. this is a problem in all builds rather than being Focus specific? Can you build for any other platform?
@bill - you back yet?
Not sure what you did to the editor build pipeline but damn it's fast iteration now
The UnityXr mode is a little misleading and I am wondering if we need it. I was thinking we'd move to a generic XR mode, but a lot of things are hardwired to the SDK mode and we can't auto detect it until after Start, as the devices aren't detected until then by Unity XR. We may be able to have a UnityXr mode in the future when OpenXR settles down and provides all the functionality of the various SDKs, e.g. hand posing, (pass through?) etc. You need to set the SDK mode as before. Think of it as the distribution.
If you chose Oculus SDK mode, link mode, and use a Quest 2 it works for me!
yes!
PC builds: UnityXr mode fails as described. Oculus mode works fine for Rift.
I moved it over to XR plugins and fixed a couple of flaky issues.
Rift via Quest 2 seems to work just fine for U2020.3. May need Unity OpenXR XR plugin for Index. Will try Index this week.
U2020.3 with OpenXR plugin!
Oh God, may have to move to the new input system. ๐ฎ
So we could gain passthrough but lose MRC (at current, just for rift)
this was the prompt once updating to v35 by the way
hmm, we might need to commit this oculus project config file, it's in the gitignored oculus folder.
I wonder if we can maintain alternate builds until the OpenXR is at parity with OVR
Probably. that's gonna be a fun one for the build pipeline :p the prompt did say it was easy to switch so we can probably hook that
OpenGL ES with OpenXR also requires the colour space to be linear, which worked fine before but we'll need to make sure everything is using the same colour space. I think we noticed reference images didn't change automatically ๐ฌ
@bill the left white eye/right black eye seems to be coming from having these scripts on the eye camera. if you disable them, you get something coming through! left eye seems okay but right eye seems to be lacking a clear buffer or something like that, anything over the horizon of the default environment starts to blur like crazy
Controllers are slightly rotated backwards compared to real world, i'm guessing that might be an offset that the SDK is compensating for that we may not need anymore? or vice versa ๐
And finally, none of the actual panel UIs are showing, though I'm not sure if i accidentally turned something off so ymmv
@bill here ๐
Yes i noticed that. I think OpenXR is rotated forwards 90 deg
Really wish threads stayed open ๐ฆ anyways, interesting discussion on the oculus start discord, apparently oculus is being really confusing with naming? you still have to use the Oculus XR plugin In OpenXR Mode specifically if you want nice features like handtracking and passthrough, NOT unity's own OpenXR plugin
so we may still need the build pipeline to differentiate for oculus's special sauce for now. really annoying and bad messaging on their part, who cares how you're interfacing with the headset if you're required to use your own proprietary backend!