X-Wing Alliance VR mod

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

Re: X-Wing Alliance VR mod

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

Post by Schoober » Mon Jul 06, 2020 6:28 pm

m0rgg wrote:
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
This seems to have broke everything for me, the aspect ratio is screwed and the tracking is all busted.

m0rgg
Cadet 3rd Class
Posts: 41
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Mon Jul 06, 2020 6:45 pm

Schoober wrote:
Mon Jul 06, 2020 6:28 pm
m0rgg wrote:
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
This seems to have broke everything for me, the aspect ratio is screwed and the tracking is all busted.
Thanks for testing!
What was your previous version and what is your HMD?

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

Post by Schoober » Mon Jul 06, 2020 7:25 pm

m0rgg wrote:
Mon Jul 06, 2020 6:45 pm
Schoober wrote:
Mon Jul 06, 2020 6:28 pm
m0rgg wrote:
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
This seems to have broke everything for me, the aspect ratio is screwed and the tracking is all busted.
Thanks for testing!
What was your previous version and what is your HMD?
XWAUCP 1.6, Effects by Blue Max's Version 1.1.3.2, Jun 20th version of VR files, HTC vive.

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

Post by aaadmiral » Mon Jul 06, 2020 9:17 pm

ok so I uninstalled everything, deleted directory, reinstalled base game, xwaucp 1.6 with desktop resolution set to 1920x1080, updated hooks, and blue's effects 1.1.3.2, replace ddraw with this new 'fix v2', checked cfgs..

I still have the problem where it's not rendering the top half of the screen, however with this new v2 fix it DOES render the hud elements up there.. and the game isn't rotated 45degrees anymore so I can confirm the head tracking is fixed.

I tried to take a picture of the desktop screen that shows the black void problem i'm having:
xwavr.png
anyway.. HUD placement seems broken as it's not attached to the cockpit? tried enabling and disabling dynamic cockpit but didn't make a difference:
xwavr2.jpg
and I used these settings when installing blue's effects:
xwavr3.JPG
haven't actually checked performance but it feels really bad for me.. but currently have SteamVR set to 100% scale too

my specs:
4790k, gtx 1080ti, 16gb ram, windows 10 pro, oculus rift cv1
You do not have the required permissions to view the files attached to this post.

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

Post by blue_max » Mon Jul 06, 2020 10:25 pm

aaadmiral wrote:
Mon Jul 06, 2020 9:17 pm
I still have the problem where it's not rendering the top half of the screen,
I suspect this is a bug in the 3D reconstruction code and not m0rgg's fault. The next time this happens you can try doing Ctrl+Alt+Shift + Right Arrow followed by Ctrl+Alt+Shift + Left Arrow. This will change the FOV and force a recalculation of the reconstruction parameters.

Do you have a consistent repro for this?

EDIT: I usually run with the SteamVR resolution set at 50% to improve performance.

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

Post by aaadmiral » Tue Jul 07, 2020 4:55 am

blue_max wrote:
Mon Jul 06, 2020 10:25 pm
aaadmiral wrote:
Mon Jul 06, 2020 9:17 pm
I still have the problem where it's not rendering the top half of the screen,
I suspect this is a bug in the 3D reconstruction code and not m0rgg's fault. The next time this happens you can try doing Ctrl+Alt+Shift + Right Arrow followed by Ctrl+Alt+Shift + Left Arrow. This will change the FOV and force a recalculation of the reconstruction parameters.

Do you have a consistent repro for this?

EDIT: I usually run with the SteamVR resolution set at 50% to improve performance.
you are correct, I did the ctrl+alt+shift+right/left arrow and it fixed that, however everything became very.. jittery. like no matter how still I was everything was vibrating.
I switched back to your 'june 20th preview' dll and cfgs and didn't have any of these issues. I lowered the SteamVR scaling to 50% and the performance felt pretty ok, but I couldn't read any of the text and also the hud windows were very stretched out. and also noticed the aiming reticle seemed to grow/shrink as I moved my head around.

I tried to see if I could get screenshots of this but it doesn't happen on the desktop screen.. maybe can try enabling 'show vr mode' on desktop and try again...
but I tried enabling the 'show performance graph' option and nothing appeared in game for some reason.

