X-Wing Alliance VR mod

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

Re: X-Wing Alliance VR mod

Schoober
Cadet 4th Class
Posts: 13
Joined: Fri Jun 12, 2020 5:17 pm

Post by Schoober » Fri Jul 03, 2020 7:44 pm

I'm having some trouble disabling VR mode. I set it to none, and the in-game aspect ratio returns to a full 1920x1080, but the tracking is still functional and i cant mouse-look. Anything else i need to change in the config to fully disable VR mode?

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Fri Jul 03, 2020 7:49 pm

Schoober wrote:
Fri Jul 03, 2020 7:44 pm
I'm having some trouble disabling VR mode. I set it to none, and the in-game aspect ratio returns to a full 1920x1080, but the tracking is still functional and i cant mouse-look. Anything else i need to change in the config to fully disable VR mode?
You also need to disable the tracking in CockpitLook.cfg.
Last edited by m0rgg on Sat Jul 04, 2020 5:49 am, edited 1 time in total.

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

Post by blue_max » Sat Jul 04, 2020 12:36 am

m0rgg wrote:
Fri Jul 03, 2020 7:49 pm
Schoober wrote:
Fri Jul 03, 2020 7:44 pm
I'm having some trouble disabling VR mode. I set it to none, and the in-game aspect ratio returns to a full 1920x1080, but the tracking is still functional and i cant mouse-look. Anything else i need to change in the config to fully disable VR mode?
You also need to disable the tracking in Hook_CockpitLook.cfg.
Yup, you need to set "tracker_type = None" in CockpitLook.cfg. You can also use the installer to select "No Tracking" too.

KydDynoMyte
Recruit
Posts: 3
Joined: Mon May 06, 2019 4:25 pm

Post by KydDynoMyte » Sat Jul 04, 2020 5:23 am

Trevor wrote:
Fri Jul 03, 2020 11:39 am
KydDynoMyte wrote:
Fri Jul 03, 2020 6:52 am
Is there any adjustment to make the crosshair center line up on the same spot in each eye without loosing stereo?
Yes, set the HUD to 65535 in VR Params

Trev
Thank you. Just what it needed. Wonder why this is not the default. Now to figure out how to make the text on cockpit displays a little higher res so I don't have to lean in to read them.

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

Post by blue_max » Sat Jul 04, 2020 6:02 pm

KydDynoMyte wrote:
Sat Jul 04, 2020 5:23 am
Thank you. Just what it needed. Wonder why this is not the default. Now to figure out how to make the text on cockpit displays a little higher res so I don't have to lean in to read them.
Because this doesn't make any sense to me. The HUD is still rendered on top of everything else, so if you place it at infinity you'll be causing visual contention with whatever is under the reticle because the disparity of the reticle (0) is lower than the targeted object. In other words, you'll break the stereoscopy of any object you place the reticle on.

Besides, in WWII-era fighters it is my understanding that the reticle was projected on a small glass pane inside the cockpit, which is what I was trying to achieve here as well. I even checked how they did this in IL2 and they have the same problem: real pilots from the era couldn't focus on the reticle and the targeted object at the same time. The advice that I saw on the IL2 forums was to close one eye to aim.

For the text you can try different in-game resolutions to see which one works better for you. You can also enable the new text renderer by setting "Text2DRendererEnabled = 1" in DDraw.cfg and then selecting a TextFontFamily with any font installed in your system. They tend to look better in VR.

Schoober
Cadet 4th Class
Posts: 13
Joined: Fri Jun 12, 2020 5:17 pm

Post by Schoober » Sat Jul 04, 2020 7:45 pm

blue_max wrote:
Sat Jul 04, 2020 6:02 pm
KydDynoMyte wrote:
Sat Jul 04, 2020 5:23 am
Thank you. Just what it needed. Wonder why this is not the default. Now to figure out how to make the text on cockpit displays a little higher res so I don't have to lean in to read them.
Because this doesn't make any sense to me. The HUD is still rendered on top of everything else, so if you place it at infinity you'll be causing visual contention with whatever is under the reticle because the disparity of the reticle (0) is lower than the targeted object. In other words, you'll break the stereoscopy of any object you place the reticle on.

