X-Wing Alliance VR mod
X-Wing Alliance VR mod
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Ever since I played Star Wars Battlefront's X-Wing VR mission, I've wanted more; but it was only about a month ago that I decided that if I wanted more, I was going to have to do it myself.
So, for the past month I've been working on tweaking JeremyaFr's ddraw DLL for DirectX11 to enable stereoscopic viewing (with his permission), and this is a sample of what it looks like so far:
I'm also using the Polynomial Barrel Distortion effect by BlueSkyDefender (with his permission, link to the original version: https://github.com/BlueSkyDefender/Dept ... or_HMDs.fx)
The VR mod is not perfect; but with a few minor hacks (I'm using TrinusPSVR) it's playable (at least in the Quick Skirmish option, which is where I've been testing this). At this point, I'm kind of close to reaching "good enough for me"; but I'm just wondering if anyone else would be interested in this mod.
Also: many thanks to everyone who has worked on upgrading the models. It was really nice to see the cockpits really "pop out" in VR. Special thanks to JeremyaFr for upgrading XWA into DirectX 11 and to BlueSkyDefender for letting me use his barrel distortion effect.
So, for the past month I've been working on tweaking JeremyaFr's ddraw DLL for DirectX11 to enable stereoscopic viewing (with his permission), and this is a sample of what it looks like so far:
I'm also using the Polynomial Barrel Distortion effect by BlueSkyDefender (with his permission, link to the original version: https://github.com/BlueSkyDefender/Dept ... or_HMDs.fx)
The VR mod is not perfect; but with a few minor hacks (I'm using TrinusPSVR) it's playable (at least in the Quick Skirmish option, which is where I've been testing this). At this point, I'm kind of close to reaching "good enough for me"; but I'm just wondering if anyone else would be interested in this mod.
Also: many thanks to everyone who has worked on upgrading the models. It was really nice to see the cockpits really "pop out" in VR. Special thanks to JeremyaFr for upgrading XWA into DirectX 11 and to BlueSkyDefender for letting me use his barrel distortion effect.
You do not have the required permissions to view the files attached to this post.
- DTM
- Posts: 2118
- Joined: Tue Apr 22, 2003 11:01 pm
- Contact:
XWA would be on of the best game to be played in VR, because of its balance between arcade and simulator...with few programmed buttons on your joystick, you never need to look at your keyboard.
Unfortunatly the game is not friendly with the free view option: using Track-IR was a pity!
I hope you will succed with VR! It would be great to see a video of your progress!
Unfortunatly the game is not friendly with the free view option: using Track-IR was a pity!
I hope you will succed with VR! It would be great to see a video of your progress!
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
I'm not sure I fully understood your comment, DTM. I'm currently using my PSVR with TrinusPSVR and I activate the mouse-look function on my joystick. After that, I can pretty much look around without problems and even play dogfights successfully. The mouse sensitivity has to be adjusted in Windows, and there are a few occasional glitches; but it's otherwise pretty playable. I'll post a video later. In the meantime, here are a few more screenshots:
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Hmmm... I seem to be having some trouble posting more than one image. Let's try again:
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Thank you JeremyaFr! This wouldn't have been possible without your work!
You do not have the required permissions to view the files attached to this post.
- DTM
- Posts: 2118
- Joined: Tue Apr 22, 2003 11:01 pm
- Contact:
It looks great!
What do I need to play XWA in VR? What you recommend?
What do I need to play XWA in VR? What you recommend?
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Well, apart from the tweaked version of ddraw.dll that I'm working on, you would need some VR viewer or Head Mounted Display and a way to translate motion from the HMD into mouse. I'm currently using the PSVR and TrinusPSVR to track the headset and translate that into mouse input for the game. If I understand correctly (and I may be wrong), Trinus also has a solution that works with a smartphone and Google Cardboard (BTW, I'm in no way affiliated with Trinus and I believe there are other solutions out there that do the same thing).
I'm not sure how other HMDs would work, though; but I assume there's got to be a way to translate, say, Occulus Rift motion into mouse motion. But since I only own the PSVR, I can't test that.
I guess the key here is that whatever HMD you use, if you can translate HMD motion into mouse motion, then you should be able to use this mod as well.
I'm not sure how other HMDs would work, though; but I assume there's got to be a way to translate, say, Occulus Rift motion into mouse motion. But since I only own the PSVR, I can't test that.
I guess the key here is that whatever HMD you use, if you can translate HMD motion into mouse motion, then you should be able to use this mod as well.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Also: this currently only works with the XWAUP 1.6 craft pack.
- Trevor
- Posts: 539
- Joined: Thu Dec 04, 2014 7:11 pm
wow, now we have true 3d (I notice the BG was at least offset between left and right eyes with the cockpit occluding a star in one eye and not the other)
There has been a VR video posted before, but it was essentially a flat screen that bent round you.
The mouse tracking can be done by commercial products but they also do the wrapping so what we need now is only mouse tracking.
couldn't find anything except the api on my quick search...
Trev
There has been a VR video posted before, but it was essentially a flat screen that bent round you.
The mouse tracking can be done by commercial products but they also do the wrapping so what we need now is only mouse tracking.
couldn't find anything except the api on my quick search...
Trev
- ual002
- Posts: 982
- Joined: Wed Sep 24, 2008 2:23 am
We need to figure out how to make head tracking work without a workaround.





- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Yes, this is true 3D. I'm back-projecting the vertex data back into 3D space and then re-projecting back into two virtual cameras. If you guys have a Google Cardboard (or similar) you should be able to see the images. Some people can see stereoscopy by crossing their eyes too; but I don't recommend that.
The approach I'm using has its limits, though. One of them is that, apparently, the cockpit scale is different from all the other objects, so I had to do some hacking to have stereoscopy for both the cockpit *and* the things "out there"; but it works (with some minor glitches). Maybe this can be fixed later by making cockpit models with consistent scale (or maybe I'm wrong and something else is going on here).
As a future enhancement, I was thinking of directly interfacing with the API that does the tracking and then convert that into mouse motion; but that'll have to wait since I would like to release a stable mod first. If people would like to post links to APIs or tracking tools that would be awesome too.
The approach I'm using has its limits, though. One of them is that, apparently, the cockpit scale is different from all the other objects, so I had to do some hacking to have stereoscopy for both the cockpit *and* the things "out there"; but it works (with some minor glitches). Maybe this can be fixed later by making cockpit models with consistent scale (or maybe I'm wrong and something else is going on here).
As a future enhancement, I was thinking of directly interfacing with the API that does the tracking and then convert that into mouse motion; but that'll have to wait since I would like to release a stable mod first. If people would like to post links to APIs or tracking tools that would be awesome too.
- Trevor
- Posts: 539
- Joined: Thu Dec 04, 2014 7:11 pm
well, I have the oculus DK2 but unfortunately the desktop viewing app I have stretches the desktop, so the image was a bit distorted...
I would love to test the beta you have though, even if it is locked forward for now.
Trev
I would love to test the beta you have though, even if it is locked forward for now.
Trev
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
I think I'll be able to release something soon. Maybe this weekend or so. Here are a few more screenshots:
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
You do not have the required permissions to view the files attached to this post.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
Also, my apologies: I still don't know how to post more than one image per comment
You do not have the required permissions to view the files attached to this post.
- DTM
- Posts: 2118
- Joined: Tue Apr 22, 2003 11:01 pm
- Contact:
This video would be a good reason to buy vr glasses!
But I have an important question: using the Track IR system while playing with XWA, you have to manually center the view about every 20 seconds, because the head movement goes out of sync with the game.
This problem is so frustrating that I immediately stopped using it. In the dogfight Track IR is unusable. Is there the same problem with VR?
But I have an important question: using the Track IR system while playing with XWA, you have to manually center the view about every 20 seconds, because the head movement goes out of sync with the game.
This problem is so frustrating that I immediately stopped using it. In the dogfight Track IR is unusable. Is there the same problem with VR?
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
There are a few times when you absolutely need to do re-centering: when you're killed, or when you first spawn, for instance; but it's otherwise very playable. Yesterday I played for about 20mins straight and I while did have to do the occasional re-centering, it didn't get in the way. I guess I should post an unedited dogfight so that you can see how many times I have to re-center to keep this answer honest. I haven't noticed much drift with the PSVR and Trinus; but wouldn't know about other solutions. Have you ever tried OpenTrack?
BTW, I do re-centering by looking straight ahead and pressing the dot key twice (which I have mapped to one of my joystick buttons). So it's pretty easy to re-center (and it's pretty easy to spot it in a video too).
BTW, I do re-centering by looking straight ahead and pressing the dot key twice (which I have mapped to one of my joystick buttons). So it's pretty easy to re-center (and it's pretty easy to spot it in a video too).
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
It looks like it should be possible to use other VR HMDs:
https://www.twitch.tv/videos/41929711
Does anyone know that guy? It would be interesting to ask him how he did it.
https://www.twitch.tv/videos/41929711
Does anyone know that guy? It would be interesting to ask him how he did it.
- blue_max
- Posts: 2285
- Joined: Wed Mar 20, 2019 5:12 am
OK, here's the first public release of this mod:
https://www.dropbox.com/s/sze3h16du6kbm ... 0.zip?dl=0
Be warned, I consider this a BETA version. It has some known artifacts and the setup may be a little tricky; but it's playable. I'll post more details later.
https://www.dropbox.com/s/sze3h16du6kbm ... 0.zip?dl=0
Be warned, I consider this a BETA version. It has some known artifacts and the setup may be a little tricky; but it's playable. I'll post more details later.