State of Oculus Rift support?

Hi all, considering getting the Oculus Rift SDK 2. I see there’s an oculus rift specific build of the engine, but I wondered what the state of that build was. Is it still in development, or pretty much ready for end users? How time consuming would you say getting a JME3 app running with Oculus Rift would be given a somewhat experienced programmer?

Tools->Plugins->Install “Oculus Rift Support”, use the forum search to find the associated thread.

If a commercial JME game says it supports it, I’d say it is pretty good :slight_smile: I don’t know if there are any proprietary code outside the plugin though…

Feature-wise, it’s OK.
Afaik noone has ever used the plugin in the repo, so using it will be interesting. Please provide feedback on how it works.

Otherwise the safest bet is using the google code repo.

Check out the examples. It’s easy to get it up and running (Hint: Extend OVRApplication instead of SimpleApplication)

Order has been placed.

We have our own Application class since we are running the engine through Netbeans. Will have to figure out a way to merge our existing application with the OVRApplication class, most probably.

I don’t think you will encounter any problems in doing that. There’s no magic involved, just some things that had to happen outside the AppState.

The Rift has arrived. Working on getting phr00t and rickard’s build working within our Netbeans-based app framework now.

I wanted to ask if there’s any rift-specific changes in the jme3-lwjgl or jme3-lwjgl-natives libraries, as our application doesn’t work properly with the newest released versions of these.

EDIT: Based on the source structure of the oculus rift branch I see that there probably aren’t changes to any core jME libs at all?

You’re right. None of the libs have been altered.

Good luck!

This line in OVRAppState is making my JME3 SDK refusing to build currently:

    SafeArrayList<SceneProcessor> processors = viewPortLeft.getProcessors();

Looks like a simple cast to SafeArrayList, but making that change gives this runtime error instead:

SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.jme3.util.SafeArrayList
at oculusvr.state.OVRAppState.setupFiltersAndViews(OVRAppState.java:153)
at oculusvr.state.OVRAppState.initialize(OVRAppState.java:115)
at com.jme3.app.state.AppStateManager.initializePending(AppStateManager.java:251)
at com.jme3.app.state.AppStateManager.update(AppStateManager.java:281)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:239)

I changed the line in OVRAppState to

    ArrayList<SceneProcessor> processors = viewPortLeft.getProcessors();

This fixes the runtime error - but might introduce threading issues? When I run this app now, I get a black window with the default debug text.

Oh - and trying any of the test classes through JME SDK doesn’t work for me either currently:

Exception in thread “main” java.lang.NoSuchMethodError: com.oculusvr.capi.Hmd.getDesc()Lcom/oculusvr/capi/HmdDesc;
at oculusvr.input.OculusRift.getHResolution(OculusRift.java:112)
at oculusvr.input.OculusRift.updateHMDInfo(OculusRift.java:67)
at oculusvr.input.OculusRift.initialize(OculusRift.java:36)
at oculusvr.TestSkyBox.main(TestSkyBox.java:52)

I haven’t put a lot of effort into debugging this though as my main IDE is IntelliJ and things run there. Might be down to some library issues.

I’m trying out the different test classes now, and everything is black. The HMD is in extended mode - is this a problem? We would like this to work with some of the laptops we have and direct mode does not.

I get the health and safety warning display at first, but the rest of the scene is pitch black - save for the debug text if enabled. Attaching other stuff to the guiNode also works.