Besides, in WWII-era fighters it is my understanding that the reticle was projected on a small glass pane inside the cockpit, which is what I was trying to achieve here as well. I even checked how they did this in IL2 and they have the same problem: real pilots from the era couldn't focus on the reticle and the targeted object at the same time. The advice that I saw on the IL2 forums was to close one eye to aim.

For the text you can try different in-game resolutions to see which one works better for you. You can also enable the new text renderer by setting "Text2DRendererEnabled = 1" in DDraw.cfg and then selecting a TextFontFamily with any font installed in your system. They tend to look better in VR.
I believe you are misunderstanding how the crosshair is projected onto the glass pane. The way WW2 gunsights work is by using mirrors to reflect the reticle into the pilots eye off the pane of glass and giving the illusion that it exists at infinity, here is an animation that shows that.

https://upload.wikimedia.org/wikipedia/ ... mation.gif

You should never be focusing on the gunsight and should instead focus on your target. Assuming you aren't moving too far off the allignment behind the gunsight,, parallax shouldn't be an issue and your crosshair should simply fall overtop the enemy.

Now, a ring and bead sight doesn't exist at infinity, but also has 2 points of reference that the pilot lines up to obtain a sight picture. This is where you may need to close one eye, but with practice you should be able to operate these with both eyes open by focusing on your target and placing the ring and bead behind your dominant eye.

https://www.simhq.com/_air9/images/air_268a_004.jpg

Since XWA only has 1 reference point as the cross hair, not having this at infinity would be like trying to aim with only the "bead", or only the "ring", which would be practically impossible.

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

Post by Trevor » Sat Jul 04, 2020 10:22 pm

Shooober is right and I use this setup too (see my post some time ago where I refrence 2 styles of HUD, a hud or a hologram)
I am not saying it should change, just pointing out that the gunsight is "right" to be at infinity :)

The other reason for HUDs being "infinity" is so your eyes don't have to change focus between the text and target (though this is not relevant to VR since everything is focally infinity)

Trev

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

Post by blue_max » Sun Jul 05, 2020 8:24 am

Well, an image reflected on a piece of glass doesn't exist at infinity either. It's on that piece of glass, so I don't understand how that is supposed to give the illusion that it exists at infinity. Sorry, I'm not trying to be stubborn, just really want to understand where's the flaw in the logic.

The other reason I don't like placing the reticle at infinity is that every time I put it on top of something, it causes double vision anyway. In other words, I can see the target fine, but the reticle becomes a double image and I can't aim anyway. Neither of you experience double vision when placing the reticle at infinity? On the other hand, if I place the reticle close to the cockpit glass, I can aim fine with both eyes open and I don't even have to focus on the reticle at all. Eh, maybe I just have a weird brain.

I understand the ring and bead sight, though :)

MamiyaOtaru
Cadet 4th Class
Posts: 18
Joined: Mon Nov 04, 2019 4:17 am

Post by MamiyaOtaru » Sun Jul 05, 2020 8:44 am

blue_max wrote:
Sun Jul 05, 2020 8:24 am
Well, an image reflected on a piece of glass doesn't exist at infinity either. It's on that piece of glass, so I don't understand how that is supposed to give the illusion that it exists at infinity. Sorry, I'm not trying to be stubborn, just really want to understand where's the flaw in the logic.
It's a curved piece of glass. Like a red dot sight that you could check out in person today, it still appears over the same spot even if you are off center. IE you can move left and right (or up and down) and it still shows over the same place. IE you can look at it with either eye and it appears in the same place. IE it looks like it's in the same place to both eyes.

This gif was already shown: https://upload.wikimedia.org/wikipedia/ ... mation.gif
Leave aside the animation. http://chattypics.com/files/bothEyes_cij9eelqzf.png Both eyes see it cover the same spot (barring optical imperfections), no matter how far away that spot is***