testing those makes me queezy for a bit so I can't do it very rapidly haha..

m0rgg
Cadet 3rd Class
Posts: 41
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Tue Jul 07, 2020 11:06 am

It's not easy to get performance info in the headset from SteamVR.
I recommend you to use the Performance HUD from Oculus, either through their debug tool or with Oculus Tray Tool.
You will be able to see the FPS and also the frame rendering time and performance headroom, which can show the improvement of my version even if you already had 90fps before.

The dizziness may come from lack of performance and tracking latency or innacuracy. Be careful not to force yourself!
I'm sure we'll solve it eventually.

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

Post by Schoober » Tue Jul 07, 2020 5:44 pm

I've actually been noticing severe performance tanking even without VR. Seems my CPU is maxing out (this is both with and without craft pack and with processaffinitycore=0)

with an i7 9700k, is this normal/to be expected?

m0rgg
Cadet 3rd Class
Posts: 41
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Tue Jul 07, 2020 7:58 pm

Do you have the same issue with JeremyaFr's DLL?
Do you have the same issue with blue_max DLL in non-VR?
And with VR in DirectSBS ?
With those tests you can get an idea of the cause of your issues.

I have an i5 6700K and can reach 90fps, except when there is a lot of poligons in display.
The render engine in the exe still calculates all the 3D->2D projection before calling ddraw.dll.

The only fix there could be for that is a hook to intercept the CPU graphic functions in the exe, capture the geometry/texture data and return. Then render with that data in ddraw.dll using the GPU, but without all the 2D->3D reconstruction that blue_max implemented for VR an shading effects.
But I'm not sure anyone knows how that part works. Only JeremyaFr and maybe justagai can tell if it's feasible or plain stupid.

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

Post by aaadmiral » Tue Jul 07, 2020 8:46 pm

m0rgg wrote:
Tue Jul 07, 2020 11:06 am
It's not easy to get performance info in the headset from SteamVR.
I recommend you to use the Performance HUD from Oculus, either through their debug tool or with Oculus Tray Tool.
You will be able to see the FPS and also the frame rendering time and performance headroom, which can show the improvement of my version even if you already had 90fps before.

The dizziness may come from lack of performance and tracking latency or innacuracy. Be careful not to force yourself!
I'm sure we'll solve it eventually.
ok I got OTT going and enabled the performance overlay!

with the "june 20th preview" I got 45fps usually, 90 if I looked up but once I looked around in cockpit or at other ships etc it would drop down to 45fps.. occasionally back up theo 90fps.
with the "performance fix v2" the fps IS higher, stays at 90 more often, but does dip down to 45 when I look over at another ship, however stays at 90 when looking around cockpit. I do still need to keep doing the CTRL+ALT+SHIFT+right arrow/left arrow to fix the black at top problem, at there are other hud glitches like the crosshair is very small and squished now..

this is all at 50% steamVR resolution as well

m0rgg
Cadet 3rd Class
Posts: 41
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Tue Jul 07, 2020 9:31 pm

aaadmiral wrote:
Tue Jul 07, 2020 8:46 pm
with the "june 20th preview" I got 45fps usually, 90 if I looked up but once I looked around in cockpit or at other ships etc it would drop down to 45fps.. occasionally back up theo 90fps.
with the "performance fix v2" the fps IS higher, stays at 90 more often, but does dip down to 45 when I look over at another ship, however stays at 90 when looking around cockpit. I do still need to keep doing the CTRL+ALT+SHIFT+right arrow/left arrow to fix the black at top problem, at there are other hud glitches like the crosshair is very small and squished now..
Great news! Thanks again for testing.
I'm afraid the performance when displaying a lot of polygons is limited by CPU, and there's not much that can be done in ddraw.dll about it. If the CPU takes more than 11.1ms to render a frame (including the geometry), it will go down to 45fps.

At least now SteamVR is not intruducing an unnecessary performance hit (pending confirmation from other people with different HMDs like HTC Vive, Valve Index, Pimax, WMR...).
The performance optimization can focus now somewhere else. For example, the new TextRenderer is taking a lot of CPU time. Try disabling it in ddraw.cfg and check the performance again.

