Board index FlightGear Development New features

Oculus Rift Support

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Oculus Rift Support

Postby Gouranga » Tue Apr 08, 2014 3:03 pm

Hello flightgear dev community,
I have been following the Rift heavily over the course of the past few years, and in my eyes the one place that it can really excel is in fixed point simulators. So I identified flightgear as the perfect venue for the Rift. I have seen requests on here before by people who have no programming knowledge etc and aren't willing to put in the dev themselves however I have something different.

I have flightgear working with the rift.

I know that the number of users that will currently be able to use this is small, my implementation is also not perfect. The stereoscopy is perfect but there are a few bugs which are down to my unfamiliarity with flightgears render pipeline (currently my shader replaces the skybox) . I feel these are bugs which could quickly be remedied by a core developer. Currently it is hardcoded towards the 1st dev kit but this could be changed later on for the release of the new dev kit and finally the commercial.

I've been using it myself to play around with, showing it to people I managed to gather a small crowd with people clamouring to play. I then showed it to a very experienced flightgear user and in his words "This is changes everything". He currently uses a 3D projector for flightgear and said this was much better, so I want to push it out for those that can play it. I wasn't going to release it but he encouraged me into it.

Like I said before I know demand will be small among those that have a rift and enjoy flightgear but I believe this will add a huge immersion into flightgear and really kick it up to the next notch.

Some screenshots: http://imgur.com/a/N6Mdk#vK6TiFY

I would appreciate any advice you can give, and I can elaborate on my implementation if you wish.
Last edited by Gouranga on Wed Apr 09, 2014 1:31 am, edited 2 times in total.
Gouranga
 
Posts: 5
Joined: Wed Jan 29, 2014 5:42 pm

Re: Oculus Rift Support

Postby Gijs » Tue Apr 08, 2014 3:16 pm

Welcome!

Nice job! My first crude Oculus implementation in FlightGear looks exactly opposite to what you have (ie, the sky dome looks ok, but the rest of the scene lost all textures); see this screenshot. I'd be very interested to have a look at your implementation. Would it be possible to set up a Gitorious clone with your changes? That would be the easiest for other devs to review it...

I don't have acces to a kit yet, but a dev kit 2 is on order. Would like to have it implemented in FlightGear by the time it aarrives. ;-)

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Oculus Rift Support

Postby Gouranga » Tue Apr 08, 2014 3:34 pm

Your shader implementation looks a little better than mine.The code changes are very minimal, I have my own oculus class & it requires some changes in camera group but like I said my knowledge of flightgear as a system is limited and I put them in the place that seemed best at the time.

I will look into setting up a gitorious clone but I have very limited experience with it, so it might take a few days
Gouranga
 
Posts: 5
Joined: Wed Jan 29, 2014 5:42 pm

Re: Oculus Rift Support

Postby Hooray » Tue Apr 08, 2014 3:37 pm

Like Gijs said, a self-contained set of gitorious clones (SG/FG/FGDATA) would be helpful to get this tested/reviewed by other contributors.
You'll probably also want to get in touch with other core developers using the devel mailing list, which is where core development is handled/coordinated.