***collimated sights / reflex sights are not truly parallax free. If you move your eye a centimeter to the right, the sight will move a centimeter to the right *on the target*. When you are talking about a spaceship off in the distance, this is not noticeable unless you are zoomed super far in to where you can make out centimeter wide details. With your eyes a few centimeters apart, the dots as seen from each individual eye will cover spots a few centimeters apart on the target, which is many meters wide, hundreds of meters away. It is not noticeable, so reflex sights are usually described as "parallax free". For the distances and zooms we are talking about in X-Wing, this is so close to true as to simply be true

Observe in https://www.youtube.com/watch?v=waeYp90OpHk#t=23s As he moves from side to side, instead of thinking of motion, think of each end of that motion representing a different eye. Dot's in the same place (relative to the target, not relative to the sight's frame)

With ring and bead, if the ring and bead are lined up in one eye they are not lined up for the other (hence the suggestion to close one eye). You have to be right on the axis. With a collimated sight you don't. You can be off center. The dot still occludes the same spot. Which also means that where the dot occludes for one eye, it also occludes for the other.

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Sun Jul 05, 2020 9:46 am

Test SteamVR performance fix

Hello,
After long discussions with blue_max (thanks for the patience!) and quite some testing, I think I have managed to improve the performance of SteamVR mode, at least with my Oculus Rift.
The issue is that it breaks roll and positional tracking, and before spending much work to fix it, I would need more testers to confirm if it only works with Oculus headsets and that it doesn't hurt others.

I have published a compiled DLL in GitHub. Just download it and replace the one in XWA directory.
https://github.com/morallo/xwa_ddraw_d3 ... /ddraw.dll

Make sure that you have:
  • VR_Mode = SteamVR in VRParams.cfg
  • tracker_type = SteamVR in CockpitLook.cfg
  • EnableVSync = 0 in DDraw.cfg
  • ProcessAffinityCore = 0 in DDraw.cfg
  • Hook_Time.dll present in your XWA folder
  • IsHookD3DEnabled = 1 in Hook_D3d.cfg

Also, you will only see a true improvement if your baseline performance (flat mode or in VR DirectSBS mode) is higher than 90fps. To test this, use VR_Mode = DirectSBS in VRParams.cfg
Once you enable SteamVR, the performance should be similar. You can check this with the frametiming app in SteamVR or the performance overlay from Oculus.

If you can't hit 90fps without SteamVR, it will go down to 45fps in any case as it's intrinsically vsynced with the HMD, and the performance improvement will not be noticeable.
For testing purposes, to get 90fps you can disable the text renderer (Text2DRendererEnabled = 0 in DDraw.cfg), and if you have a not very powerful GPU, reduce the rendering resolution/pixel density in SteamVR setting.

Feel free to send me a private message if you need some help for testing!
Last edited by m0rgg on Sun Jul 05, 2020 8:36 pm, edited 1 time in total.

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

Post by blue_max » Sun Jul 05, 2020 5:05 pm

MamiyaOtaru wrote:
Sun Jul 05, 2020 8:44 am
It's a curved piece of glass.
Ah! That's the bit that I was missing! Now it makes sense. Thanks for the explanation and videos guys. I'll put the reticle at infinity as the default going forward.
m0rgg wrote:
Sun Jul 05, 2020 9:46 am
[*]dynamic_cockpit_enabled = 0 in Dynamic_Cockpit.cfg
Why is this necessary? What happens if you enable the Dynamic Cockpit?

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Sun Jul 05, 2020 5:18 pm

m0rgg wrote:
Sun Jul 05, 2020 9:46 am
[*]dynamic_cockpit_enabled = 0 in Dynamic_Cockpit.cfg
Why is this necessary? What happens if you enable the Dynamic Cockpit?
Not strictly necessary, just to reduce the number of variables and make it more likely to hit 90fps.
I will enable it and test myself as soon as I can :-)

aaadmiral
Cadet 4th Class
Posts: 24
Joined: Fri Apr 17, 2020 8:54 pm

Post by aaadmiral » Sun Jul 05, 2020 7:18 pm

m0rgg wrote:
Sun Jul 05, 2020 9:46 am
Test SteamVR performance fix

Hello,
After long discussions with blue_max (thanks for the patience!) and quite some testing, I think I have managed to improve the performance of SteamVR mode, at least with my Oculus Rift.
The issue is that it breaks roll and positional tracking, and before spending much work to fix it, I would need more testers to confirm if it only works with Oculus headsets and that it doesn't hurt others.

