X-Wing Alliance VR mod

Here you can find help for how to best run and setup your XWA VR experience.
Post Reply

X-Wing Alliance VR mod

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 6:29 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Mon Apr 22, 2019 6:42 pm

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!

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 6:45 pm

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
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 6:47 pm

Hmmm... I seem to be having some trouble posting more than one image. Let's try again:
Screenshot (231).jpg
Screenshot (235).jpg
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 6:48 pm

Screenshot (235).jpg
You do not have the required permissions to view the files attached to this post.

User avatar
JeremyaFr
XWAU Member
Posts: 3918
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Mon Apr 22, 2019 6:49 pm

Good work :thumbs:

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 6:53 pm

Thank you JeremyaFr! This wouldn't have been possible without your work!
Screenshot (234).jpg
You do not have the required permissions to view the files attached to this post.

User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Mon Apr 22, 2019 7:17 pm

It looks great!
What do I need to play XWA in VR? What you recommend?

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 8:21 pm

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.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 22, 2019 8:33 pm

Also: this currently only works with the XWAUP 1.6 craft pack.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Tue Apr 23, 2019 11:06 am

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

User avatar
ual002
XWAU Member
Posts: 983
Joined: Wed Sep 24, 2008 2:23 am

Post by ual002 » Tue Apr 23, 2019 3:12 pm

We need to figure out how to make head tracking work without a workaround.
Image Image Image Image Image

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Apr 23, 2019 5:52 pm

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.

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

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

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 26, 2019 10:06 pm

I think I'll be able to release something soon. Maybe this weekend or so. Here are a few more screenshots:
capture-1.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 26, 2019 10:06 pm

capture-2.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 26, 2019 10:08 pm

Also, my apologies: I still don't know how to post more than one image per comment
capture-3.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 26, 2019 11:13 pm


User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Sat Apr 27, 2019 5:07 pm

It looks great!!!

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Apr 27, 2019 7:27 pm


User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Apr 28, 2019 6:35 pm


User avatar
DTM
Fleet Admiral (Administrator)
Posts: 2119
Joined: Tue Apr 22, 2003 11:01 pm
Contact:

Post by DTM » Mon Apr 29, 2019 5:02 pm

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?

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 29, 2019 6:55 pm

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).

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Apr 29, 2019 8:27 pm

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.

User avatar
blue_max
XWAU Member
Posts: 2293
Joined: Wed Mar 20, 2019 5:12 am

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

Post Reply