Currently, we don't have very many people actively involved in FG who are familiar with the rendering pipeline, but in general the right people would be:

  • Mathias Frohlich (handled most of the PLIB->OSG port, currently mostly busy with HLA stuff)
  • Tim Moore (implemented the current effects/shader framework, and also revamped the camera stuff)
  • Frederic Bouvier (anything related to rendering/effects/shaders, implemented Rembrandt)
  • James Turner (hard to come up with a single component/feature - he's all over the place, and handling ~80% of all patches/merge requestss)
  • Stuart Buchanan (clouds, effects, shaders & effects)
  • Torsten Dreyer (implemented steoscopic support originally)

Also, some forum users have done related things, such as Zan (cameras, effects/shaders) or poweroftwo (osgEarth integration).
Usually, these are the folks you'll want to get feedback from for anything rendering related.

Providing a set of gitorious branches would help ensure that people can more easily test this and provide feedback.
You may also want to add a paragraph about your work to the upcoming newsletter, or even add a separate wiki article, e.g. to document your current implementation/strategy.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Oculus Rift Support

Postby Gouranga » Tue Apr 08, 2014 4:02 pm

Cheers for the support, this has taken me a while working on and off anyway. The wiki has been pretty helpful (building seemed to be the part that took longest).

I take it you need a cloned version of FGDATA and FG, do you need the clone FGMeta?
Gouranga
 
Posts: 5
Joined: Wed Jan 29, 2014 5:42 pm

Re: Oculus Rift Support

Postby ludomotico » Tue Apr 08, 2014 5:08 pm

I also made the pre-order of the oculus v2 only for FlightGear. Hence, I'm very interested in this.

I can compile, test and verify any code any of you have. It would be wonderful having the oculus supported before the v2 unit is released!
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Oculus Rift Support

Postby Gijs » Tue Apr 08, 2014 5:43 pm

Gouranga wrote in Sat Nov 01, 2008 1:44 pm:I take it you need a cloned version of FGDATA and FG, do you need the clone FGMeta?

You'd need to clone every repository that you've made changes to to make this happen. That's most likely fgdata and FlightGear. FGMeta is probably not yet necessarily.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Oculus Rift Support

Postby hvengel » Tue Apr 08, 2014 8:49 pm

Hum just tried to get on the Oculus web site and it is completely unresponsive. All I get is a white screen. I can ping oculusvr.com but the web site appears to be off line.
hvengel
Retired
 
Posts: 1127
Joined: Sun Dec 24, 2006 5:35 am
Location: Minden Nevada

Re: Oculus Rift Support

Postby Hooray » Tue Apr 08, 2014 8:54 pm

Temporarily Down for Maintenance
We're sorry, www.oculusvr.com is currently down for maintenance, please check back shortly.


seems facebook is now handling their hosting :D
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Oculus Rift Support

Postby Gouranga » Wed Apr 09, 2014 1:32 am

Gijs wrote in Tue Apr 08, 2014 5:43 pm:
Gouranga wrote in Sat Nov 01, 2008 1:44 pm:I take it you need a cloned version of FGDATA and FG, do you need the clone FGMeta?

You'd need to clone every repository that you've made changes to to make this happen. That's most likely fgdata and FlightGear. FGMeta is probably not yet necessarily.


That's fine. I'll work on getting this up as soon as I have the time free, there are more steps than just the code changes though. There are a few additions to the visual studio build needed, hopefully I can work on verifying the necessary ones. Would a wiki page be the best place for this info?
Gouranga
 
Posts: 5
Joined: Wed Jan 29, 2014 5:42 pm

Re: Oculus Rift Support

Postby Gijs » Wed Apr 09, 2014 9:03 am

Ideally you'd edit the CMake files, as that would "automate" it for everyone. A wiki article will do for now though ;-)
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Oculus Rift Support

Postby Hooray » Wed Apr 09, 2014 12:41 pm

Gouranga wrote in Wed Apr 09, 2014 1:32 am:There are a few additions to the visual studio build needed, hopefully I can work on verifying the necessary ones. Would a wiki page be the best place for this info?


Like Gijs said, ideally you'd just extend the cmake files accordingly: http://wiki.flightgear.org/Developing_using_CMake
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Oculus Rift Support

Postby Gouranga » Wed Apr 09, 2014 6:11 pm

Ok guys, I'll look into this, something else I've never done before. I'm currently in process of finishing the final weeks of my degree and I'm at a suitable point in development for my research. As soon as I have free time I will look into automating the cmake files for now I'll focus on git clones.

For now I have a video of the oculus and flightgear in action: https://www.youtube.com/watch?v=v-31tCHpKC0
Gouranga
 
Posts: 5
Joined: Wed Jan 29, 2014 5:42 pm

Re: Oculus Rift Support

Postby water_raptor » Sun Aug 03, 2014 3:18 am

I just tried out the Oculus DK2 on a git build of Flightgear. stereoscopic mode. No tracking ( haven't figured that out). It was fantastic! I wish I knew more about the programming between FG and Oculus' SDK, It will be more than worth having it automatically part of FG when the consumer version of Oculus Rift comes out.
water_raptor
 
Posts: 6
Joined: Sun Aug 03, 2014 3:12 am

Re: Oculus Rift Support

Postby ludomotico » Sun Aug 03, 2014 1:57 pm

Gouranga and Gijs,

Is there any way of getting access to a repository with your work? I have just received an Oculus DK2 and I'd love to have support in FlightGear. In fact, it was my reason to order the thing in the first place :)

A first research made me think that FligthGear doesn't need any modification and the Oculus can be supported as an OpenSceneGraph extension. FlightGear only needs an option to select this extension as it already does with the other stereoscopic modes. This is the approach used by https://github.com/bjornblissing/osgoculusviewer , and I'm still trying to build successfully this extension (with no luck so far due to a problem with xrandr)
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 6 guests