I have published a compiled DLL in GitHub. Just download it and replace the one in XWA directory.
https://github.com/morallo/xwa_ddraw_d3 ... /ddraw.dll

Make sure that you have:
  • VR_Mode = SteamVR in VRParams.cfg
  • tracker_type = SteamVR in CockpitLook.cfg
  • EnableVSync = 0 in DDraw.cfg
  • ProcessAffinityCore = 0 in DDraw.cfg
  • Hook_Time.dll present in your XWA folder
  • IsHookD3DEnabled = 1 in Hook_D3d.cfg
  • dynamic_cockpit_enabled = 0 in Dynamic_Cockpit.cfg

Also, you will only see a true improvement if your baseline performance (flat mode or in VR DirectSBS mode) is higher than 90fps. To test this, use VR_Mode = DirectSBS in VRParams.cfg
Once you enable SteamVR, the performance should be similar. You can check this with the frametiming app in SteamVR or the performance overlay from Oculus.

If you can't hit 90fps without SteamVR, it will go down to 45fps in any case as it's intrinsically vsynced with the HMD, and the performance improvement will not be noticeable.
For testing purposes, to get 90fps you can disable the text renderer (Text2DRendererEnabled = 0 in DDraw.cfg), and if you have a not very powerful GPU, reduce the rendering resolution/pixel density in SteamVR setting.

Feel free to send me a private message if you need some help for testing!
do I need any other files? I still have a slightly older version of "Effects by Blue Max" installed as I was waiting for kinks to be worked out but would be willing to test this out.. do I need that 'preview' he posted that fixes the distortion/fov?
I'll look up how to check FPS in steam VR haha

aaadmiral
Cadet 4th Class
Posts: 24
Joined: Fri Apr 17, 2020 8:54 pm

Post by aaadmiral » Sun Jul 05, 2020 8:22 pm

I just tried updating to latest Blues Effects, then updated all hooks, then copied over the June 20th Preview zip files, then copied over this latest DLL for testing, then double checked all those settings.. aaaaaaand my in game view is borked. by default everything is rotated 45degrees to the right on Z(?) axis.. pressing '.' a few times fixes that but then image is cut off, only displaying bottom half.. and there's bad distortion and judder with SteamVR resolution set to 100%. going to try totally fresh install when I get a chance..

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Sun Jul 05, 2020 8:35 pm

aaadmiral wrote:
Sun Jul 05, 2020 7:18 pm
do I need any other files? I still have a slightly older version of "Effects by Blue Max" installed as I was waiting for kinks to be worked out but would be willing to test this out.. do I need that 'preview' he posted that fixes the distortion/fov?
I'll look up how to check FPS in steam VR haha
Just the DLL. It's based on the latest "MetricVR" branch from blue_max so it included all the distortion fixes.

I just tested with Dynamic Cockpit, it works ok so you don't need to disable that (unless it causes you a performance hit so that you don't reach 90fps in non-VR mode).


For checking FPS, the easiest is to use your normal tools (NVIDIA Geforce Experience overlay, fraps or others). It will only show up in the mirror window in the monitor, but for testing it should be ok, as long as you can peek through the nose gap.

If you want to see it in the headset, you can enable the debug HUD with Oculus Tray Tool
2020-07-05 22_30_45-oculus_tray_tool.png

Alternatively, you can use the Frame Timing app from SteamVR.
steamVR_frame_timing.png
You do not have the required permissions to view the files attached to this post.

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Sun Jul 05, 2020 8:38 pm

aaadmiral wrote:
Sun Jul 05, 2020 8:22 pm
I just tried updating to latest Blues Effects, then updated all hooks, then copied over the June 20th Preview zip files, then copied over this latest DLL for testing, then double checked all those settings.. aaaaaaand my in game view is borked. by default everything is rotated 45degrees to the right on Z(?) axis.. pressing '.' a few times fixes that but then image is cut off, only displaying bottom half.. and there's bad distortion and judder with SteamVR resolution set to 100%. going to try totally fresh install when I get a chance..
The bad default position happens to me from time to time too, just fix it with '.' as you said.