Also, even though I asked you to disable ASW in OTT for testing, if you enable it (even in forced mode), you can get a better perception of performance thanks to a more smooth headtracking, even if the world will be stuck to 45fps updates.

I'm now trying to improve the tracking latency, but it's not easy without having full control of the rendering pipeline.
this is all at 50% steamVR resolution as well
With a 1080ti you shouldn't be limited by GPU. You can crank up the resolution to 150%, I predict you will not have a lot of impact.

One last thing I realized yesterday and not sure everyone has configured right, even though it has been mentioned in the thread by vbodo78.
In SteamVR the positional tracking is not 1:1 between real and virtual world, when using the default values that come in the CockpitLook.cfg.
A factor of 2 needs to be applied:

CockpitLook.cfg

Code: Select all

positional_x_multiplier = 2.0
positional_y_multiplier = 2.0
positional_z_multiplier = 2.0

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

Post by blue_max » Tue Jul 07, 2020 11:10 pm

I've got a fix for the horizontal black bar bug and a fix for the reticle looking squished when looking to the sides. I'll publish it soon, and then I'll apply it to m0rgg's version too.

BTW, if we can confirm that m0rgg's version is stable with a few more users, then I'll merge his work on my branch and make it part of the official release.

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

Post by aaadmiral » Wed Jul 08, 2020 12:56 am

m0rgg wrote:
Tue Jul 07, 2020 9:31 pm
Also, even though I asked you to disable ASW in OTT for testing, if you enable it (even in forced mode), you can get a better perception of performance thanks to a more smooth headtracking, even if the world will be stuck to 45fps updates.

One last thing I realized yesterday and not sure everyone has configured right, even though it has been mentioned in the thread by vbodo78.
In SteamVR the positional tracking is not 1:1 between real and virtual world, when using the default values that come in the CockpitLook.cfg.
A factor of 2 needs to be applied:

CockpitLook.cfg

Code: Select all

positional_x_multiplier = 2.0
positional_y_multiplier = 2.0
positional_z_multiplier = 2.0
ah I missed that, I just applied those positional numbers to cockpitlook.cfg and it seems a bit smoother now.

I tried switching the ASW between OFF/AUTO/45 and I would say that OFF feels a bit better just because it's not constantly going back and forth between on/off/on/off, AUTO it does that so you get wavy artifacts. with OFF those artifacts are more like tearing. 45 is well.. 45.

m0rgg
Cadet 3rd Class
Posts: 41
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Wed Jul 08, 2020 6:02 am

aaadmiral wrote:
Wed Jul 08, 2020 12:56 am
CockpitLook.cfg

Code: Select all

positional_x_multiplier = 2.0
positional_y_multiplier = 2.0
positional_z_multiplier = 2.0
ah I missed that, I just applied those positional numbers to cockpitlook.cfg and it seems a bit smoother now.
That shouldn't have any impact on performance, just less dizziness. :^^:
Placebo effect?
I tried switching the ASW between OFF/AUTO/45 and I would say that OFF feels a bit better just because it's not constantly going back and forth between on/off/on/off, AUTO it does that so you get wavy artifacts. with OFF those artifacts are more like tearing. 45 is well.. 45.
Yes, it's 45 for the world updates, but 90 for the headtracking. Sometimes it feels better than constant activation and deactivation.
I haven't tested myself yet but I hope it can be made better with some pose prediction adjustments.

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

Post by blue_max » Wed Jul 08, 2020 6:26 pm

I just published a preview of release 1.1.4 here:

viewtopic.php?f=9&p=171542#p171542

This preview is fixes the black bars reported above and the reticle distortion that happens when looking to the sides. It should also be almost "plug-and-play" for VR devices: the FOV is auto-configured (remove Focal_Length.cfg first, if you have one), and it has several other fixes.

However, it does not have the performance fixes by m0rgg, partly to provide a baseline comparison and partly because we're still testing the fixes that m0rgg is implementing to make sure they're stable. If you guys would like to try this preview and compare the performance against m0rgg's version, that would be great.

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

Post by Schoober » Wed Jul 08, 2020 8:32 pm

