Tuesday, September 29, 2015

Advancing VR support for Mac

Given that Oculus/Facebook mothballed support for VR on Mac, the OSVR team at Sensics decided to step up and fill that void.

Once successful, this will provide an active path to continue to work with Oculus (and many other HMDs) on Mac. It will also pave the way to make use of the many capabilities of OSVR including positional and predictive tracking, device-independent integration for cameras, gestures, skeleton, locomotion devices and more.

We are seeking community assistance in making this happen faster. Below are short descriptions of what we know and what we are seeking. Comments, feedback and offers to assist will be most appreciated. 

What we know 

  • OSVR is built to be multi-platform. We have OSVR working on Windows, Android and Linux and have had some reports of success in working on Mac. 
  • We have OSVR building on both Linux (with Clang and GCC) and Windows. All the commits must pass testing on the CI for Linux and Windows. 
  • OSVR supports multiple HMDs including those made by Oculus, OSVR, Sensics, Vuzix. Vive support is coming, as well as better integration with Cardboard. Support includes display parameters, distortion. Asynchronous time warp supported on Windows/NVIDIA environment but we are working to expand this to AMD/Intel as well as other platforms. 
  • OSVR has been integrated into WebVR. Bugzilla patch has been submitted and reviewed by the Mozilla team. WebVR demos work on top of OSVR-supported HMDs. This means that OSVR work will also help support WebVR on Mac and on other platforms
  • We know OSVR was successfully built on Mac last December (prior to public release), and all external dependencies have Mac support, so we should have a good idea of the missing pieces.

Status of Facebook/Oculus support in OSVR

Display support for Oculus in OSVR is already entirely independent of Oculus SDK. It uses distortion parameters from OSVR Distortionizer and our own distortion shader, and display descriptor. So, OSVR support for Oculus on Mac comes down to sensor access (and sensor fusion, as in the Oculus case, the SDK or runtime does the IMU fusion). 

Currently, the OSVR-Oculus plugin master branch uses a VRPN driver written to access the Rift SDK, which is built against a 0.4.x release, and fully functional and multi-platform. For instance, here is a demo of OSVR running Rift on Linux. Here is another demo showing the OSVR Palace demo running on Unity over Linux with OSVR/Oculus:

A branch contains a direct OSVR PluginKit driver (no VRPN involved) that builds against a newer Rift SDK, but there are bugs in it, so it is unfinished. If looking to handle Rift on "officially unsupported" (by Facebook) platforms, including Mac and Linux, will want to develop an OSVR PluginKit driver using an open-source driver stack. 

There are several, though some of them claim a non-copyleft license while incorporating some well-known GPL sensor fusion, so problematic that way. OpenHMD appears intended to be a broader approach than just an open-source sensor access for Oculus, but is BSL1.0 licensed and includes sensor fusion, so could serve the purpose. There are almost surely others and we would be happy to receive referrals.

Contributions/assistance wanted

Starting with the OSVR codebase (osvr.github.io): 
  • Set up homebrew builds for libfunctionality and jsoncpp (if needed) 
  • Potential implementation (libltdl or other) needed in libfunctionality (which is a simple wrapper for loading plugins at runtime) 
  • Set up homebrew build for OSVR-Core (though it won't build fully at first). Known implementation details needed: 
    • usbserialenum - could just use dummy impl right now 
    • plugin search path code (in PluginHost) 
  • Provide input on best open-source library to access Rift sensors 
 Comments, feedback and offers to assist will be most appreciated. Let's do this together!


Joey Ferwerda said...

As a multi platform VR Game (engine) developer, we have gone the OpenHMD route and even became active contributors.
I can't say enough positive things about the project, it is functional, active and has a incredibly friendly and supportive team!

We are currently working on adding non-oculus, non-htc devices to the library and will actively support as much HMD's (and working on 3D camera's) we can get our hands on.
Feel free to drop by on #OpenHMD on irc.freenode.net, on twitter @OpenHMD or check our /r/openhmd subreddit

VRGuy said...


Thanks for this.

Looks like your engine runs on top of Blender. We have a team that is working on adding an OSVR plugin to Blender, meaning that all OSVR-supported HMDs will be able to run on Blender. Might be useful for your engine.

wrt OpenHMD, that's great to hear. Maybe we can use HTC support or other features inside OSVR.