Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Test Builds => Topic started by: RandomTiger on January 10, 2016, 07:23:56 am

Title: FS2Open Oculus VR Test
Post by: RandomTiger on January 10, 2016, 07:23:56 am
Hi guys, here is a Oculus VR FS2 Open test I've been mucking around with.
I'm not sure if you have people already working on VR or not, I don't follow the forum these days.

I've hacked a Oculus 0.6 sample into the osapi system, set the camera to a free look position outside the player ship which now has basic AI orders. I've had to turn a bunch of stuff off that isn't working and have no plans to work on getting a HUD working. My idea as such wasn't to make FS2 VR but make an experience that uses the engine and levels.

To run it you will need a DK1 (tested) or DK2 (untested) and Oculus runtime 0.6 or higher installed.
You should also setup a default pilot under normal launch options if you dont already have one.

Run with the following flags:  -ovr -window -start_mission SM2-04.fs2 -no_unfocused_pause -nomotiondebris

If anyone has a go and finds any missions that are particularly fun to experience please let me know. Avoid fog missions.


[attachment DELETED!! by Strong Bad]
Title: Re: FS2Open OVR Test
Post by: RandomTiger on January 10, 2016, 10:48:41 am
Can a mod move this to 'Test Builds'. Thanks.
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on January 26, 2016, 02:15:46 am
Though I don't have an Oculus Rift VR headset, I'll try this build, and post here if I have any problems.
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on January 26, 2016, 03:54:19 am
Thanks Bryan, hopefully even without a rift it will run in a window. Though if you dont have Oculus runtime I imagine it will fail or crash. I was going to post a new build with Oculus upgraded to 0.8 but I need to sort out some colour space issues.
Title: Re: FS2Open Oculus VR Test
Post by: Familiar on January 26, 2016, 06:06:50 am
Would be nice to have 3D passive screens support as well. There is lot of 3d TVs and some monitors. (I have both).  Was fun to play in ELITE DANGEROUS in 3d
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on January 26, 2016, 06:18:08 am
Hey Familiar, I don't have a 3D TV or monitor so that's not something I'm going to be able to help with.
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on January 26, 2016, 11:10:23 am
I tested it, but it's WAY too older than the recent build. I suggest that you rebuild everything using the latest revision with your changes that allow Oculus VR support.

By the way, it looks fine even without the Oculus VR headset :)

EDIT: Without the -ovr command line it works, but with it, I think I missed out libOVR. When can I get it?
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on January 26, 2016, 02:30:39 pm
Thanks Bryan, looks like the project has moved over to GIT and I guess the latest SVN is out of date. I will look into that.
Did you install the Oculus runtime? Here is a link, hopefully it doesn't require you to sign in:

https://developer.oculus.com/downloads/pc/0.8.0.0-beta/Oculus_Runtime_for_Windows/
Title: Re: FS2Open Oculus VR Test
Post by: AdmiralRalwood on January 26, 2016, 04:13:05 pm
Thanks Bryan, looks like the project has moved over to GIT and I guess the latest SVN is out of date.
Much; here's a link to the GitHub repo (https://github.com/scp-fs2open/fs2open.github.com/) in case you didn't find it already.
Title: Re: FS2Open Oculus VR Test
Post by: chief1983 on January 26, 2016, 04:13:17 pm
RandomTiger, yeah guess you've been away a while, if you need any help with Git feel free to ask here on the forums or on IRC (links to web IRC at the top menu under HLP).  Pretty excited for this test build too.  Just gotta get a Rift now...
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on January 26, 2016, 10:04:11 pm
Thanks Bryan, looks like the project has moved over to GIT and I guess the latest SVN is out of date. I will look into that.
Did you install the Oculus runtime? Here is a link, hopefully it doesn't require you to sign in:

https://developer.oculus.com/downloads/pc/0.8.0.0-beta/Oculus_Runtime_for_Windows/

Yes, I've already have. However, upon running FS2_Open with -ovr specified, I couldn't run it because I don't have an Oculus VR.

Thanks Bryan, looks like the project has moved over to GIT and I guess the latest SVN is out of date.
Much; here's a link to the GitHub repo (https://github.com/scp-fs2open/fs2open.github.com/) in case you didn't find it already.

