Board index FlightGear Development New features

Integration of virtual reality through Openvr SDK & HTC Vive

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

Integration of virtual reality through Openvr SDK & HTC Vive

Postby Matteo307 » Fri Jun 22, 2018 3:10 pm

Hello everybody,
it is my first time writing in the forum, but i have explored a lot of the functionalities that Flightgear has to offer.
Recently i have purchased a VR headset (HTC Vive) and started to study how to develop simple apps for this device by using both openSceneGraph and OpenGL frameworks, and
by reading the forum i understood that virtual reality approach has been attempted some time ago with oculus rift, but nothing has followed (at least officially) until then.
I then took a dive in the source code and found that a lot of the render side of the software is based on openSceneGraph, so i had the idea of trying to perform an implementation of the source code and add the support for virtual reality through the openVR api.
I am aware that it is not possible (at least for now) to have more cameras active at the same time in the scenery due to the lack of a composite viewer, but this problem could virtually be overcome by the presence of apps like steamVR that allow mirroring of the screen.
The first step i want to take is to render directly the camera inside the headset, but i don't clearly understand where in the source code the final frame buffer object to be shown is created. Is there anyone who can put me in the right direction?
Thank you in advance for your attention.
Edit: i had To specify that i am interested to develop this in Linux.
Matteo307
 
Posts: 2
Joined: Tue Mar 20, 2018 1:50 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Johan G » Fri Jun 22, 2018 6:15 pm

Something that might be of help if you have not seen it yet is that there is a Stereoscopic View Options dialog. See the FlightGear wiki article Anaglyph (3D) (perm) for more on that.

Unfortunately I do not know where this lives in the source code.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5691
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Matteo307 » Fri Jun 22, 2018 9:21 pm

Johan G wrote in Fri Jun 22, 2018 6:15 pm:Something that might be of help if you have not seen it yet is that there is a Stereoscopic View Options dialog. See the FlightGear wiki article Anaglyph (3D) (perm) for more on that.

Unfortunately I do not know where this lives in the source code.


Hello and thank you for your reply.
The strategy you are proposing involves some kind of "high level" option. I actually have seen about stereoscopic view options, what i would like to do is to get, let's say, the pilot camera view frame by frame and submit it to the HMD through openvr, the HMD itself will then apply the correct deformation, angle of view and so on thanks to the internal drivers of the device.
my idea is to:
1) find in the source code where the actual scene frame buffer is created
2) send the corresponding camera to the vive
3) i don't care about getting other views different for the ones of the pilot,
mainly because i have read that the milestone of a composite viewer seems still far away.
Matteo307
 
Posts: 2
Joined: Tue Mar 20, 2018 1:50 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby paju1986 » Thu Dec 12, 2019 2:35 pm

Now that we finally have a standard for VR, OpenXR, https://en.wikipedia.org/wiki/OpenXR
I would be a good idea to support it, so any HMD will work with flightgear.
paju1986
 
Posts: 240
Joined: Sun Oct 30, 2011 7:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Icecode GL » Thu Dec 12, 2019 2:47 pm

I'd volunteer to implement it if anyone gifted me a headset to test. :lol:
Icecode GL
 
Posts: 610
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby paju1986 » Thu Dec 12, 2019 3:13 pm

Well, I have an old Oculus Rift DK2 that i dont use anymore, maybe if someone is really commited to develop the thing and have the knowledge to do so i can gif it for free if he is willing to pay for the shipping...
paju1986
 
Posts: 240
Joined: Sun Oct 30, 2011 7:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Icecode GL » Thu Dec 12, 2019 3:26 pm

I'll have to check how feasible implementing VR is in FG as we mostly depend on OSG for most of our rendering/input tasks. Right now the OSG mail archive is down (and seems to have been down for a while) so investigating is kind of impossible. I'll get back to you once I make a decision.
Icecode GL
 
Posts: 610
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Necolatis » Thu Dec 12, 2019 9:18 pm

It looks like osg forums was moved to google: https://groups.google.com/forum/#!forum/osg-users
And at least the user archive seems up now: https://www.mail-archive.com/osg-users@ ... graph.org/
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2107
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Icecode GL » Fri Dec 13, 2019 6:48 pm

It doesn't seem like anybody is working on OpenXR support for OSG, and I definitely don't want to deal with OSG's codebase, so I guess we'll have to wait for now.
Icecode GL
 
Posts: 610
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby miguel » Fri Dec 13, 2019 7:34 pm

I see this very interesting


miguel
miguel
 
Posts: 84
Joined: Wed Aug 19, 2015 4:05 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Hooray » Fri Dec 13, 2019 8:44 pm

Some contributors have previously suggested to use crowd-funding in the form of something like patreon to encourage/receive donations specifically intended for their particular area of interest.

https://www.patreon.com/
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: 11737
Joined: Tue Mar 25, 2008 8:40 am


Return to New features

Who is online

Users browsing this forum: No registered users and 0 guests