Stereo driver for the Oculus Rift under Linux
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Stereo driver for the Oculus Rift under Linux
I had to have a go at it, so here it is ! Based on my previous tests with anaglyph rendering I've started to modify my Linux stereo driver in order to make it compatible for the launch of the Oculus Rift.
For now there is no warping nor chromatic aberration correction but I intend to implement that quickly. It does more or less support several games already such as Neverball/Neverputt, Extreme Tux Racer and TORCS as well as demos like Quake 3 and Doom (with Vavoom).
The rendering should be "physically" correct for Quake 3 since I integrated the scale in my calculations (1 foot = 8 units), but it can be done for any game as long as I'm able to find the scale they use. I'm using a standard 65mm separation for now, but it's configurable in a config file.
The two frames are not rendered at the same time but I intend to correct that in the future by duplicating all drawing calls. I should also correct the sky rendering in Extreme Tux Racer and find a way to move the HUDs or to make them invisible (with an option and/or a shortcut key).
I intend to support games running through Wine such as Left4Dead, Supreme Snowboarding and PES2012 for which I have the demos installed.
Here are some screenshots, unfortunately I couldn't yet intercept the keyboard for Quake 3 and it only captured the left frame for Doom, so I can only show open source games for now :
I don't know if I'll make it open source yet. Steam is coming to Linux and that could be a good opportunity for me to make some money, by supporting future games with several stereo 3D modes (SBS, frame packing, anaglyph, interlaced and the Rift).
For now there is no warping nor chromatic aberration correction but I intend to implement that quickly. It does more or less support several games already such as Neverball/Neverputt, Extreme Tux Racer and TORCS as well as demos like Quake 3 and Doom (with Vavoom).
The rendering should be "physically" correct for Quake 3 since I integrated the scale in my calculations (1 foot = 8 units), but it can be done for any game as long as I'm able to find the scale they use. I'm using a standard 65mm separation for now, but it's configurable in a config file.
The two frames are not rendered at the same time but I intend to correct that in the future by duplicating all drawing calls. I should also correct the sky rendering in Extreme Tux Racer and find a way to move the HUDs or to make them invisible (with an option and/or a shortcut key).
I intend to support games running through Wine such as Left4Dead, Supreme Snowboarding and PES2012 for which I have the demos installed.
Here are some screenshots, unfortunately I couldn't yet intercept the keyboard for Quake 3 and it only captured the left frame for Doom, so I can only show open source games for now :
I don't know if I'll make it open source yet. Steam is coming to Linux and that could be a good opportunity for me to make some money, by supporting future games with several stereo 3D modes (SBS, frame packing, anaglyph, interlaced and the Rift).
You do not have the required permissions to view the files attached to this post.
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
Re: Stereo driver for the Oculus Rift under Linux
Ah yes, great work.
I love all the development the Rift has spurred. Exciting times for sure.
Also, I got my warping equation from Emerson as per this post:
http://www.mtbs3d.com/phpBB/viewtopic.p ... 912#p74912
I love all the development the Rift has spurred. Exciting times for sure.
Also, I got my warping equation from Emerson as per this post:
http://www.mtbs3d.com/phpBB/viewtopic.p ... 912#p74912
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
Some more shots of Doom, since I recall someone asked for it in another thread :
Thanks Cyber, I'll have a look at these equations after some sleep and a good day of boring Web development at work... You do not have the required permissions to view the files attached to this post.
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
- android78
- Certif-Eyable!
- Posts: 990
- Joined: Sat Dec 22, 2007 3:38 am
Re: Stereo driver for the Oculus Rift under Linux
You need a disclaimer on that etracer.jpg pic... I was admiring the pics cross-eyed and that one almost made my eyes bleed with the way the hills in the background are rendered!
- Likay
- Petrif-Eyed
- Posts: 2913
- Joined: Sat Apr 07, 2007 4:34 pm
- Location: Sweden
Re: Stereo driver for the Oculus Rift under Linux
Impressive work Fredz! I'm looking forward to see what's going to happen.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
Yep, sorry about that one, I'll correct the skybox rendering.android78 wrote:You need a disclaimer on that etracer.jpg pic... I was admiring the pics cross-eyed and that one almost made my eyes bleed with the way the hills in the background are rendered!
Thanks for the encouragements guys, appreciated.
- cirk2
- Certif-Eyed!
- Posts: 521
- Joined: Fri May 11, 2007 10:13 am
Re: Stereo driver for the Oculus Rift under Linux
I'm just reporting in to state my interest in this. Quite impressive what you've done so far.
Is your driver working on a general principle (like the Nvidia or iz3D ones) or do you need to work it out for every Game?
Is your driver working on a general principle (like the Nvidia or iz3D ones) or do you need to work it out for every Game?
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
For now it's the same code base for all the games, but I may need to create profiles and specific coding paths for some games. I'm not able to support games through Wine at this point, so it's possible that Wine will be one of such paths. I'd need to implement some sort of log first to see what really happens behind the scenes though.
-
- Petrif-Eyed
- Posts: 2708
- Joined: Sat Sep 01, 2012 10:47 pm
Re: Stereo driver for the Oculus Rift under Linux
The hills look great if viewed in wide-eye view, but the foreground is cross-eye view.android78 wrote:You need a disclaimer on that etracer.jpg pic... I was admiring the pics cross-eyed and that one almost made my eyes bleed with the way the hills in the background are rendered!
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
A quick update to announce that I'm now able to support games through Wine. I've got Left4Dead, Supreme Snowboarding and PES 2013 demos more or less working. There are still some glitches like flickering and quad rendering instead of dual rendering for L4D and PES but it should be quite easy to correct.
I'm not able to get Deus Ex working for now since it doesn't seem to use double buffering, so I'll try another way by intercepting flush commands and/or viewport calls. No screenshots since I didn't backport my keyboard intercept yet, but that should be back soon.
So the next step is to try to have a single code base for all types of games, ie. native commercial 32bits, open source 32 and 64bits and Wine 32bits. When I'm satisfied with this I'll try to either write a configurable warping shader (IPD, magnifying value, chromatic abberation, overlap %) or support head tracking with the PS Eye and/or the devices I bought last week (Wiimote Remote Plus, PS Move).
I'm not able to get Deus Ex working for now since it doesn't seem to use double buffering, so I'll try another way by intercepting flush commands and/or viewport calls. No screenshots since I didn't backport my keyboard intercept yet, but that should be back soon.
So the next step is to try to have a single code base for all types of games, ie. native commercial 32bits, open source 32 and 64bits and Wine 32bits. When I'm satisfied with this I'll try to either write a configurable warping shader (IPD, magnifying value, chromatic abberation, overlap %) or support head tracking with the PS Eye and/or the devices I bought last week (Wiimote Remote Plus, PS Move).
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
- cirk2
- Certif-Eyed!
- Posts: 521
- Joined: Fri May 11, 2007 10:13 am
Re: Stereo driver for the Oculus Rift under Linux
Really nice! 3D is one of the last things that keeps Windows alive on my system (besides DX11).
-
- One Eyed Hopeful
- Posts: 11
- Joined: Sat Dec 15, 2007 11:06 am
- Location: The netherlands
Re: Stereo driver for the Oculus Rift under Linux
Very nice work. I'm going to try this when i have my rift.
- cirk2
- Certif-Eyed!
- Posts: 521
- Joined: Fri May 11, 2007 10:13 am
Re: Stereo driver for the Oculus Rift under Linux
Hey,
Is your project still alive? With the Steam for Linux Release this driver got more Relevant.
Is your project still alive? With the Steam for Linux Release this driver got more Relevant.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
I've not touched it for months, waiting for the Rift to regain motivation.
-
- Cross Eyed!
- Posts: 189
- Joined: Fri May 03, 2013 12:48 am
Re: Stereo driver for the Oculus Rift under Linux
Did you get your rift yet?Fredz wrote:I've not touched it for months, waiting for the Rift to regain motivation.
Now that SteamOS is announced it would be great.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
Yes I got my Rift but I've not resumed work on this project yet. I had a severe accident some months ago that got me somewhat sidetracked.
- cybereality
- 3D Angel Eyes (Moderator)
- Posts: 11407
- Joined: Sat Apr 12, 2008 8:18 pm
Re: Stereo driver for the Oculus Rift under Linux
I'm sorry to hear that. I hope everything turns out OK.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
Thanks Cyber, I'm mostly fine now.
-
- One Eyed Hopeful
- Posts: 4
- Joined: Sat Dec 22, 2007 3:38 am
- Location: Madison, WI, USA
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
Fredz, I will be watching your driver with great interest. I already watch 3D videos under Linux using Bino or sView + my old-school shutter glasses, but I would love to be able to play games in 3D as well. Currently, I have to boot into Windows to do this, and I can't play my growing collection of OpenGL games this way.
- Fredz
- Petrif-Eyed
- Posts: 2255
- Joined: Sat Jan 09, 2010 2:06 pm
- Location: Perpignan, France
- Contact:
Re: Stereo driver for the Oculus Rift under Linux
I've still not resumed programming on this driver and I'm not sure it'll fill your need.
At this time it only supports side-by-side, white/blue line code and anaglyph rendering and uses a frame alternate technique instead of rendering two views in one pass.
Support for 3D glasses that don't use WLC/BLC won't be easy, I had some code working for older DDC VGA glasses (eDimensional and Elsa Revelator) and older NVIDIA GPUs (<= NV50) but I did not integrate that in the driver.
Some code should be available for 3D Vision glasses support on Linux as well, I've bought a wired version of them but I didn't try to support that yet.
But the most difficult problem is to synchronize the rendering with the vertical retrace, I had some success with this by modifying Genlock but it did work only for 7XXX and 8XXX GPUs, was a bit cumbersome to install/activate (kernel module) and it didn't work for a lot of people it seems from the feedback I got.
So there is quite a lot of work to do before being able to support S3D rendering for shutter glasses on Linux.
At this time it only supports side-by-side, white/blue line code and anaglyph rendering and uses a frame alternate technique instead of rendering two views in one pass.
Support for 3D glasses that don't use WLC/BLC won't be easy, I had some code working for older DDC VGA glasses (eDimensional and Elsa Revelator) and older NVIDIA GPUs (<= NV50) but I did not integrate that in the driver.
Some code should be available for 3D Vision glasses support on Linux as well, I've bought a wired version of them but I didn't try to support that yet.
But the most difficult problem is to synchronize the rendering with the vertical retrace, I had some success with this by modifying Genlock but it did work only for 7XXX and 8XXX GPUs, was a bit cumbersome to install/activate (kernel module) and it didn't work for a lot of people it seems from the feedback I got.
So there is quite a lot of work to do before being able to support S3D rendering for shutter glasses on Linux.