Can not run VR example - Initializing OpenVR system Failed

I am trying to run jME VR example posted on this post by @seinturier

I am using the following dependencies on my Maven POM,

<properties>
    <jme3_g>org.jmonkeyengine</jme3_g>
    <jme3_v>3.1.0-stable</jme3_v>
</properties>

 <repositories>
    <repository>
        <id>jcenter</id>
        <url>http://jcenter.bintray.com</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-core</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-desktop</artifactId>
        <version>${jme3_v}</version>
        <scope>runtime</scope>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-lwjgl3</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-blender</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-bullet-native</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-effects</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-jogg</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <dependency>
        <groupId>${jme3_g}</groupId>
        <artifactId>jme3-networking</artifactId>
        <version>${jme3_v}</version>
    </dependency>

    <!-- jME-vr dependency -->
    <dependency>
        <groupId>net.java.dev.jna</groupId>
        <artifactId>jna</artifactId>
        <version>LATEST</version>
    </dependency>

    <dependency>
        <groupId>com.nativelibs4java</groupId>
        <artifactId>jnaerator-runtime</artifactId>
        <version>0.12</version>
    </dependency>

I cloned and compiled latest jME from github master branch, and added jme3-vr-3.2.0-SNAPSHOT.jar to my project library.

Now when I run the code I get the following error,

(2017.05.29-23:05:39) CONFIG  [VREnvironment] [initialize] Initializing VR environment.
(2017.05.29-23:05:39) CONFIG  [VREnvironment] [initialize] Creating OpenVR wrapper [SUCCESS]
(2017.05.29-23:05:39) CONFIG  [OpenVR] [initialize] Initializing OpenVR system...
(2017.05.29-23:05:40) SEVERE  [OpenVR] [initialize] OpenVR Initialize Result: Installation path could not be located (110)
(2017.05.29-23:05:40) SEVERE  [OpenVR] [initialize] Initializing OpenVR system [FAILED]
(2017.05.29-23:05:40) WARNING [VREnvironment] [initialize] VR native wrapper initialized [FAILED]
(2017.05.29-23:05:40) SEVERE  [VREnvironment] [initialize] Cannot initialize VR environment [FAILED]
(2017.05.29-23:05:40) SEVERE  [VRAppStateSample] [main] Cannot start VR sample application as VR system is not initialized (see log for details)
Unable to read VR Path Registry from C:\Users\iamcr\AppData\Local\openvr\openvrpaths.vrpath

But I don’t understand the error - what is the VR System this error is referring to? How do I run the VR example program?

Note : I do not have any VR hardware/driver installed on my system.

1 Like

Hello,

JMonkey VR module works on top of the VR driver. You cannot use it without installing underlying VR device API. The easiest way is to install Steam and then the SteamVR module. However, with some specific VR devices you’ll have to install manufacturer software.

For more details, JMonkey VR module mainly use OpenVR that is a free wrapper to SteamVR.

1 Like

I installed SteamVR, and now the log is different - it says Hmd Not found.

(2017.05.30-01:54:57) CONFIG  [VREnvironment] [initialize] Initializing VR environment.
(2017.05.30-01:54:57) CONFIG  [VREnvironment] [initialize] Creating OpenVR wrapper [SUCCESS]
(2017.05.30-01:54:57) CONFIG  [OpenVR] [initialize] Initializing OpenVR system...
(2017.05.30-01:54:59) SEVERE  [OpenVR] [initialize] OpenVR Initialize Result: Hmd Not Found (108)
(2017.05.30-01:54:59) SEVERE  [OpenVR] [initialize] Initializing OpenVR system [FAILED]
(2017.05.30-01:54:59) WARNING [VREnvironment] [initialize] VR native wrapper initialized [FAILED]
(2017.05.30-01:54:59) SEVERE  [VREnvironment] [initialize] Cannot initialize VR environment [FAILED]
(2017.05.30-01:54:59) SEVERE  [VRAppStateSample] [main] Cannot start VR sample application as VR system is not initialized (see log for details)

Is it possible to see the output of the program without having/plugging in a VR headset? Like a regular jME game example?

1 Like

I’ve not commited at this time the “HMD off” mode. At this time you must have a VR headset plugged if you want to use the VRAppState. But as its an app state, you can in your application choose to not start the app state if no VR device is mounted.

1 Like

I don’t know details about OpenVR compatibility. Do I have to have either Occulus rift or HTC Vive, or other cheaper options would also work?

1 Like

Hello,

at this time i’ve only tested HTC vive and Occulus rift options… Maybe we have to find what devices are compatible with SteamVR (as OpenVR is a frontend to SteamVR)

1 Like

If this is like you say it is (steamvr based), it should support at least osvr headset too.

1 Like