aaadmiral wrote:
Wed Jul 08, 2020 12:56 am
m0rgg wrote:
Tue Jul 07, 2020 9:31 pm
Also, even though I asked you to disable ASW in OTT for testing, if you enable it (even in forced mode), you can get a better perception of performance thanks to a more smooth headtracking, even if the world will be stuck to 45fps updates.

One last thing I realized yesterday and not sure everyone has configured right, even though it has been mentioned in the thread by vbodo78.
In SteamVR the positional tracking is not 1:1 between real and virtual world, when using the default values that come in the CockpitLook.cfg.
A factor of 2 needs to be applied:

CockpitLook.cfg

Code: Select all

positional_x_multiplier = 2.0
positional_y_multiplier = 2.0
positional_z_multiplier = 2.0
ah I missed that, I just applied those positional numbers to cockpitlook.cfg and it seems a bit smoother now.

I tried switching the ASW between OFF/AUTO/45 and I would say that OFF feels a bit better just because it's not constantly going back and forth between on/off/on/off, AUTO it does that so you get wavy artifacts. with OFF those artifacts are more like tearing. 45 is well.. 45.
I tried this out. i feel like 2.0 might be just a hair too much. It's better for sure but prehaps 1.8 would feel a bit better?
i don't know, the tracking just seems slightly too fast but maybe that's just me.

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

Post by Schoober » Wed Jul 08, 2020 8:32 pm

aaadmiral wrote:
Wed Jul 08, 2020 12:56 am
m0rgg wrote:
Tue Jul 07, 2020 9:31 pm
Also, even though I asked you to disable ASW in OTT for testing, if you enable it (even in forced mode), you can get a better perception of performance thanks to a more smooth headtracking, even if the world will be stuck to 45fps updates.

One last thing I realized yesterday and not sure everyone has configured right, even though it has been mentioned in the thread by vbodo78.
In SteamVR the positional tracking is not 1:1 between real and virtual world, when using the default values that come in the CockpitLook.cfg.
A factor of 2 needs to be applied:

CockpitLook.cfg

Code: Select all

positional_x_multiplier = 2.0
positional_y_multiplier = 2.0
positional_z_multiplier = 2.0
ah I missed that, I just applied those positional numbers to cockpitlook.cfg and it seems a bit smoother now.

I tried switching the ASW between OFF/AUTO/45 and I would say that OFF feels a bit better just because it's not constantly going back and forth between on/off/on/off, AUTO it does that so you get wavy artifacts. with OFF those artifacts are more like tearing. 45 is well.. 45.
I tried this out. i feel like 2.0 might be just a hair too much. It's better for sure but prehaps 1.8 would feel a bit better?
i don't know, the tracking just seems slightly too fast but maybe that's just me.

m0rgg
Cadet 3rd Class
Posts: 41
Joined: Wed Apr 01, 2020 10:33 pm

Post by m0rgg » Wed Jul 08, 2020 8:39 pm

Schoober wrote:
Wed Jul 08, 2020 8:32 pm
I tried this out. i feel like 2.0 might be just a hair too much. It's better for sure but prehaps 1.8 would feel a bit better?
i don't know, the tracking just seems slightly too fast but maybe that's just me.
I didn't test thoroughly. You can test it by peeking through your nose gap while you move forward and backwards, check if the image in the HMD seems to stay in the same place in real world.

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

Post by aaadmiral » Wed Jul 08, 2020 9:04 pm

blue_max wrote:
Wed Jul 08, 2020 6:26 pm
I just published a preview of release 1.1.4 here:

viewtopic.php?f=9&p=171542#p171542

This preview is fixes the black bars reported above and the reticle distortion that happens when looking to the sides. It should also be almost "plug-and-play" for VR devices: the FOV is auto-configured (remove Focal_Length.cfg first, if you have one), and it has several other fixes.

However, it does not have the performance fixes by m0rgg, partly to provide a baseline comparison and partly because we're still testing the fixes that m0rgg is implementing to make sure they're stable. If you guys would like to try this preview and compare the performance against m0rgg's version, that would be great.
I just tried this (and removed the focal_length.cfg file)

for some reason now I don't get any of the game displayed in the headset. I only see the 'empty' steamvr environment.
however the on-screen cockpit does move if I rotated the headset in my hands, so the headtracking is working, and I hear audio in the headsets as well.