Thanks, I need that.
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on March 07, 2016, 03:34:27 pm
New build based of more recent GIT source code.

http://www.hard-light.net/forums/index.php?action=dlattach;topic=91372.0;attach=24679

I have a new problem with the colours looking washed out, Oculus has changed its colour space.
Also the beams and lasers dont render unless you use the -no_glsl flag. Full flag list below.

-ovr -window -start_mission SM2-04.fs2 -no_unfocused_pause -nomotiondebris -no_glsl
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on April 03, 2016, 07:04:50 am
I've upgraded the source code to Oculus SDK 1.3 but have no way to test it until my retail Oculus arrives.
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on April 05, 2016, 03:09:00 pm
Cant host exe's here any more they have gotten too big. So here is Oculus SDK1.3 version, this should work with retail Oculus kits. It works on mine.

You must install latest Oculus setup and you must allow 'unknown sources' in the settings or you will just see a white room.

https://github.com/RandomTiger/fs2open.github.com/blob/master/fs2_open_3_7_3-GIT-OVR1.3-VS2013-RELEASE.rar

run with:

-ovr -window -start_mission SM2-04.fs2 -no_unfocused_pause -nomotiondebris -no_glsl -nomovies -invulnerable -force_alpha_one_ai
Title: Re: FS2Open Oculus VR Test
Post by: chief1983 on April 05, 2016, 04:37:28 pm
If you need a place to host binaries, as a senior SCP dev you could probably be granted access to our web server.
Title: Re: FS2Open Oculus VR Test
Post by: jr2 on April 05, 2016, 08:37:20 pm
EDIT: Thread hijack re: Occulus privacy concerns moved here (http://www.hard-light.net/forums/index.php?topic=91824.0).  <- If you have beef with Windows 10 about privacy, it behooves you to read this.
Title: Re: FS2Open Oculus VR Test
Post by: MetalDestroyer on May 30, 2016, 03:43:14 pm
I'm trying your build with my HTC Vive + ReVive + librairies from Occulus Home. However, when I launch the game, it tells me it doesn't found libOVR. Should I really need to get the Occulus SDK Runtime ?
Title: Re: FS2Open Oculus VR Test
Post by: RandomTiger on May 30, 2016, 04:53:29 pm
So I thought you need Oculus Home installed to do this with any Oculus binary. Given that my binary doesnt work correctly on the Oculus yet (head tracking is wrong) I'm guessing the Revive hack isnt going to work any better and I cant get into a situation of offering support for that as Oculus and Revive seem to be in a patch war.

I have however sold my Oculus anyway and bought a Vive, I'm really interested in room scale experiences. I have put some initial work into getting a Vive version working but have run into hurdles even getting it rendering. I'm pretty busy at the moment and cant say when I will be able to take another shot at this, getting it working on SteamVR does seem like a good idea if that continues to  work on both Vive and Oculus and hopefully any new devices.
Title: Re: FS2Open Oculus VR Test
Post by: MetalDestroyer on May 30, 2016, 05:25:26 pm
That's cool if you plan to work on a Vive version. :)  it's too bad if we don't have VR on Freespace/Diaspora. ^^
Title: Re: FS2Open Oculus VR Test
Post by: CaptainKoloth on June 17, 2016, 01:46:55 pm
Oh please please do finish this one day, having finally gotten my hands on a Rift I cannot imagine anything more spectacular than Freespace 2 in VR... and SteamVR would enable anyone with an HMD to play it.
Title: Re: FS2Open Oculus VR Test
Post by: Rijaak on June 24, 2016, 11:08:33 pm
Has anyone thought of using a directx 9 wrapper to integrate with vorpx? Seems like it might be the easiest way to do this. I'm totally down to put in some hours if someone more experienced can help cover my weaknesses programing wise. Message me if interested. Let's get this done!
Title: Re: FS2Open Oculus VR Test
Post by: The E on June 25, 2016, 12:57:31 am
DX9 is not a technology we are in any way interested in.
Title: Re: FS2Open Oculus VR Test
Post by: jr2 on June 25, 2016, 10:46:30 am
FYI, FSO used to have native DX(9?) support.  It was removed due to there not being enough (any?) coders with DX experience to maintain that part of the code, and OpenGL being cross-platform (DX can be emulated with WINE, but why when you have OpenGL?).

So, probably best to go for a straight up OpenGL solution.

DX9 is not a technology we are in any way interested in.

To an outsider, that would seem a rather snobbish response.  Warranted, but there's nicer ways to say it?  I know the FSO / DX back story from being around here, and I know you (here, at least), so I know you aren't being a wanker, but others don't.  The dude just offered to bug test for you and the response could be interpreted (incorrectly) as, "DX9 is rubbish!" (And maybe it isn't desirable.  But not everyone knows that.)


