Introducing Vireio Perception (3D Driver for Oculus Rift)

The place for all discussion of the Oculus Rift compatible open source 3D drivers.
User avatar
yomer
Cross Eyed!
Posts: 196
Joined: Fri Jan 25, 2008 11:27 am

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by yomer »

OzOnE2k10 wrote:Hi, Mr Cyber,

Just to say that VireIO is sort of working in Project64...
I just used the "Mudlord's Rice Video Build 6.1.3 - DX9" plugin, and copied d3d9.dll from your driver into the Project 64 folder.

The warping seems to be working fine, but it looks like the two images are identical (ie. no depth / parallax separation)?
At least it's playable in "2D" on the Rift atm (duping / warping working). :D

The 6.1.3 DX9 plugin in PJ64 has a few of it's own glitches though - it often flickers etc.

This is a nice start though, looks like it's almost there. :)
I've only tried Mario 64 and Mariokart so far.

I can send you my copy of PJ64 if you need it?
I know emulators aren't exactly a priority atm, but will be a lot of fun to play N64 in S3D.

Is that plugin the best one available for PJ64? If something is to be done to make PJ64 work with the OR, it should be over the fastest, most compatible and most stable plugin, don't you think?
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

I can view the Test 1 screen shot fine on the Rift. The Test 2 the separation is to far apart.

Test 1 I can see the top and bottom black border which is ok because it doesn't take away that much from FOV. In the end if we had to choose FOV over correct scale I think scale would win.

Just an idea. If possible the black border should be changed to a green or red border for testing(Valve uses green lines in thier IPD calc app). This would make it is easier to see and identify than black border during testing.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

yomer wrote:Is that plugin the best one available for PJ64? If something is to be done to make PJ64 work with the OR, it should be over the fastest, most compatible and most stable plugin, don't you think?
Actually, it's not such a bad plugin tbh. It's only on a few games that I was getting flickering etc.

And yes, I agree, but I thought it was good to know that at least the older plugin is making some progress with VireIO already. ;)

The best plugin seems to be the newer "Mudlord's Rice Video 6.1.4", but 6.1.3 DX9 isn't far off (as far as I can tell).

I've just found that by adding "Project64.exe" to profiles.xml, VireIO picks it up fine without needing to copy the d3d9.dll.
Still no separation though, but I don't know what all the other options in the XML do?
K701
Two Eyed Hopeful
Posts: 55
Joined: Sun Jul 29, 2012 2:44 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by K701 »

Baristan6 wrote:
K701 wrote:how about if you crop the horizontal off and increase the ingame fov to compensate.
Like this.
Vireio OculusRiftView Skyrim1 Test2.jpg

Better as far as FOV but now you need to re adjust the left and right spacing between the images . My eyes feel like they are crossing over trying to view test 2.
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