also noticed that the on-screen display is not warped in anyway like it normally was.

edit: I noticed that the VRParams.cfg has "VR_mode=None" set, I changed that to SteamVR and it works again.
however it took a LONG time to load-up, and the on-screen display is very lagy.. not big deal once you have headset on.

I noticed the aiming reticle is squished vertically, but doesn't seem to grow/shrink in size when you look around anymore. tried to take pic of the squish here:
xwavr4.jpg
edit2: oh you asked about performance too haha. it seems a bit worse than m0rgg's, performance metric from OTT shows it starting off very low then slowly goes up to 90.. if I look around it goes down then eventually stabilizes. m0rgg's stays higher, earlier.
You do not have the required permissions to view the files attached to this post.

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

Post by blue_max » Wed Jul 08, 2020 11:40 pm

Thanks for testing the preview, aaadmiral. I'm sorry, but I don't see any aiming reticle in the picture you posted above. Would you mind telling me what in-game resolution, SteamVR resolution and desktop resolution you were using, so that I can try a repro on my end?

To run the game in SteamVR mode, it's better if you start SteamVR first and then the game. Otherwise the game will try to load SteamVR and it tends to be a bit slower.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 577
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Jul 09, 2020 3:15 am

blue_max, the reticle is there, near the center of the tunnel. It's _very_ squashed.

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

Post by blue_max » Thu Jul 09, 2020 3:25 am

Oh, that's right -- super squashed. Thanks keiran.

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

Post by aaadmiral » Thu Jul 09, 2020 4:21 am

blue_max wrote:
Wed Jul 08, 2020 11:40 pm
Thanks for testing the preview, aaadmiral. I'm sorry, but I don't see any aiming reticle in the picture you posted above. Would you mind telling me what in-game resolution, SteamVR resolution and desktop resolution you were using, so that I can try a repro on my end?

To run the game in SteamVR mode, it's better if you start SteamVR first and then the game. Otherwise the game will try to load SteamVR and it tends to be a bit slower.
ah yes I just did it that way, launched steamvr manually then the game and it loaded immediately this time.

my resolutions are:

-in game resolution set to 1920x1080 via the XWAUCP installer
-SteamVR set to 50%, I actually tried with it at 'auto' as well but didn't notice an immediate difference
-windows/desktop set to 1920x1080

I guess I should confirm I no longer have to do the ctrl+alt+shift+right/left arrow thing by the way!

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

Post by blue_max » Thu Jul 09, 2020 4:58 am

aaadmiral wrote:
Thu Jul 09, 2020 4:21 am
-in game resolution set to 1920x1080 via the XWAUCP installer
-SteamVR set to 50%, I actually tried with it at 'auto' as well but didn't notice an immediate difference
-windows/desktop set to 1920x1080
Thanks for the information. Would you know what's the per-eye resolution of your headset? Or, alternatively, what headset are you using? Can you check what do you have in PreserveAspectRatio in your DDraw.cfg too?
I guess I should confirm I no longer have to do the ctrl+alt+shift+right/left arrow thing by the way!
Thanks! I was just thinking that maybe the squished reticle may be fixed if you press the period key twice -- the same key used to re-center the screen. Is the squished reticle happening all the time?

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

Post by aaadmiral » Thu Jul 09, 2020 5:30 am

blue_max wrote:
Thu Jul 09, 2020 4:58 am
Thanks for the information. Would you know what's the per-eye resolution of your headset? Or, alternatively, what headset are you using? Can you check what do you have in PreserveAspectRatio in your DDraw.cfg too?
-according to steam VR 100% is 1344x1600 per eye, 50% is 948x1128 - I quickly checked online and that seems to be correct for oculus rift cv1
-PreserveAspectRatio = 1
Thanks! I was just thinking that maybe the squished reticle may be fixed if you press the period key twice -- the same key used to re-center the screen. Is the squished reticle happening all the time?
I actually press that every time basically, I start the game holding the headset to get through the menus and launch ship, then once I'm in I put headset on but i'm never in correct position at this point so I press . a few times til I'm back in the spot

Post Reply