The other symptoms... never seen them!
What HMD are you using?

aaadmiral
Cadet 4th Class
Posts: 24
Joined: Fri Apr 17, 2020 8:54 pm

Post by aaadmiral » Sun Jul 05, 2020 9:19 pm

m0rgg wrote:
Sun Jul 05, 2020 8:38 pm
aaadmiral wrote:
Sun Jul 05, 2020 8:22 pm
I just tried updating to latest Blues Effects, then updated all hooks, then copied over the June 20th Preview zip files, then copied over this latest DLL for testing, then double checked all those settings.. aaaaaaand my in game view is borked. by default everything is rotated 45degrees to the right on Z(?) axis.. pressing '.' a few times fixes that but then image is cut off, only displaying bottom half.. and there's bad distortion and judder with SteamVR resolution set to 100%. going to try totally fresh install when I get a chance..
The bad default position happens to me from time to time too, just fix it with '.' as you said.

The other symptoms... never seen them!
What HMD are you using?
oculust rift cv1, i'm wondering if it's one of those aspect ratio conflicts i've read other users had. maybe resetting everything will fix that. should I stick to setting in game resolution to 1920x1080?

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Mon Jul 06, 2020 1:47 am

I have made some changes, and I think the performance this time is much better. Also, the tracking is not broken.

If someone can test, I would appreciate it
https://github.com/morallo/xwa_ddraw_d3 ... erf_fix_v2

Khiu
Recruit
Posts: 5
Joined: Tue Jun 11, 2019 10:22 pm

Post by Khiu » Mon Jul 06, 2020 9:25 am

Edit: ignore something else caused fps loss, sorry
Last edited by Khiu on Mon Jul 06, 2020 9:57 am, edited 1 time in total.

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Mon Jul 06, 2020 9:50 am

Khiu wrote:
Mon Jul 06, 2020 9:25 am
It didn't do anything for me (Rift S on a 3700X + 5700XT on Windows 10) unfortunately. Everything is fine when I look up, but as soon as my own ship comes into view my fps drops really low.
Thanks for looking into it.
Thanks for testing!

Do you try the latest V2?
Did you try in DirectSBS? Do you get 90fps?

I'm pretty confident that the latest test should get very close to DirectSBS performance.

If it does not in your case, I would be interested in getting an XPerf trace of execution from your computer to analyze, but it's a bit cumbersome to capture. Let me know if you are willing to try :^^:

Khiu
Recruit
Posts: 5
Joined: Tue Jun 11, 2019 10:22 pm

Post by Khiu » Mon Jul 06, 2020 9:55 am

Sorry, my performance issues were apparently all because I had active cockpits enabled. After I disabled it everything was smooth, so I didn't notice a performance difference visually (both dll's were smooth).
Did you increase the arrow size that point at your target? I like it :)

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Mon Jul 06, 2020 10:05 am

I didn't modify any visuals. Just merged Work in Progress changes that blue_max is working on for version 1.1.4.

So, your performance was already 80fps (native refresh for RiftS) with the old DLL?
All the better!
At least my DLL doesn't make it worse, it's a victory :D

Khiu
Recruit
Posts: 5
Joined: Tue Jun 11, 2019 10:22 pm

Post by Khiu » Mon Jul 06, 2020 10:13 am

Ah, ok. I was on 1.1.3.2.
Yes, it was 80 on both. I'll see if it drops below that on missions with a lot of models in it, if that happens I'll compare the dll's and let you know.

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

Post by blue_max » Mon Jul 06, 2020 4:59 pm

Khiu wrote:
Mon Jul 06, 2020 9:55 am
Did you increase the arrow size that point at your target? I like it :)
I did that, m0rgg did a refresh from my branch with a few goodies in it, like the support for wireframe CMD.

So, you had about the same performance on both my dll and m0rgg's?

User avatar
m0rgg
XWAU Member
Posts: 266
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Mon Jul 06, 2020 5:43 pm

Im not crazy :D
I just need someone that gets more than 90fps in DirectSBS but goes down to 45fps in SteamVR to test it.

Post Reply