Feel free to ignore this post if I misunderstood everything.  :P  Just trying to facilitate better coder - non-coder relations.  :warp:
Title: Re: FS2Open Oculus VR Test
Post by: Rijaak on June 27, 2016, 08:20:31 pm
Yeah. I've never messed around with FSOpen code (I mostly do GIS scripting or Forestry modelling coding for work), so idk if it'd work. I was just thinking how VorpX is prebuilt to render VR with DX 9 input, so it might be easier to go that route. Are you sure that's not a viable possibility? Especially if we have a previous version built with native DX9 support, it sounds like it might be simpler to adapt that. If not, I'm still down to bug test and do some simple coding. Any word on progress or how I can help?
Title: Re: FS2Open Oculus VR Test
Post by: jr2 on June 27, 2016, 08:26:30 pm
Yeah. I've never messed around with FSOpen code (I mostly do GIS scripting or Forestry modelling coding for work), so idk if it'd work. I was just thinking how VorpX is prebuilt to render VR with DX 9 input, so it might be easier to go that route. Are you sure that's not a viable possibility? Especially if we have a previous version built with native DX9 support, it sounds like it might be simpler to adapt that. If not, I'm still down to bug test and do some simple coding. Any word on progress or how I can help?

The old DX code was not maintained, which was why support was dropped.  You'd have to re-implement DX support and get it bug-free on your own, and also then maintain that part of the code, as no current members can / want to do this.

Better to find another way around the problem.
Title: Re: FS2Open Oculus VR Test
Post by: Rijaak on June 27, 2016, 08:58:35 pm
Gotcha. Well, it was worth a shot. You said something about WINE. Is that something that could be used as a wrapper on current versions to feed DX9 input into VorpX? Everything I can find about it is in regards to installing DX on linux or ubuntu. If these guys are going to do the grind of trying to get native oculus support (which I'm still down to help with), I'd like to find a workaround to use in the meantime. I can't wait to play Diaspora with my oculus!
Title: Re: FS2Open Oculus VR Test
Post by: AdmiralRalwood on June 27, 2016, 09:09:59 pm
Gotcha. Well, it was worth a shot. You said something about WINE. Is that something that could be used as a wrapper on current versions to feed DX9 input into VorpX?
:wtf: And where would you be getting this DX9 input from?
Title: Re: FS2Open Oculus VR Test
Post by: Rijaak on June 27, 2016, 09:17:02 pm
FYI, FSO used to have native DX(9?) support.  It was removed due to there not being enough (any?) coders with DX experience to maintain that part of the code, and OpenGL being cross-platform (DX can be emulated with WINE, but why when you have OpenGL?).

So, probably best to go for a straight up OpenGL solution.

DX9 is not a technology we are in any way interested in.

To an outsider, that would seem a rather snobbish response.  Warranted, but there's nicer ways to say it?  I know the FSO / DX back story from being around here, and I know you (here, at least), so I know you aren't being a wanker, but others don't.  The dude just offered to bug test for you and the response could be interpreted (incorrectly) as, "DX9 is rubbish!" (And maybe it isn't desirable.  But not everyone knows that.)


Feel free to ignore this post if I misunderstood everything.  :P  Just trying to facilitate better coder - non-coder relations.  :warp:




Well, I guess that's what I was asking. "DX can be emulated with WINE" seems to imply that there's some way to use it to get DX output, but everything I can find on it says that it's used to run windows programs in a linux ( or similar) environment. Maybe I was misunderstanding what he was trying to say.
Title: Re: FS2Open Oculus VR Test
Post by: AdmiralRalwood on June 27, 2016, 09:25:56 pm
Well, I guess that's what I was asking. "DX can be emulated with WINE" seems to imply that there's some way to use it to get DX output, but everything I can find on it says that it's used to run windows programs in a linux ( or similar) environment. Maybe I was misunderstanding what he was trying to say.
You were misunderstanding; the point is that using OpenGL lets us have one renderer on every platform, without needing to use emulation like WINE.
Title: Re: FS2Open Oculus VR Test
Post by: The E on June 28, 2016, 02:54:09 am
And to be absolutely clear: If or when we do VR, we will do it properly by using actual standards for VR (whether it'll be through the Rift SDK or OpenVR doesn't matter at this point). I am not interested in some half-measure pseudo VR like vorpx.
Title: Re: FS2Open Oculus VR Test
Post by: Rijaak on June 28, 2016, 02:51:07 pm
Okay... Well lets get it done then. Like I said... Throw me some work.
Title: Re: FS2Open Oculus VR Test
Post by: CaptainKoloth on July 02, 2016, 03:05:26 am
I will say in its defense that I've had some truly excellent experiences with Vorpx. Don't get me wrong, native support is infinitely better and always preferable, but for those games where the developers haven't done native support or the game is older, I'd much rather have at least the option of playing in VR even if it's not as good as native. I've had some truly wondrous experiences playing Fallout 3 modded with high-res textures in VR with Vorpx- easily made the Rift worth the price on its own in my opinion.

Anyway, point is, while native support would be best, I'd rather have at least Vorpx or something similar at least at first if it's easier to code, rather than nothing, which is the case now. If that's an interim step to Oculus SDK or SteamVR, then that makes for better VR now through something like Vorpx (since there's none at all now) and better VR later through the Oculus/Steam route.

I've been having a truly amazing experience with House of the Dying Sun in VR. It's redefined what I think a space combat game is capable of in terms of immersion and I can't imagine anything better than getting to experience FS2 that way.
Title: Re: FS2Open Oculus VR Test
Post by: The E on July 02, 2016, 03:34:30 am
See, the thing is, in order to make vorpx integration happen, a developer must have a VR set. That's the biggest blocking issue here; not enough of us have them yet. Once we do, our time is better spent doing it properly; in my estimation, while the workload is higher to do it properly, I have strong opinions about work that you know is going to be obsolete even before you start it.

And, well, there's a few other things we want to do before really tackling VR. We need to refactor the renderer anyway, and since that's going to benefit all of us immediately, that has priority over new features.
Title: Re: FS2Open Oculus VR Test
Post by: Rijaak on July 03, 2016, 05:23:41 pm
Looks like someone is trying to show some support:

https://www.kickstarter.com/projects/1088135691/oculus-vr-support-for-the-freespace-space-combat-s
Title: Re: FS2Open Oculus VR Test
Post by: AdmiralRalwood on July 03, 2016, 05:35:46 pm
Hah; if somebody wants to buy me a VR headset, I'd be happy to work on it.
Title: Re: FS2Open Oculus VR Test
Post by: RAddison on July 04, 2016, 06:26:39 am
Well, that's the general idea. To generate at least partial reimbursement for time and money invested in getting vr support going.  I wish we could generate funding up front to buy developers their own oculus. And that might be a possibility for the next fundraiser if there's enough interest from both backers and the coding community and this one isn't successful. However, people aren't as likely to donate for empty promises, so it's better to create a reward for product delivered and guarantee a return on investment in case nothing ever comes of it.

I've created a new thread for discussion of the fundraiser and to get started forming a team. Here's the link:

http://www.hard-light.net/forums/index.php?topic=92173.new#new

To be clear, I plan to give all proceeds from the fundraiser to those who can produce a working product with native oculus support. Meaning that my time is entirely volunteered. I'll step up to a leadership position if noone else wants to, but I feel that someone with hands-on experience working with the programming is better suited to that role. So, I'll probably just be acting as a moderator there.

Here's the link to our kickstarter page:

(kickstarter closed)