(sorry to interrupt the Skyrim stuff, I'll be buying that as soon as the Rift arrives).

I changed a few options on PJ64 and it seems to be working with VireIO in Windowed mode now?

Image

I tried the hot keys (with the VireIO window in focus), but only the screenshot key works.
Baristan6
Cross Eyed!
Posts: 111
Joined: Sat Dec 15, 2012 11:33 am

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by Baristan6 »

OzOnE2k10 wrote:I tried the hot keys (with the VireIO window in focus), but only the screenshot key works.
Which Vireio "game_type" are you using in the profiles.xml file?
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

Ahh, well it was set to 601 'cos I copied the profile from Skyrim, but now it's at 101.

Glad you asked, 'cos I've no idea what that does. hehe
K701
Two Eyed Hopeful
Posts: 55
Joined: Sun Jul 29, 2012 2:44 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by K701 »

OzOnE2k10 wrote:(sorry to interrupt the Skyrim stuff, I'll be buying that as soon as the Rift arrives).

I changed a few options on PJ64 and it seems to be working with VireIO in Windowed mode now?

diddy.jpg

I tried the hot keys (with the VireIO window in focus), but only the screenshot key works.
Besides not being widescreen or 3d it looks perfect (maybe Diddy is a little bit too low on the screen)

edit:

This is about what I see on the Rift, everything else is cut off.

Image
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

Yeah, it's not as bad as I thought. The geometry and effects look as good as in the 6.1.4 plugin.

Keep in mind that the above screenshot was also with a high-res texture pack.

EDIT: You just reminded me - not sure which resolution to set PJ64 to either.
I've tried all different widescreen, 16:10, and 4:3 modes for both Windowed and Full Screen, but nothing appears to change with regards the 3D depth?

I think the flickering was only an interaction with VireIO, and is much more frequent in say Mariokart than in other games (can't remember exactly what I've tried now as been messing with different combinations).

When in Rift mode, sometimes it will flicker and split the right-hand side of the screen again (so you end up with an image on the left, and two half-width images on the right)?
I don't even know what VSYNC / buffering method these plugins use. Some of them have options for this, and often default to Triple Buffering, if that means anything?

The "Rice" plugins have options for Combiner Type, Swap Effect, and Depth Buffer Type though.
(currently set to Pixel Shader, Flip, and 16-bit respectively).

I'm using Project64 1.7.0.46 if anyone wants to test it?
Last edited by OzOnE2k10 on Wed Apr 03, 2013 6:22 pm, edited 2 times in total.
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

Skyrim Feedback

See screen shots.

Here is video http://youtu.be/sPws4n05FOE note video was taking using default settings, so white was visible.

FOV was set to 110

Overall world scale felt slightly wide so vertical needs to higher to fell like real world scale. Warp seems ok.

When I am talking about real world scale I guess that is an inaccurate description.

I attached a simple graphic to help explain what I am trying to convey.
You do not have the required permissions to view the files attached to this post.
Last edited by pizzy00 on Wed Apr 03, 2013 8:30 pm, edited 3 times in total.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
K701
Two Eyed Hopeful
Posts: 55
Joined: Sun Jul 29, 2012 2:44 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by K701 »

pizzy00 wrote:Skyrim Feedback

See screen shots.

Here is video http://youtu.be/sPws4n05FOE note video was taking using default settings, so white was visible.

FOV was set to 110

Overall world scale felt slightly squished so vertical needs to higher to fell like real world scale. Warp seems ok.
On your "no white visible" screenshot I can still clearly see the white on the bottom when my eyes are looking at the center of the screen. However if I move my eyesight downwards I can't see the white. I guess my eyes are too sunk in my skull.

Also those wooden drums or kegs look perfectly round to me. The squished feel you get is probably just the scale of the game. Remember the game was not made with VR in mind so the scale is not going to be 1:1 realistic. When I used to play Skyrim with tridef and my Sony HMZ it definitely had a miniature feel. Especially the humanoid characters. You get used to it after a while.
Baristan6
Cross Eyed!
Posts: 111
Joined: Sat Dec 15, 2012 11:33 am

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by Baristan6 »

I didn't change the scale, but fixed the lens offset, and changed the default separation in the cropped mode to be 1/2.
Vireio OculusRift Beta3 normal.jpg
Vireio OculusRift Beta3 Cropped.jpg
Both jpegs are with a fov of 125. I'm getting tired and am about to quit working on this for today.
If they both look ok I'll upload the binaries.
You do not have the required permissions to view the files attached to this post.
K701
Two Eyed Hopeful
Posts: 55
Joined: Sun Jul 29, 2012 2:44 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by K701 »

Baristan6 wrote:I didn't change the scale, but fixed the lens offset, and changed the default separation in the cropped mode to be 1/2.
Vireio OculusRift Beta3 normal.jpg
Vireio OculusRift Beta3 Cropped.jpg
Both jpegs are with a fov of 125. I'm getting tired and am about to quit working on this for today.
If they both look ok I'll upload the binaries.

both look good
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

Baristan6 wrote:I didn't change the scale, but fixed the lens offset, and changed the default separation in the cropped mode to be 1/2.
Vireio OculusRift Beta3 normal.jpg
Vireio OculusRift Beta3 Cropped.jpg
Both jpegs are with a fov of 125. I'm getting tired and am about to quit working on this for today.
If they both look ok I'll upload the binaries.

Feedback

Both look good 3D wise. The cropped one is zoomed in, I can't see any white. The normal one is zoomed out, I can see white on top and bottom. I prefer normal you can see more content.

Great job.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
Baristan6
Cross Eyed!
Posts: 111
Joined: Sat Dec 15, 2012 11:33 am

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by Baristan6 »

My latest version is here.
Perception OculusRift beta4.zip
It has tracking for the rift, and 2 different warp shaders(wide/cropped).
Roll is currently bugged and will stretch the view. I suggest disabling it by editing the profiles.xml file and changing roll_multiplier to 0.
F1 no longer takes a screenshot. F1/SHIFT+F1 changes the distortion scale, zooming in/out.

I've also added a few bug fixes. Vireio never released any IDirect3DResource9. I fixed the ones I could find. Now switching screen size is possible in some games. This also fixed crashes while dragging windows around in Unity apps.

I haven't had any problems in Skyrim, but other games like L4D2 and Half Life 2 still randomly work or crash.
You do not have the required permissions to view the files attached to this post.
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

K701 wrote:
pizzy00 wrote:Skyrim Feedback

See screen shots.

Here is video http://youtu.be/sPws4n05FOE note video was taking using default settings, so white was visible.

FOV was set to 110

Overall world scale felt slightly squished so vertical needs to higher to fell like real world scale. Warp seems ok.
On your "no white visible" screenshot I can still clearly see the white on the bottom when my eyes are looking at the center of the screen. However if I move my eyesight downwards I can't see the white. I guess my eyes are too sunk in my skull.

Also those wooden drums or kegs look perfectly round to me. The squished feel you get is probably just the scale of the game. Remember the game was not made with VR in mind so the scale is not going to be 1:1 realistic. When I used to play Skyrim with tridef and my Sony HMZ it definitely had a miniature feel. Especially the humanoid characters. You get used to it after a while.
I retested the screen shot "no white visible" again. Depending on how close I have my eyes to lens some white is visible and the same thing you say happens to me about looking down.

I edited my post to answer your other comments. I know objects and world in none VR games the scale will be off, my post above explains what I was really meaning.

Please post on your feedback I am curious if you agree or disagree regarding Skyrim atleast.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
jack612
Two Eyed Hopeful
Posts: 80
Joined: Mon Aug 27, 2012 12:20 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by jack612 »

I just played some Skyrim and this is awesome. I can't believe how for it's come in the last few days. Unfortunately my computer that can easily run Skyrim on Ultra at 1080p gets like 24fps in stereo at 1280x800, but if I turn down some settings this is great on the Rift. Nice work.
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

Baristan6 wrote:My latest version is here.
Perception OculusRift beta4.zip
It has tracking for the rift, and 2 different warp shaders(wide/cropped).
Roll is currently bugged and will stretch the view. I suggest disabling it by editing the profiles.xml file and changing roll_multiplier to 0.
F1 no longer takes a screenshot. F1/SHIFT+F1 changes the distortion scale, zooming in/out.

I've also added a few bug fixes. Vireio never released any IDirect3DResource9. I fixed the ones I could find. Now switching screen size is possible in some games. This also fixed crashes while dragging windows around in Unity apps.

I haven't had any problems in Skyrim, but other games like L4D2 and Half Life 2 still randomly work or crash.

Changing roll_ multiplier to 0 in profiles.xml is not turning off the roll. Let me know if anyone finds a way to disable.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
K701
Two Eyed Hopeful
Posts: 55
Joined: Sun Jul 29, 2012 2:44 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by K701 »

pizzy00 wrote:
K701 wrote:
pizzy00 wrote:Skyrim Feedback

See screen shots.

Here is video http://youtu.be/sPws4n05FOE note video was taking using default settings, so white was visible.

FOV was set to 110

Overall world scale felt slightly squished so vertical needs to higher to fell like real world scale. Warp seems ok.
On your "no white visible" screenshot I can still clearly see the white on the bottom when my eyes are looking at the center of the screen. However if I move my eyesight downwards I can't see the white. I guess my eyes are too sunk in my skull.

Also those wooden drums or kegs look perfectly round to me. The squished feel you get is probably just the scale of the game. Remember the game was not made with VR in mind so the scale is not going to be 1:1 realistic. When I used to play Skyrim with tridef and my Sony HMZ it definitely had a miniature feel. Especially the humanoid characters. You get used to it after a while.
I retested the screen shot "no white visible" again. Depending on how close I have my eyes to lens some white is visible and the same thing you say happens to me about looking down.

I edited my post to answer your other comments. I know objects and world in none VR games the scale will be off, my post above explains what I was really meaning.

Please post on your feedback I am curious if you agree or disagree regarding Skyrim atleast.
I understand what you mean now but I can't see it. It looks fine to me.
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

Feedback

HL 2 works for me. Roll skewing occurs in this game also. This game did allow me to change res without crashing.

The F4 / F5 : Adjust Convergence hot keys sensitivity needs to be turned down. If you press hot keys it changes convergence amount to fast making it too touch and had to zero in.

I will post a short video of HL 2 soon.

For my settings on this test I zoomed out some by using F1 or shift F1 I can't remember. I was using the Oculus Cropped setting.

Here are some screen shots.

Compared to Skyrim the HL 2 game world seems closer to real world as far as objects appearing height and width wise.

I forgot to record what FOV I had. I will make sure to note that in the future. I need to test different FOVs in HL 2 also.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
jack612
Two Eyed Hopeful
Posts: 80
Joined: Mon Aug 27, 2012 12:20 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by jack612 »

I just played some Half Life 2 and aside from the roll skewing, it's looking pretty good. For some reason it wouldn't let me change FOV through the console until after I had gotten the HEV suit in Kleiner's lab, but after that it was great.
User avatar
pizzy00
Cross Eyed!
Posts: 123
Joined: Thu Mar 07, 2013 2:04 pm
Location: Indiana

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by pizzy00 »

Feedback

I can confirm for me L4D 1 works. It also allows you to change res with out crashing.

TIP if you cant see game menu use F1 or shift F1 to zoom out to view menu to make any changes.

TIP you will need to adjust mouse settings to change the x y tracking ratio for the Rift. L4D 1 seemed to have less vertical head tracking guessing due to game mouse settings for vertical aiming.

As promised here is the HL 2 video test http://youtu.be/DtHtViAGYNU

I will upload the L4D 1 test I just did a little later. I had it set to Oculus Cropped, FOV 110. Post your FOV test settings guys.

Guys be sure to view the screen shot via the Rift looks pretty cool.

As promised short video http://youtu.be/KkFA3_gxW7Y
You do not have the required permissions to view the files attached to this post.
Check out this forum for a beta driver to get existing games working with the Rift.
Official Vireio Perception Driver Forum http://www.mtbs3d.com/phpbb/viewforum.php?f=141
Support these games on Steam Greenlight them http://steamcommunity.com/sharedfiles/f ... d=92979040
Rig Specs - MS Windows Ultimate, i5 3470, 16 GB RAM, 2x AMD 1GB 5850 HD crossfired, SATA2 HD
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by cybereality »

@Baristan6: That first image looks OK on the Rift.

@OzOnE2k10: You may want to try 'game_type="10"'. That's for the fixed-function pipeline and is probably what that emulator is using (the other modes assume you are using shaders for rendering).
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by CyberVillain »

Didn't realize that it was that much unused pixels. :/

btw, very good job boys, wish i was good at this low level DX stuff
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

Hi,

I tried game_type 10, but no 3D (found the defines in the source now).
I've had a peek into the VireIO source, but 3D programming is a tad beyond me atm. I only know the basics of matrix maths etc.

But, just found out that the source to Project64 2.0 was made open-source on 1st April, and it WASN'T an April Fool's joke for once... :woot
http://forum.pj64-emu.com/showthread.php?t=3573

(I had to install Git and clone it under Windoze 7 with "git clone http://pj64-emu.com:8090/project64.development/ project64", as I'm too lazy to run VM / Linux / Cygwin).

Also, the source is available for the community version of Rice's video plugin...
http://www.emutalk.net/threads/54166-Ri ... ty-version

I've compiled PJ64 2.0 and it's working well with Mario 64 so far.
Its supposed to be a beta though, so there maybe issues with certain games?

Are you able to hook into the camera transforms for that Rice's plugin source with VireIO?
VireIO still only works with the older 6.1.3 DX9 plugin atm (SBS, warping, but in 2D).

btw, I really appreciate all the work that's going on here.
Many people don't have their Rifts yet, and already we're seeing some great software and tools being produced. ;)
IM0001
One Eyed Hopeful
Posts: 7
Joined: Tue Nov 01, 2011 5:35 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by IM0001 »

While the progress so far is fantastic, is there a chance we can request some support for games that actually make sense to try with VR while also being a bit easier on the brain for new people to experience? (Flight Sims, Slower driving games, etc). Dirt is the only Driving game so far but I think one of the best and most popular I have seen about would be that Euro Truck Simulator 2 game. The demo gives plenty of trial room, and the pace is slow enough that it would keep people from being overwealmed by the speed like in that Racing demo they showed at GDC. Also for flying FSX is the old default, but also Rise of Flight would be a great VR example with its slow pace, and fantastic graphics (though without any visual HUD on to highlight enemy craft, the low res of the curent Rift would make visually spotting enemies a crapshoot). Also if the old but still good World War 2 Online game ever gets Rift support, I shall disapear inside that VR world for many many hours. The game would be perfect for VR.

A Good SITTING position in a game would make a much more natural start for VR players to try out VR and hopeuflly the gameplay would make more sense since looking around with a actual neck limit would feel natural.

Still great work on the progress and I am still working on my own skills to be able to finally get developing with this thing, until then I shall continue to test, tweak, and tinker to the max of my abilities.
User avatar
yomer
Cross Eyed!
Posts: 196
Joined: Fri Jan 25, 2008 11:27 am

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by yomer »

Wishlist: (In no particular order)
  • Dolphin Emulator
    PJ64 Emulator
    realMyst
    Amnesia: The Dark Descent
    Sins of a Solar Empire (I don't know if the scale will help or ruin it)
    Fallout 3
    Comand & Conquer
    Homeworld 2
I will edit if I think of others
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

I'm just thinking about IM0001's post, and even though it would be great to see PJ64 working, I think the time would be better spent on the more popular modern games.

I didn't really give enough thought to the fact that hardly any N64 / "retro" games are going to be suitable for headtracking.
Many of these older games used tricks like 2D "billboards" which always face the camera etc.

I'm still trying to get my head around the VireIO source though...
@cybereality - how do you enable full debug message and debug log output from the driver?

I can compile and debug it fine under MSVC 2010, but I only see the initial OutputDebugString messages (at InitConfig).
I don't see any more messages after that, even when it's doing the warping on a game?
RangerOne
One Eyed Hopeful
Posts: 2
Joined: Thu Mar 07, 2013 12:44 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by RangerOne »

2EyeGuy wrote:
RangerOne wrote:This is a neat application. I sounds like, since all the imaging splitting and morphing with this is done outside the game application, I could technically modify this to work with a yet unsupported game by simply adding a new profile to Vireio. The only true in game interface that could need to be change are how you chose to integrate head tracking via existing or modify control schemes.

I am interested in trying modify a profile to work with X-Wing Alliance as that game to my recollection allows the user to freely move their head in the cockpit with the mouse, so the OR could add near full immersion. The only problems are foresee are the responsiveness of the tracking and the inability to see the joystick or key board while in game. I was thinking hot keying in some voice commands to fix this with something like a Kinect. That and the game is so old is performance is sketchy on multi core PCs.

Is Vireio up for purchase or download? Or have you switched to taking donations.
X-Wing Alliance is Direct3D 5.2, Vireio Perception (and the other drivers) only support Direct3D 9 (or above).
Fortunately, there is one person on here crazy enough to already be working on a special Direct3D 5 Rift Driver.... Me.

I'm currently getting Wing Commander 1 Kilrathi Edition (the windows version which uses DirectDraw 5) working in my own driver. WC1 uses DirectDraw rather than Direct3D, so don't expect much 3D. It will be more like a life-sized virtual screen at a sensible depth at a fixed point in the void in front of you, and when you turn your head past 45 degrees, that screen will disappear and reappear to your right or left and it will simulate the F2/F3 key to change the view. (The game only allows you to look in 4 fixed directions). Anyway, I'm doing DirectDraw and earlier Direct3D versions with Direct3D 9 calls to make sure it works with the Rift.

I should be able to get games like X-Wing Alliance working in a less-hacky way, since they render in actual 3D. But I'm starting with DirectDraw since early Direct3D versions are built on top of DirectDraw. Then I'll work my way up.
Very cool. Yeah I didn't notice the Dx9 restriction until I reread the forum this morning. Getting back to the forums now that I have my Rift Dev Kit. Don't expect to accomplish much code wise other than hacking at least until I make some time to learn some more Directx coding. Ill keep an eye out for D3d 5 from you.
lordvtp
One Eyed Hopeful
Posts: 27
Joined: Fri Mar 22, 2013 8:19 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by lordvtp »

The game that is truly near and dear to my heart , that I would love to see rifted is Desert Combat(bf1942). Dx8 though ;----; ... The game looks pretty good in 3dvision but I'd love to use the apache's 30mm the way god indented! :woot
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

lordvtp wrote:The game that is truly near and dear to my heart
I don't remember the game too well, but this vid always springs to mind (back when you had to install Video For Windows on Win 3.1 just to get the damned clip to play)...
http://www.youtube.com/watch?v=RfQ-mF4mZ8M

Tom Wilson is hilarious as always. :lol:
It also shows our friend Chris Roberts of course, who has been doing the rounds with the Oculus guys at SXSW.

Sigh. Those were the days.

Sorry, back on topic. :)
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by cybereality »

@OzOnE2k10: I was using DebugView ( http://technet.microsoft.com/en-us/sysi ... 96647.aspx ) to see the output messages.
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

OK, thanks. DebugView is working now. I couldn't get debug to work under MSVC in either the Output or Immediate windows?
(Although, DebugView does cause my PC to freeze for about a minute when VireIO is first run as debug?)

So far, it shows this (partial)...
[7456] stereo mode not disabled
[7456] Config type: 10
[7456]
[7456] D3D ProxyDev Created
[7456] D3D ProxyDev Fixed Init
[7456] D3D ProxyDev Init
[7456] Created StereoView
[7456] type: 10, aspect: 0.500000
[7456]
[7456] Try to init Tracker
[7456] Motion Tracker Created
[7456] Motion Tracker Init
[7456] StereoView Init
[7456] PxHelp: Success opening key.
[7456] PxHelp: Success with GetString.
[7456] C:\Users\OzOnE\Desktop\Perception-master\Debug\Perception\
[7456]
[7456] vp w: 799
[7456]
[7456] bb w: 800
[7456]
[7456] StereoView initVertexBuffers

Are there many different methods for the camera offset / projection matrix stuff with DX9?
Is there any relatively easy way to tell if VireIO is "attempting" to do the camera offset / eyeShutter stuff.

It's applying the warp shader, but seems like it can't grab the matrix format?

(I know there are more important games than the N64 right now, but I'm trying hard to learn the VireIO code so I can help do some dev stuff.)
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by cybereality »

To do the actual stereo render, the app is usually modifying into 'SetVertexShaderConstantF' (see 'D3DProxyDeviceUnreal.cpp' for example). This is where most modern games will pass in the model-view-projection matrix into a vertex shader. This is the matrix we want to alter (well we would really like the individual matrices, but most games will combine them before they reach the shader). We then alter this matrix, so it shifts to the side (stereo), or sheers the matrix (partial overlap).

For fixed-function pipeline games (maybe really old or indie titles) we just need to modify 'SetTransform'. This is actually easier, because we know if its the view or projection matrix that is being set. You can look at the code in 'D3DProxyDeviceFixed.cpp'. My assumption is that a N64 emulator would be using this, since I doubt they had or needed shaders on the N64, but honestly don't know.

If you look in the 'D3DProxyDeviceUnreal.cpp' file, at the end of 'SetVertexShaderConstantF' there is a line:

Code: Select all

if(false && saveDebugFile)
Take out the "false &&". Then in 'D3DProxyDevice.cpp', uncomment the 'saveDebugFile' line:

Code: Select all

if(KEY_DOWN(VK_F12) && keyWaitCount <= 0)
	{
		// uncomment to save text debug file
		saveDebugFile = true;
		keyWaitCount = 200;
	}
Now you can press F12 and it will output a list of values in the matrix and some other things. Honestly it wouldn't save all the time (not sure why) maybe there was a bug in there. But if it works it may give you some idea if you even getting reasonable values.

Also, its spelled "Vireio". No capital IO.
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

Excellent, thanks.

I'd already set "saveDebugFile" as True at SetupOptions() and uncommented that line, but didn't know about the "false" part.
Still isn't saving the debug file though? Would it normally save the log into the "bin" folder where the compiled Vireio is?

Also, MSVC thinks I want to trigger a breakpoint when I press F12?
Do you run Vireio as Debug or Release, or is Debug necessary to still get the output to DebugView?

It doesn't seem to write the log whether saveDebugFile is set or not, or if F12 is pressed?
I'll have to remember how to trace variables and stuff again. Been many years.

I'll have another scan through the PJ64 source to see which matrix method it's using.
I don't think many of the PJ64 GFX plugins use shaders, but there is an option to enable shaders on some of them?
(Not sure if that does anything to the actual camera matrix stuff though?)

Thanks for your help btw. I know you're very busy. 8-)

Oh, any idea why the right-hand image seems to be drawn with a one-frame delay?
Are both sides supposed to be rendered at the same time, or would a slow graphics card cause that effect?
I only have a Radeon HD 5450 in this PC, but will try a few things with Vireio on the new 670 in a mo.
cybereality wrote:Also, its spelled "Vireio". No capital IO.
Ooops, sorry about that. I don't know where I got that from?
Must have been a brain fart. lol
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by cybereality »

The log file will be saved into the same folder as the game exe. Sometimes it just saves a blank file, so I usually press the button a few times and look at the file size in the Windows explorer to make sure its more than 0k.

Yeah, the 1 frame lag thing is just the way it works. Basically it renders every other frame into the left or right eye. So frame 1 goes to left, frame 2 goes to right, etc. If you turn v-sync off, and have a high enough framerate it's less noticeable. Doing a simultaneous render is obviously the better choice, but more technically complex.
OzOnE2k10
Sharp Eyed Eagle!
Posts: 436
Joined: Wed Jan 13, 2010 7:12 am
Location: UK

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by OzOnE2k10 »

OK, I searched the source for the Rice plugin and it has SetTransform only in D3DRender.cpp in the following two functions...
http://pastebin.com/f1upqsiW

It also uses SetVertexShaderConstantF in the RenderBase.cpp and VertexShader.cpp files, but I think only if this is set?...

if( status.isVertexShaderEnabled )
{
float c[4] = {gRSPlights[dwLight].r/255.0f, gRSPlights[dwLight].g/255.0f, gRSPlights[dwLight].b/255.0f, gRSPlights[dwLight].a/255.0f};
g_pD3DDev->SetVertexShaderConstantF( CV_LIGHT0_AMBIENT+dwLight, &c[0], 1 );
}


Does that D3DRender.cpp code snippet look it could be made to work with VireIO with camera separation, or is it not quite as simple as that?

I see in the Unreal device source where you're grabbing SetVertexShaderConstantF, then do the matrix multiplies and add the separation (based on eyeShutter).
I'm not yet sure at which point in the code the proxy intercepts the API call though?
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by cybereality »

Try to see if you can set "status.bUseHW_T_L" to true in the Rice plugin (or find how this gets set). That should use the fixed-function pipeline and thus work with mode 10 on Vireio.
Baristan6
Cross Eyed!
Posts: 111
Joined: Sat Dec 15, 2012 11:33 am

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by Baristan6 »

After looking into the roll stretching, I have found the problem in the (Adv)Skyrim mode.
If you were running in anaglyph @ 1024x768 the roll worked fine. If you switched to 1280X800 there is some stretching.
The roll matrix needs to take the aspect ratio into consideration.
After adding this to the (Adv)Skyrim mode it works fine in anaglyph, but side by side mode stretches the eye camera to match the half screen resolution. Depending on what device you are viewing it on, it will warp the roll. To fix side by side Vireio needs another user adjustable variable... Vireio is already out of F# keys.

Vireio really needs an OSD menu.

All the other D3DProxyDevice work differently, and it will take time to fix all of them.
Should have it finished before next weekend.
User avatar
cybereality
3D Angel Eyes (Moderator)
Posts: 11407
Joined: Sat Apr 12, 2008 8:18 pm

Re: Introducing Vireio Perception (3D Driver for Oculus Rift

Post by cybereality »

Thank you, Baristan6, for the time you have spent on this. I really appreciate it.
Post Reply

Return to “Development / General Discussion”