OpenXR and the Oculus Quest 2

So I’ve made progress on a few fronts, adding some custom actions to the vtk_openxr_actions.json and changing the corresponding bindings in the oculus controller json allows for the interactor to add a set of new actions using iren.AddAction(), I then added some dummy observers to check the actions were being processed.

Currently I’m just using a convention (PrimaryButtonAction, SecondaryButtonAction) to describe the (B/A and Y/X) button pairs, having the top buttons (B & Y) be the primary action felt more natural if a little confusing in the bindings. I moved the action showmenu to /user/hand/left/input/menu which works great, in general the righthand menu button should be reserved for the oculus system so I’ve left that one unbounded.

Something that’s not clear to me is how to properly emulate the LeftButtonReleaseEvent for the buttons. Using a dummy observer I can see that VR button releases also just trigger the LeftButtonPressEvent. Looking at the C++ method HandleBooleanAction it seems like the press state is recorded, but I don’t know how to pass that information.

I added the thumbstick click as a middle button press, that was actually pretty easy to do. @Lucas.Givord it looks like there’s some discussion in one of the pull requests for the VTK bindings about the difference between input/a/click and input/a/touch, I’m pretty sure these two come from the fact that the oculus controllers have capacitive buttons that sense when your thumb rests on them without pressing. There’s also a small capacitive pad on each controller that is sometimes used to show where your thumb is in some games, largely the /touch actions are to give the user a little visual feedback rather than actually provide inputs.

Fixing the issue with the floor lighting was simple, I just looked at what actors were added to the renderer immediately after calling the SetShowFloor() method and set the ambient and specular lighting to be more appropriate.

For the controller models I did something similar to what was mentioned in the blog post, took the models from SteamVR and converted them to GLTFs, I did this in Blender (more familiar for me) and needed to delete the hierarchy to get them to display properly. I get a warning about KHR_materials_specular & ior not being supported but they seem to work fine.