Author Topic: Oculus Rift support  (Read 3265 times)

0 Members and 1 Guest are viewing this topic.

Offline mid_gen

  • 22
Hey all, new to the forum!

So I'm a pro game coder, with a DK2 sitting on my desk at home, and I'm scratching my head thinking of what to do next for a personal project.....*thought processes go here*....hacking Rift support into FSO might be fun!

Has anyone looked into it in anger before? Any experimental branches lurking?

 

Offline The E

  • He's Ebeneezer Goode
  • Global Moderator
  • 213
  • Nothing personal, just tech support.
    • Skype
    • Steam
    • Twitter
There are no experimental branches I am aware of, so you're definitely free to try your hand at it. Be aware however that there's going to be a rather substantial rewrite of our renderer in the near future (currently developed by Swifty in his personal git repository here), so I would suggest that you base your work off of that, instead of what's in the master branch of the main FSO repository.
**** every cause that ends in murder and children crying. ― Iain Banks
Join the fun at the HLP IRC channel. Get the latest spam and gossip as long as it's fresh!

 

Offline mid_gen

  • 22
Cool thanks, I've forked Swifty's repo, should have some decent time over the weekend to have a look. The OVR SDK looks pretty straightforward-ish, I'll just have to start hacking around and see what happens :)

 

Offline fk0

  • 20
Just to let know, tridef is adding supporto to the oc to their software that now run with many games, but unfortunately only dx9 and dx11 are supported.
Time ago i played using iz3d and i was able to get an interesting stereoscopic view, but that software hasn't been update anymore and is no more compatible with the actual video drivers.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
You're welcome to try adding Oculus Rift support but FYI, the renderer is still in flux, especially as I'm going to be replacing OpenGL with the Core profile. I mean, the simplest implementation you can go with right now, is probably go through game_render_frame twice, one for each eye framebuffer. It's going to run like ass though which is why I put off adding Oculus Rift support myself until the renderer is in a good state where rendering the scene twice from different perspectives isn't such a chore anymore.

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
And one more thing, my branch isn't forked off of the SCP official git repository. This is because my git repo predates the official SCP one by several years as I used it for my own personal source control while SCP was still on SVN. So I highly recommend you don't make any changes right now until I can start migrating stuff to a branch that is properly forked off of the official SCP git repo. You'll only be able to make pull requests on my repo and not the official SCP git repo until after I migrate everything.

 

Offline Goober5000

  • HLP Loremaster
  • Administrator
  • 214
    • Goober5000 Productions
And to add another cautionary note, there have been at least two previous threads on HLP about adding Oculus Rift support to FSO.  (One of them might have been Swifty, but at least one was a new guy who wasn't part of the SCP.)  I suggest coordinating amongst yourselves so you don't duplicate each other's hard work.

 

Offline Echelon9

  • 210
Re: Oculus Rift support
You're probably aware of this, but Valve has recently commenced moves to provide a common open source API and runtime (OpenVR) that would sit between games and hardware specific implementations of virtual reality kit.

Doesn't appear to yet support Occulus Rift, but I'd wager support will get there pretty soon.

This shim layer could greatly simplify support for a range of VR headsets. See https://github.com/ValveSoftware/openvr

 

Offline Swifty

  • 210
  • I reject your fantasy & substitute my own
Re: Oculus Rift support
I think whichever SDK you target is pretty trivial. The biggest hurdle is rendering to two framebuffers for a single scene for both eyes which is something all VR platforms are expecting. I don't think there's much inertia in changing the VR platform you target.

And to add another cautionary note, there have been at least two previous threads on HLP about adding Oculus Rift support to FSO.  (One of them might have been Swifty, but at least one was a new guy who wasn't part of the SCP.)  I suggest coordinating amongst yourselves so you don't duplicate each other's hard work.

Yeah, I keep writing that I'm going to get around to putting in Oculus Rift support but I feel the rendering code isn't ready for it which is I put it off until I get OpenGL Core Profile working. Anyone else is more than welcome to jump the gun but it's a matter of how worth it is it going to be to get Freespace in VR when the performance is likely going to be crap. Just people shouldn't be surprised if I end up rewriting portions of the implementation in order to get it working with whatever improvements I make to the graphics code. That's all I'm going to ask.

 

Offline mid_gen

  • 22
Re: Oculus Rift support
Hey, thanks for the info. The implementation from the OVR SDK is pretty straightforward, you just need to pass it the two framebuffers (or one), and it gives you positional the tracking information.

My OpenGL is pretty rusty so this is mainly a learning/refresher project for me, so don't expect huge swathes of code changes anytime soon :) I'll crack on with trying to beat the stereoscopic rendering into submission first, it's gonna take me a while to learn my way around the codebase.

 

Offline Thilus

  • 22
Re: Oculus Rift support
I'm no coder, I just wanted to leave a cheerleading reply to the brave souls who are attacking this problem. Every Rifter I know asks about FSO support, and HMD ownership is going to skyrocket in the next year, it'll make a lot of people pretty thrilled if this ever happens!

 

Offline mid_gen

  • 22
Re: Oculus Rift support
Don't thank me yet, no guarantee anything will work! As well as learning the FSO rendering code and Oculus SDK, I'm dragging my limited C++ and OpenGL from years old memory banks so it's a little slow at the moment :)

Got the FSO build going, got the SDK hooked in and talking to the HMD, next step is to wrap the FSO rendering in the Oculus timing calls and try chucking a single image at the HMD, see what happens.

 

Offline Thoemse

  • 23
Re: Oculus Rift support
Thanky ou for trying to do this. I hope so badly ou succeed!

 

Offline mid_gen

  • 22
Re: Oculus Rift support
Been a busy couple of weeks but making progress slowly.

Even assuming I can get it functioning, there's going to need to be a pretty extensive rework of the UI to make something playable! Cross that bridge when we come to it though :)

 

Offline ShinAli

  • 21
I've spent a couple of hours a long time ago messing with getting the SDK in FSO and managed to get tracking by co-opting the TrackIR feature that was already in. I can probably dig it up if you want it.

I'd keep looking into it but I'm a game programmer by trade that's also working on another game in my off time.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️À➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
That would be excellent.  I can't say we'll get it integrated before we move to SDL2 but seeing a working draft done with our existing code could only accelerate the process.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Echelon9

  • 210
Thanks ShinAli, we'd certainly appreciate it.