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 4: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 2:50 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Johan G » Fri Jun 22, 2018 7: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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Integration of virtual reality through Openvr SDK & HTC

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

Johan G wrote in Fri Jun 22, 2018 7: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 2:50 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby paju1986 » Thu Dec 12, 2019 3: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: 246
Joined: Sun Oct 30, 2011 8:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby icecode » Thu Dec 12, 2019 3:47 pm

I'd volunteer to implement it if anyone gifted me a headset to test. :lol:
icecode
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Integration of virtual reality through Openvr SDK & HTC

Postby paju1986 » Thu Dec 12, 2019 4: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: 246
Joined: Sun Oct 30, 2011 8:42 pm
Location: Badajoz (Spain) - LEBZ
OS: Arch Linux

Re: Integration of virtual reality through Openvr SDK & HTC

Postby icecode » Thu Dec 12, 2019 4: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
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Necolatis » Thu Dec 12, 2019 10: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: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Re: Integration of virtual reality through Openvr SDK & HTC

Postby icecode » Fri Dec 13, 2019 7: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
 
Posts: 709
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: Integration of virtual reality through Openvr SDK & HTC

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

I see this very interesting


miguel
miguel
 
Posts: 226
Joined: Wed Aug 19, 2015 5:05 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Hooray » Fri Dec 13, 2019 9: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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Integration of virtual reality through Openvr SDK & HTC

Postby javipamp » Sun Apr 11, 2021 10:58 am

It would be great to have VR developed for this simulator. I would gladly help to contribute with donations in a crowd-funding.
javipamp
 
Posts: 2
Joined: Sun Apr 11, 2021 10:47 am

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Johan G » Wed Apr 14, 2021 5:51 pm

See also this post.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Integration of virtual reality through Openvr SDK & HTC

Postby amalon » Mon Aug 23, 2021 11:33 pm

FYI I've been working on adding OpenXR support to FlightGear for a couple of months:
https://wiki.flightgear.org/Virtual_Reality

Its still in development, but it minimally works (on Linux/X11). Lots more to do though.
amalon
 
Posts: 1
Joined: Mon Aug 23, 2021 11:24 pm

Re: Integration of virtual reality through Openvr SDK & HTC

Postby Necolatis » Wed Jun 07, 2023 2:41 pm

I just tried this on FG nightly on Windows 10 with Quest 2:

- Shadows get rendered, but move around when I turn my head, so I disabled them.
- Eye viewpoint in VR is offset by around 0.2 meters upward. So I have to duck my head to look through the HUD.

Anyone know where I can adjust the offset in the property tree? And also where I can read properties for current VR eye position?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2233
Joined: Mon Oct 29, 2012 1:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2020.3.19
OS: Windows 10

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 8 guests