Page MenuHome

Viewport HMD integration using OpenVR
AbandonedPublic

Authored by Kenrick (Prototype) on Dec 19 2017, 12:40 PM.

Details

Summary

Based on the HMD_viewport branch.

Integrates the OpenVR library to provide full (positional + rotational) tracking and support for direct mode. Adds a button to start an OpenVR session to the properties panel in a 3d viewport.

Only tested building on win64_vc14 with Visual Studio 2017, other platforms will need changes to the cmake platform files. Only tested with a Vive, though I imagine it should work with other HMDs supported by OpenVR.

Requires a folder openvr in the lib folder with files include/openvr.h, lib/openvr_api.dll, lib/openvr_api.lib from the OpenVR SDK. Also needs SteamVR installed.

Based on what I've read on forums I'm not sure if OpenVR is compatible with Blenders license, I implemented this mostly out of personal interest for viewing models with full tracking. See also: D2133

Diff Detail

Repository
rB Blender

Event Timeline

Kenrick (Prototype) edited the summary of this revision. (Show Details)Dec 19 2017, 12:44 PM

I can't seem to find how to specify this diff is on the HMD_viewport branch.

Gave it a quick whirl, there's clearly issues (ie shading changing when you rotate your head) but not bad for a first attempt. License wise it seems that openvr git repository has all the code we need to generate the interface library and it's under a bsd license, which i think is ok? (not a lawyer though)

Going over some old patches - I'm not sure if I ever noticed this patch or if I just forgot about it. Really sorry for letting this sit here with no feedback.

Either way, since last week Blender comes with initial VR support, but it's based on the new OpenXR specification, see https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Virtual_Reality. It's an entirely new implementation, and quite different from the HMD_viewport one. Because of the viewport and OpenGL changes, this would have to be reworked quite a bit anyway.

Again, sorry for not providing any feedback. Closing this now, thanks a lot nevertheless!