Official VR module

I’m using an OSVR HDK2.0 and the Nolo CV1 controllers (which I can’t get working properly in Steam VR, always offset below or behind avatar).

Spent a few more hours on this, but still getting the ‘UnsatisfiedLinkError’, suggesting that netbeans/maven cannot see the platfrom *.dlls for OSVR (even though they are in the jme3-vr jar). Is there something else that JNA needs to be told about the platform? I’m not familiar enough with Maven projects to know if this is a library.path issue, nothing I tried worked.

I recently got an Oculus Quest and so far I was not able to get it working with jme 3.2.2 and 3.3.0-alpha2 using maven.
In general, WebVR from Firefox via SteamVR was working pretty much out of the box using the sideloaded version of vrdesktop.net (with the free alternative “ALVR” the controls were broken) - so viewing 3D models directly from e.g. the sketchfab website worked which means that the techstack itself works.
As I main Java dev I wondered whether I could hack some little vr demo using jme based on

https://wiki.jmonkeyengine.org/jme3/virtualreality.html

but no luck so far.

In regard to the error message with the proxy, I had additional log output indicating to enable further log output using jvm settings:

-Dorg.lwjgl.util.Debug=true
-Dorg.lwjgl.util.DebugLoader=true

This then revealed the actual error - a version conflict between sealed native lwjgl jars coming from jme3-lwjgl and jme3-vr - in fact 3.3.0-alpha2 mixes lwjgl 3.2.1 and 3.2.0, so this causes a call to an not implemented function (I used maven’s mvn dependency:tree for inspection)

In any case, I am facing the same issue with SETTING_VRAPI_OPENVR_VALUE and SETTING_VRAPI_OPENVR_LWJGL_VALUE:

The VR demo starts, a window pops up, head tracking appears to work for a few moments (a blue box moves as I move the headset), but the console is flooded with SEVERE error messages and a few moments later SteamVR crashes.
At some point I was not able to restart the Java demo due to an out of memory error - so it seems there is some resource leak in jme3’s vr implementation when things go wrong.

The essential error message is

Submit to left compositor error: Texture uses unsupported format (105)

(my guess about the resource leak is, that rejected textures are not free’d and new ones get allocated)

and it is raised in postRender of either

com.jme3.input.vr.lwjgl_openvr.LWJGLOpenVRViewManager.postRender
com.jme3.input.vr.lwjgl_openvr.OpenVRViewManager.postRender

Any ideas or maybe even fixes in the pipeline?

Does jme3-vr support the SteamVR Input API by any chance? Trying to get a Valve Index working and while I got the headset and controller tracking working, I assume I’m gonna need that API to get finger tracking working.

I ended up going back to the Phroot VR build its the only way I was able to get VR working with JME ?!
Hopefully the Main Releases will have out of the box functionality for VR.

I need some guidance, any help to point me in the right direction is very much appreciated.
I have VR working, and I want to take video from a stereo webcam and show the left camera to left eye and right camera to right. I have the image pairs converted to texture2d and just need to understand where am I going to have to make changes so the left and right images show up to perspective eye. Whats required to how should I proceed?

If you’re using Phroot VR implementation you have to directly ask him, this forum is dedicated to jme3-vr module.

Could you do that with the JME3-VR module? I basically need to understand if its possible and where I should be focusing the effort. I will circle back to the main release once I figure out why I could not get it to work.

I don’t know why it does not work with you but for example @grizeldi make it working and enhanced it with Valve Index last week.

Create 2 quads. They can share a texture or have one each depending on your requirements. Display the video image on the texture(s).
Attach one quad to each viewport.
Have the quads update according to camera transforms (necessary?)
Tweak location and scalr.

This sounds very straight forward,I’ll look for examples on quads and attaching them to view ports. If you can think of any examples let me know MUCH Appreciated!!
Thank you

Hello and thank you again!! So I was able to get quads created and the video/textures applied the location of the quads is the next challenge, how do I move them with the camera transforms? Is there a prescribed way to accomplish this?

I will check it out, I would love to get it working.
Thank you!

Is there a step by step instruction for getting it working?
i.e.

  1. Download this version
  2. build these files put them in this directory
  3. modify this config.
  4. compile this example
    etc…etc…

There’s literally a code example on the wiki about how to get it running, you just have to look around a little.

Still getting used to how to find the latest how to’s on the wiki etc… been looking and trying things as you know things change rapidly and sometimes its best to ask questions and save time. I see you took time to tell me I have to look but did not paste a link? Thanks

The wiki isn’t much, but here it is.

1 Like

Is anybody else having a problem getting the sample working on the JMonkey Master branch? When I build and try to run the sample, I get a ton of missing class errors. The only dependencies listed are JM3 core, effects, and lwjgl3. The class errors are also different depending on which VR API I used. For OSVR I get missing JNA classes, and for OculusVR I get lwjgl/ovr class errors.

Did you try with SteamVR and/or SteamVR through lwjgl wrapper? That one was working for me a month ago.

You need jme3-vr as a dependency too.

I was talking about jm3-vr’s dependencies. And my bad, I was confusing OpenVR with OSVR. However when I try using OpenVR I get an error that reads

Exception in thread “main” java.lang.IllegalStateException: Pointer native@0x7ffbad812bc0 already mapped to Proxy interface to native function@0x7ffbad812bc0 (com.jme3.system.jopenvr.VR_IVRSystem_FnTable$ComputeDistortion_callback).