Page 1 of 19

X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:29 pm
by blue_max
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:
Screenshot (227).jpg
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)
Screenshot (228).jpg
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.

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:42 pm
by DTM
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!

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:45 pm
by blue_max
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:
Screenshot (228).jpg
Screenshot (231).jpg
Screenshot (232).jpg

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:47 pm
by blue_max
Hmmm... I seem to be having some trouble posting more than one image. Let's try again:
Screenshot (231).jpg
Screenshot (235).jpg

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:48 pm
by blue_max
Screenshot (235).jpg

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:49 pm
by JeremyaFr
Good work :thumbs:

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 6:53 pm
by blue_max
Thank you JeremyaFr! This wouldn't have been possible without your work!
Screenshot (234).jpg

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 7:17 pm
by DTM
It looks great!
What do I need to play XWA in VR? What you recommend?

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 8:21 pm
by blue_max
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.

Re: X-Wing Alliance VR mod

Posted: Mon Apr 22, 2019 8:33 pm
by blue_max
Also: this currently only works with the XWAUP 1.6 craft pack.

Re: X-Wing Alliance VR mod

Posted: Tue Apr 23, 2019 11:06 am
by Trevor
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

Re: X-Wing Alliance VR mod

Posted: Tue Apr 23, 2019 3:12 pm
by ual002
We need to figure out how to make head tracking work without a workaround.

Re: X-Wing Alliance VR mod

Posted: Tue Apr 23, 2019 5:52 pm
by blue_max
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.

Re: X-Wing Alliance VR mod

Posted: Tue Apr 23, 2019 8:07 pm
by Trevor
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

Re: X-Wing Alliance VR mod

Posted: Fri Apr 26, 2019 10:06 pm
by blue_max
I think I'll be able to release something soon. Maybe this weekend or so. Here are a few more screenshots:
capture-1.jpg

Re: X-Wing Alliance VR mod

Posted: Fri Apr 26, 2019 10:06 pm
by blue_max
capture-2.jpg

Re: X-Wing Alliance VR mod

Posted: Fri Apr 26, 2019 10:08 pm
by blue_max
Also, my apologies: I still don't know how to post more than one image per comment
capture-3.jpg

Re: X-Wing Alliance VR mod

Posted: Fri Apr 26, 2019 11:13 pm
by blue_max

Re: X-Wing Alliance VR mod

Posted: Sat Apr 27, 2019 5:07 pm
by DTM
It looks great!!!

Re: X-Wing Alliance VR mod

Posted: Sat Apr 27, 2019 7:27 pm
by blue_max

Re: X-Wing Alliance VR mod

Posted: Sun Apr 28, 2019 6:35 pm
by blue_max

Re: X-Wing Alliance VR mod

Posted: Mon Apr 29, 2019 5:02 pm
by DTM
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?

Re: X-Wing Alliance VR mod

Posted: Mon Apr 29, 2019 6:55 pm
by blue_max
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).

Re: X-Wing Alliance VR mod

Posted: Mon Apr 29, 2019 8:27 pm
by blue_max
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.

Re: X-Wing Alliance VR mod

Posted: Wed May 01, 2019 6:13 am
by blue_max
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.