Tell your friends!


 
Title: Re: FS2Open Oculus VR Test
Post by: Psychonaut on July 08, 2016, 02:18:55 pm
Hey, just returned to this Website after years of Absence just to test the oculus Version of FSO. It took me a while to get it run, but after i´ve seen it running in my CV1 i am absolutely stunned. Please make it happen. Though there are some glitchtes (e.g. 2d explosions in VR) it looks way more amazing than many games written directly for VR like Eve Valkyre.
Title: Re: FS2Open Oculus VR Test
Post by: CaptainKoloth on July 09, 2016, 12:40:50 am
Which version is it that you tried?
Title: Re: FS2Open Oculus VR Test
Post by: Psychonaut on July 09, 2016, 06:28:05 am
The Build on the first page of this thread. You can´t play the Mission, just watch. But it´s very nice. Can´t wait to Play Blue Planet on my CV1.
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on September 28, 2016, 06:08:01 am
Any progress so far? I've never seen anything new for more than a month.

Anyway, it's disturbing to learn that Oculus founder Palmer Luckey gave $10,000 to the alt-right group Nimble America but denied he founded it. It's okay to disregard it, regardless of this?
Title: Re: FS2Open Oculus VR Test
Post by: The E on September 28, 2016, 07:38:33 am
This is so not the right topic for this, Bryan.
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on September 28, 2016, 08:46:53 am
This is so not the right topic for this, Bryan.
I'm asking for the progress, but not the outside news. It has been quiet for some time now, and I'm (and others) are expecting a new build that fixes the bugs that have been found by previous users, or keep up with the main branch of FSOpen.
Title: Re: FS2Open Oculus VR Test
Post by: jr2 on September 28, 2016, 05:37:43 pm
This is so not the right topic for this, Bryan.
I'm asking for the progress, but not the outside news. It has been quiet for some time now, and I'm (and others) are expecting a new build that fixes the bugs that have been found by previous users, or keep up with the main branch of FSOpen.

Umm.  I think he was referring to your mentioning of the politics of the founder.  Start a new thread for that, don't hijack this one.
Title: Re: FS2Open Oculus VR Test
Post by: papa_whiskey on September 29, 2016, 09:18:15 pm
Hello, I have a CV1 rift, and was thinking about working on add support to FS2 Open for it myself when I stumbled upon this forum post. How do I get access to RandomTigers build so I can play with it? I couldn't find an 'Oculus' branch or anything in the GIT repository (https://github.com/scp-fs2open/fs2open.github.com) and I'm a bit lost.

Thanks!
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on September 30, 2016, 05:18:11 am
I wanted it as well.
Title: Re: FS2Open Oculus VR Test
Post by: Darkmage on November 11, 2016, 10:44:16 pm
So where is the support currently sitting in the engine? I have a Playstation VR headset I intend to use with both Freespace 2 and Vegastrike under Linux. To my understanding it is possible to currently use the PSVR headset as a mouse and in games which support binding the mouse to the camera it already works for head tracking. There is code available here: https://github.com/gusmanb/PSVRFramework for controlling/managing Playstation headsets. I'll just add that there's also a very basic C api for managing the headset including polling the X/Y/Z Yaw/Pitch/Roll of the Playstation VR Headset.... It can also switch from Cinema mode to VR mode. (Cinema mode is a flat 2D mode which would be perfect for the 2D menus/UI and the 3D VR Mode for spaceflight). https://github.com/adawarp/libpsvr
Title: Re: FS2Open Oculus VR Test
Post by: Bryan See on February 01, 2017, 11:14:00 am
Darkmage, I think this may be taken as a possibility.

As for RandomTiger, how things going? He hasn't responded since his last post.
Title: Re: FS2Open Oculus VR Test
Post by: VanillaEssence on June 23, 2017, 08:32:44 am
Any update on VR in FSO? Does anyone have this branch downloaded that would be willing to share since the original link has 404'd. All I've wanted since getting my vive is to play Diaspora (and XWA or similar) in VR. It seems like there's a lot of interest to considering the 6k views of this thread. Can I hold out hope?

Thanks

p.s. sorry for necro
Title: Re: FS2Open Oculus VR Test
Post by: The E on June 23, 2017, 09:51:39 am
You can, but the basic factors that are holding us back in this regard haven't changed. There are still technical challenges to overcome before we can pull off a good VR experience.
Title: Re: FS2Open Oculus VR Test
Post by: ksotar on November 23, 2017, 05:42:54 am
For those who can't wait, there is quite good workaround that can provide you with Freespace VR experience right now:

http://www.hard-light.net/forums/index.php?topic=94152.0