All Projects → terminal29 → Simple-OpenVR-Driver-Tutorial

terminal29 / Simple-OpenVR-Driver-Tutorial

Licence: other
A sample OpenVR Driver for you to learn from

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to Simple-OpenVR-Driver-Tutorial

hobo vr
SteamVR driver prototyping tool
Stars: ✭ 44 (-71.97%)
Mutual labels:  vr, openvr, steamvr, virtual-reality
vr-python-quickstart-hg1
VR Headset Controller Tutorial, get started with virtual reality in Python
Stars: ✭ 29 (-81.53%)
Mutual labels:  vr, openvr, virtual-reality
TurnSignal
An anti-cable-twisting management utility for SteamVR.
Stars: ✭ 73 (-53.5%)
Mutual labels:  vr, openvr, steamvr
PhoneVR
Use Steam VR-enabled applications with your phone as HMD (Head-mounted display). The only Open-Source solution to similar commercial packages like VRidge, iVRy, Trinus etc etc.
Stars: ✭ 178 (+13.38%)
Mutual labels:  vr, steamvr, virtual-reality
EasyOpenVRUtil
EasyOpenVRUtilは、Steam VR for Unityのちょっと足りないところを埋め合わせるためのライブラリです。特に、コントローラやトラッカーの座標を直接取得したり、非VRだけど位置情報は使いたいといった用途に向いています。その他あると便利な機能も実装しています。
Stars: ✭ 37 (-76.43%)
Mutual labels:  vr, openvr, steamvr
Viveinpututility Unity
A toolkit that helps developing/prototyping VR apps.
Stars: ✭ 256 (+63.06%)
Mutual labels:  vr, steamvr, virtual-reality
thedarkmodvr
VR support for The Dark Mod
Stars: ✭ 49 (-68.79%)
Mutual labels:  vr, openvr, steamvr
MoonMotion
Moon Motion Toolkit - Free and open source toolkit for VR locomotion
Stars: ✭ 38 (-75.8%)
Mutual labels:  vr, steamvr, virtual-reality
TJUCam
SteamVR Compatible Motion Controller with ESP8266 and Raspberry Pi
Stars: ✭ 29 (-81.53%)
Mutual labels:  vr, openvr, steamvr
Vrtk
*Beta* - An example of how to use the Tilia packages to create great content with VRTK v4.
Stars: ✭ 3,422 (+2079.62%)
Mutual labels:  vr, steamvr, virtual-reality
Joy2OpenVR
Interface to OpenVR Input Emulator to translate any Direct Input controllers commands into VR Controller commands
Stars: ✭ 25 (-84.08%)
Mutual labels:  vr, openvr, steamvr
OpenXR-Hpp
Open-Source OpenXR C++ language projection
Stars: ✭ 25 (-84.08%)
Mutual labels:  vr, virtual-reality
virtual-reality-tour
📍 Virtual reality travel in Google Street View.
Stars: ✭ 34 (-78.34%)
Mutual labels:  vr, virtual-reality
vrtist
Virtual Reality tool for storytelling
Stars: ✭ 43 (-72.61%)
Mutual labels:  vr, virtual-reality
soundstagevr
virtual reality music sandbox built specifically for room-scale VR
Stars: ✭ 38 (-75.8%)
Mutual labels:  vr, steamvr
daydream-node
Quick Node.js module to connect to the Daydream controller and receive all the data
Stars: ✭ 17 (-89.17%)
Mutual labels:  vr, virtual-reality
janusweb
An in-browser implementation of JanusVR
Stars: ✭ 145 (-7.64%)
Mutual labels:  vr, virtual-reality
KinectToVR
KinectToVR EX (Official)
Stars: ✭ 163 (+3.82%)
Mutual labels:  openvr, steamvr
LifeBrush
A toolkit for painting agent-based mesoscale molecular simulations and illustrations.
Stars: ✭ 38 (-75.8%)
Mutual labels:  vr, virtual-reality
g3r
3D, VR and AR Maps in R
Stars: ✭ 19 (-87.9%)
Mutual labels:  vr, virtual-reality

Simple OpenVR Driver Tutorial

I created this driver as a demonstration for how to write some of the most common things a SteamVR/OpenVR driver would want to do. You will need to understand C++11 and some C++17 features at least to make the most use of this repo. It features:

Building

  • Clone the project and submodules
    • git clone --recursive https://github.com/terminal29/Simple-OpenVR-Driver-Tutorial.git
  • Build project with CMake
    • cd Simple-OpenVR-Driver-Tutorial && cmake .
  • Open project with Visual Studio and hit build
    • Driver folder structure and files will be copied to the output folder as example.

Installation

There are two ways to "install" your plugin:

  • Find your SteamVR driver directory, which should be at: C:\Program Files (x86)\Steam\steamapps\common\SteamVR\drivers and copy the example directory from the project's build directory into the SteamVR drivers directory. Your folder structure should look something like this:

Drivers folder structure or

  • Navigate to C:\Users\<Username>\AppData\Local\openvr and find the openvrpaths.vrpath file. Open this file with your text editor of choice, and under "external_drivers", add another entry with the location of the example folder. For example mine looks like this after adding the entry:
{
	"config" : 
	[
		"C:\\Program Files (x86)\\Steam\\config",
		"c:\\program files (x86)\\steam\\config"
	],
	"external_drivers" : 
	[
		"C:\\Users\\<Username>\\Documents\\Programming\\c++\\Simple-OpenVR-Driver-Tutorial\\build\\Debug\\example"
	],
	"jsonid" : "vrpathreg",
	"log" : 
	[
		"C:\\Program Files (x86)\\Steam\\logs",
		"c:\\program files (x86)\\steam\\logs"
	],
	"runtime" : 
	[
		"C:\\Program Files (x86)\\Steam\\steamapps\\common\\SteamVR"
	],
	"version" : 1
}

Debugging

Debugging SteamVR is not as simple as it seems because of the startup procedure it uses. The SteamVR ecosystem consists of a couple programs:

  • vrserver: the driver host
  • vrcompositor: the render engine
  • vrmonitor: the popup that displays status information
  • vrdashboard: the VR menu/overlay
  • vrstartup: a program to start everything up

To debug effectively in Visual Studio, you can use an extension called Microsoft Child Process Debugging Power Tool and enable debugging child processes, disable debugging for all other child processes, and add vrserver.exe as a child process to debug as below:

Child process debugging settings

Set the program the project should run in debug mode to vrstartup (Usually located C:\Program Files (x86)\Steam\steamapps\common\SteamVR\bin\win64\vrstartup.exe). Now we can start up SteamVR without needing to go through Steam, and can properly startup all the other programs vrserver needs.

Issues

I don't have an issue template, but if you find what you think is a bug, and can describe how to reproduce it, please leave an issue and/or pull request with the details.

License

MIT License

Copyright (c) 2020 Jacob Hilton (Terminal29)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].