Terasology: VR support follow-ups and potential extraction of the VR Provider eventually

Created on 18 Nov 2016  Â·  6Comments  Â·  Source: MovingBlocks/Terasology

There is no rush on this but I wanted to record it all as future reminders.

@IndianaJohn did a great amount of work in #2479 adding support for OpenVR, and embedded it into Terasology for the time being. It could live as an external library with some pros and cons.

He's got a repo over at https://github.com/indianajohn/jopenvrwrapper

  • OpenVRProvider.java uses com.sun packages which is discouraged, but this might be required as part of using JNA - which is indeed in such a package
  • Per PR notes the provider is paired to our engine dependency on JNA, with potential impact if that changes in the future
  • The embedding of the provider inside the Terasology engine was also due to a shared dependency on LWJGL (which is another topic of future interest - do we go to LWJGL 3 or LibGDX?)

    • To get around having the provider depend on a potentially different version of LWJGL you could simply use a Gradle provided dependency edit in our engine to avoid a version conflict. So long as it is a minor difference, of course, probably wouldn't quite work if one depends on LWJGL 2 and the other LWJGL 3 ...

  • The VR support uses JOML for math instead of adding more stuff to TeraMath and we may indeed be able to slowly migrate to JOML overall. @Immortius recently got past one major obstacle in getting some stuff added to JOML. @msteiger also likes math and I like pinging people :-)
  • We might want to check on how OSVR works when @tdgunes manages to get a hold of the headset we got from OSVR for testing. Or maybe @emanuele3d will be able to get his hands on a headset a little longer soon :D
  • We might also want to extract out the libopenvr natives, akin to how LWJGL does it, and extract them at Gradle prep time the same way (rather than keep them in source). This is a hassle, but oh well.
  • There is some generated source code in the provider as well as some packages without a domain. If we really want to go nuts we may want to do some cleanup to get a tidier setup (but that's mostly effort for aesthetics)
  • We can probably retire/archive the TeraOVR repo sometime
  • Maybe we should switch the "Oculus Rift Support" option in the Video Settings back on as "VR Support" or do we not want to expose it yet? I guess it may also require a game restart? It could pop an info box explaining that if needed
Architecture Logistics Rendering Research

Most helpful comment

@Cervator How about doing a top-down creative mod? Drawing rivers, mountains and etc. That would be really interesting, think about combination of Tilt Brush and Terasology. (Sorry but it'd probably work best with HTC Vive's controllers.)

For giving you an idea about what I am thinking, please check this red alert remake for HTC Vive.

All 6 comments

Thanks to a friend who came to visit me, I received my OSVR kit. I spent two nights to make it working 😱, however still experiencing some issues with SteamVR(OpenVR) support (screen is upside down, extended mode only, wrong feedback and orientation). It might be because of my poor GT650m's performance is not enough for direct mode. (Minimum expected GPU for HDK 2 I suppose is GTX970.)

As far as I understand, there are two modes to use OSVR headsets: ( _To clarify, OSVR is the open source VR headset platform where HDK 2 is the headset that I have._)

  • Direct Mode: For _directly_ streaming video to VR headset, instead of handling headset screen as a external monitor. (Both in Mac OS X and Windows, I couldn't make this mode work, almost every use case.)
  • Extended Mode: This mode is when headset's screen is handled as a external monitor. I watched some Youtube 360 VR videos with this. It worked really nice. Other then that I experienced issues with OSVR's SteamVR support. I could see the initial training session demo, but screen was inverted and whenever you turn your head to right, it acts like as if you are looking to left. It was a little painful, I gave up trying different settings after started to feel nauseous.

I'll start trying the headset with Terasology tomorrow. Fingers crossed!

Hey @tdgunes good to hear from you and that the headset got to you at last! Have you let our OSVR rep know? He might be able to help with those issues as well :-)

From playing with the Oculus early on those issues sound very familiar. Lots of experimenting with direct and extended mode, per app, to figure out what worked with the correct orientation. Early on it was mostly extended mode that worked, but I often had to go into my OS display settings to change the orientation of the "monitor" (of the headset) before it would be right.

Later on it sounds like Oculus has gone to a direct-only approach, but I haven't been able to update my drivers and related software to try it out lately. I never did have a great GPU for it myself, but hopefully soon I will :-)

Just replying to state that I've read the above and have them in mind. I plan on staggering functionality-improving updates with cleanup-style updates.

I just played Doom 3 VR for 30 minutes, and had to stop due to motion sickness. This got me thinking about locomotion in VR. I have some ideas I might play with over the weekend in addition to maybe looking at some of these issues.

One thought, even if not very novel at this point, would be linking this to the Rails mod to handle locomotion quite literally via locomotive :D Since the steady vantage point of being in a vehicle typically seems to help. Whether it is a full roller coaster (which can lead to some other discomfort!) or just a simple bit of playing with trains just for the simple experience.

(Pinging @SkySom @pollend @small-jeeper)

@Cervator How about doing a top-down creative mod? Drawing rivers, mountains and etc. That would be really interesting, think about combination of Tilt Brush and Terasology. (Sorry but it'd probably work best with HTC Vive's controllers.)

For giving you an idea about what I am thinking, please check this red alert remake for HTC Vive.

Side note: we have "smooth" movement modes which turn off the bobbing. The cinematic mode was originally intended for smooth camera motion, but maybe that also helps with VR…

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emanuele3d picture emanuele3d  Â·  3Comments

Qwertygiy picture Qwertygiy  Â·  6Comments

msteiger picture msteiger  Â·  7Comments

Cervator picture Cervator  Â·  4Comments

Cervator picture Cervator  Â·  4Comments