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

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Wed May 06, 2020 3:11 pm

CaptainKoloth wrote:
Wed May 06, 2020 2:21 pm
I should add that its not just low framerate per se. If I reduce resolution all the way down to 640x480 (or whatever thats getting mapped to for the Oculus aspect ratio) the starfield and so forth responds smoothly when I look around, but the cockpit, other ships, and strangely, images of nebulae on the background jump around wildly.

I've tried to add a video of what it looks like here:
https://youtu.be/43m9WgaVHS0
That's something of a kludge as I'm trying to record it on my screen as I move the Rift around by hand, but it sort of gets the idea across. The effect actually looks worse than this in the headset itself- those jumps look to my eye like they happen more frequently in the actual Rift than in this screen view.
Hi

I'm having the exact same problem here. With Version 1.1.2 it's much better, but still almost unplayable.
I've tried lots of different settings and resolutions, but the result is always the same.

System:
i7 4770
GTX 1070
Oculus Rift S

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

Post by blue_max » Wed May 06, 2020 5:30 pm

That looks like either a bug, or two copies of the CockpitLook hook racing with each other to refresh the camera's position. I'm going to see if I can reproduce that issue on my end.

There's some stuttering to be expected when the screen is too busy with objects; but in the video above, that's not the case.

You guys might want to try toggling the "SteamVR_Interleaved_Reprojection" setting in VRParams.cfg too. I also need to check if SteamVR added some new feature like pose prediction or something like that.

CaptainKoloth
Cadet 4th Class
Posts: 11
Joined: Tue Mar 31, 2020 3:11 pm

Post by CaptainKoloth » Wed May 06, 2020 5:35 pm

blue_max wrote:
Wed May 06, 2020 5:30 pm
That looks like either a bug, or two copies of the CockpitLook hook racing with each other to refresh the camera's position. I'm going to see if I can reproduce that issue on my end.

There's some stuttering to be expected when the screen is too busy with objects; but in the video above, that's not the case.

You guys might want to try toggling the "SteamVR_Interleaved_Reprojection" setting in VRParams.cfg too. I also need to check if SteamVR added some new feature like pose prediction or something like that.
Thanks!

I did try SteamVR_Interleaved_Reprojection, but didn't notice any change.

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

Post by blue_max » Wed May 06, 2020 6:14 pm

Can you guys try toggling "fixed_GUI" or just setting "fixed_GUI = 0" in VRParams.cfg as well? It will change how the HUD behaves -- I'm just trying to figure out if it's somehow related to that.

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Wed May 06, 2020 6:24 pm

blue_max wrote:
Wed May 06, 2020 6:14 pm
Can you guys try toggling "fixed_GUI" or just setting "fixed_GUI = 0" in VRParams.cfg as well? It will change how the HUD behaves -- I'm just trying to figure out if it's somehow related to that.
No, doesn't change anything. Even if I disable the HUD in-game.

I just did a completely fresh install with only XWA+XWAUCP+Effects 1.1.3 with SteamVR enabled.
Everything else is on default, and no change to any config-file -> problem still there.

And just for curiosity I disabled the HookCockpitLook.dll, but the problem is still there.

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Wed May 06, 2020 6:42 pm

Also interresting: The first about 30 in-game everything is totally fine, and then suddenly the flickering and jumping gets really bad.

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

Post by blue_max » Wed May 06, 2020 7:01 pm

pimpe wrote:
Wed May 06, 2020 6:24 pm
And just for curiosity I disabled the HookCockpitLook.dll, but the problem is still there.
The cockpit look hook implements the camera motion. If you really disabled it, then it shouldn't move *at all* (well, the camera will still roll; but you shouldn't be able to look around). So you either didn't disable it completely, or you have multiple copies of this hook, or there's a very big bug in the code that I have failed to notice for months. Still, its a good idea to try that on my end to see what happens.

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Wed May 06, 2020 7:15 pm

blue_max wrote:
Wed May 06, 2020 7:01 pm
pimpe wrote:
Wed May 06, 2020 6:24 pm
And just for curiosity I disabled the HookCockpitLook.dll, but the problem is still there.
The cockpit look hook implements the camera motion. If you really disabled it, then it shouldn't move *at all* (well, the camera will still roll; but you shouldn't be able to look around). So you either didn't disable it completely, or you have multiple copies of this hook, or there's a very big bug in the code that I have failed to notice for months. Still, its a good idea to try that on my end to see what happens.
It was disabled. Cockpit lookaround was not possible, but still the cockpit and all other objects where shaking like hell.

Additionaly I just found out, that when I disable the HUD in-game (CTRL-End), it's much better, but still there

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

Post by blue_max » Wed May 06, 2020 7:28 pm

pimpe wrote:
Wed May 06, 2020 7:15 pm
It was disabled. Cockpit lookaround was not possible, but still the cockpit and all other objects where shaking like hell.

Additionaly I just found out, that when I disable the HUD in-game (CTRL-End), it's much better, but still there
Alright! Both are good clues to help in the investigation. Turns out the problem is not related to the hook after all. I think you just saved me a couple of hours right there!

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Thu May 07, 2020 5:33 am

blue_max wrote:
Wed May 06, 2020 7:28 pm
pimpe wrote:
Wed May 06, 2020 7:15 pm
It was disabled. Cockpit lookaround was not possible, but still the cockpit and all other objects where shaking like hell.

Additionaly I just found out, that when I disable the HUD in-game (CTRL-End), it's much better, but still there
Alright! Both are good clues to help in the investigation. Turns out the problem is not related to the hook after all. I think you just saved me a couple of hours right there!
Some more findings:
On a clean installation with Effects 1.1.2 everything if fine and smooth, but somehow the in-VR resolution seems to be very low - text is unreadable
When I copy over just onyl the ddraw.dll from a 1.1.3 installation, the image is jumping, BUT the VR Resolution seems to be very high - maybe too high

Problem is, that I'm not able to change the VR rendering resolution. Whatever I set either via XWAHacker or HookResolution, seems to only change the overall aspect-ratio, but not the rendering resolution in VR itself - in both versions

Any Idea how I correctly set the rsolution for VR?

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

Post by blue_max » Thu May 07, 2020 4:28 pm

The resolution for VR is dictated by your SteamVR settings. In release 1.1.2 I had a bug where the resolution was erroneously being set from the monitor; but that was fixed in 1.1.3. That's why changing the resolution through XWAHacker or HookResolution doesn't have much of an effect now.

Unfortunately, I could not reproduce this issue. At most, I experienced some stuttering in the tracking in the Concourse and sometimes while flying; but that was only visible in the headset, not in the monitor as in the previous video posted here. When I disabled the cockpit look hook, I only experienced the "normal" stuttering in the headset when looking around; but again, nothing visible on the monitor.

One thing I did notice was that using the hooks from 1.1.3, I didn't see any artifacts while in the concourse. This issue only appeared when I updated to the latest hooks; but again, this is not what you're reporting.

So, here's what you can try:

1. Go to SteamVR and set your resolution there. I set it at 75% (the default) and things seemed OK. I try to keep all resolutions at about the same range. My in-game resolution was 1600x1200, my monitor was set to 1920x1080 and SteamVR was set to somewhere in-between, although I did try 1920x1080 too and that worked fine. The higher your resolution, the lower the performance, though.
2. You can try the install from 1.1.2 again and just use the new ddraw too -- just set the resolution through SteamVR.
3. Disable the hook_resolution.dll or the hook_windowed.dll. Try removing these files one by one to see if there's any difference.
4. You mentioned that have an Oculus. Try toggling supersampling and asynchronous spacewarp to see if that helps.

I did find a bug in the Dynamic Cockpit where the HUD won't be displayed if the Beam Weapon is absent; but again, you didn't even install that.

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Thu May 07, 2020 5:29 pm

blue_max wrote:
Thu May 07, 2020 4:28 pm
The resolution for VR is dictated by your SteamVR settings. In release 1.1.2 I had a bug where the resolution was erroneously being set from the monitor; but that was fixed in 1.1.3. That's why changing the resolution through XWAHacker or HookResolution doesn't have much of an effect now.

Unfortunately, I could not reproduce this issue. At most, I experienced some stuttering in the tracking in the Concourse and sometimes while flying; but that was only visible in the headset, not in the monitor as in the previous video posted here. When I disabled the cockpit look hook, I only experienced the "normal" stuttering in the headset when looking around; but again, nothing visible on the monitor.

One thing I did notice was that using the hooks from 1.1.3, I didn't see any artifacts while in the concourse. This issue only appeared when I updated to the latest hooks; but again, this is not what you're reporting.

So, here's what you can try:

1. Go to SteamVR and set your resolution there. I set it at 75% (the default) and things seemed OK. I try to keep all resolutions at about the same range. My in-game resolution was 1600x1200, my monitor was set to 1920x1080 and SteamVR was set to somewhere in-between, although I did try 1920x1080 too and that worked fine. The higher your resolution, the lower the performance, though.
2. You can try the install from 1.1.2 again and just use the new ddraw too -- just set the resolution through SteamVR.
3. Disable the hook_resolution.dll or the hook_windowed.dll. Try removing these files one by one to see if there's any difference.
4. You mentioned that have an Oculus. Try toggling supersampling and asynchronous spacewarp to see if that helps.

I did find a bug in the Dynamic Cockpit where the HUD won't be displayed if the Beam Weapon is absent; but again, you didn't even install that.
Thanks a lot, that explains the whole resoultion topic.
Setting the reolution in SteamVR works. Still the resolution set in game affects the aspect-ratio.

And finally I was able to fix my problem: I need to set ProcessAffinityCore = 0 in DDraw.cfg, then everything is fine.
Every other number here causes the image jumping.

Again thanks for your prompt help. Now I just need to tweak some settings to reduce the distortion in VR and I'm good to go.

CaptainKoloth
Cadet 4th Class
Posts: 11
Joined: Tue Mar 31, 2020 3:11 pm

Post by CaptainKoloth » Thu May 07, 2020 5:35 pm

pimpe wrote:
Thu May 07, 2020 5:29 pm
blue_max wrote:
Thu May 07, 2020 4:28 pm
The resolution for VR is dictated by your SteamVR settings. In release 1.1.2 I had a bug where the resolution was erroneously being set from the monitor; but that was fixed in 1.1.3. That's why changing the resolution through XWAHacker or HookResolution doesn't have much of an effect now.

Unfortunately, I could not reproduce this issue. At most, I experienced some stuttering in the tracking in the Concourse and sometimes while flying; but that was only visible in the headset, not in the monitor as in the previous video posted here. When I disabled the cockpit look hook, I only experienced the "normal" stuttering in the headset when looking around; but again, nothing visible on the monitor.

One thing I did notice was that using the hooks from 1.1.3, I didn't see any artifacts while in the concourse. This issue only appeared when I updated to the latest hooks; but again, this is not what you're reporting.

So, here's what you can try:

1. Go to SteamVR and set your resolution there. I set it at 75% (the default) and things seemed OK. I try to keep all resolutions at about the same range. My in-game resolution was 1600x1200, my monitor was set to 1920x1080 and SteamVR was set to somewhere in-between, although I did try 1920x1080 too and that worked fine. The higher your resolution, the lower the performance, though.
2. You can try the install from 1.1.2 again and just use the new ddraw too -- just set the resolution through SteamVR.
3. Disable the hook_resolution.dll or the hook_windowed.dll. Try removing these files one by one to see if there's any difference.
4. You mentioned that have an Oculus. Try toggling supersampling and asynchronous spacewarp to see if that helps.

I did find a bug in the Dynamic Cockpit where the HUD won't be displayed if the Beam Weapon is absent; but again, you didn't even install that.
Thanks a lot, that explains the whole resoultion topic.
Setting the reolution in SteamVR works. Still the resolution set in game affects the aspect-ratio.

And finally I was able to fix my problem: I need to set ProcessAffinityCore = 0 in DDraw.cfg, then everything is fine.
Every other number here causes the image jumping.

Again thanks for your prompt help. Now I just need to tweak some settings to reduce the distortion in VR and I'm good to go.
That fixes it for me too! Woo! :D

Now if I may ask a well-defined technical question out of curiosity: what the heck is ProcessAffinityCore?

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

Post by blue_max » Thu May 07, 2020 5:39 pm

Well, I'm glad setting ProcessAffinityCore fixed the issue. This game is still single-threaded and it will do weird things if you attempt to run it on multiple cores.

"ProcessAffinityCore = 0" lets the OS decide on which core to run the game.
"ProcessAffinityCore = X" lets you select core X to run the game on.

CaptainKoloth
Cadet 4th Class
Posts: 11
Joined: Tue Mar 31, 2020 3:11 pm

Post by CaptainKoloth » Thu May 07, 2020 5:45 pm

blue_max wrote:
Thu May 07, 2020 5:39 pm
Well, I'm glad setting ProcessAffinityCore fixed the issue. This game is still single-threaded and it will do weird things if you attempt to run it on multiple cores.

"ProcessAffinityCore = 0" lets the OS decide on which core to run the game.
"ProcessAffinityCore = X" lets you select core X to run the game on.
Any idea why it would have that kind of result?

I realize this is a single-threaded 20+ year old game that's being modified and hacked up the wazoo AND run in VR and that that may cause all kinds of weird unpredictable effects generally which are difficult to pin down. Which may have something to do with it.

pimpe
Recruit
Posts: 8
Joined: Mon May 04, 2020 8:59 pm

Post by pimpe » Thu May 07, 2020 6:22 pm

blue_max wrote:
Thu May 07, 2020 5:39 pm
Well, I'm glad setting ProcessAffinityCore fixed the issue. This game is still single-threaded and it will do weird things if you attempt to run it on multiple cores.

"ProcessAffinityCore = 0" lets the OS decide on which core to run the game.
"ProcessAffinityCore = X" lets you select core X to run the game on.
makes sense, but after a fresh install the default settings is 2.
Maybe the default should better be set to 0

Bman
Lieutenant
Posts: 915
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Fri May 08, 2020 1:37 am

No, the original purpose of setting to one core was the music stuttering or it wouldn't play at all. Hyper-threading or back when dual-core processors were put on the market.
Last edited by Bman on Sun May 10, 2020 12:30 am, edited 1 time in total.
W-I-P: ISD-II, XQ-1 Platform1, (Imp) Escort Carrier, Misc, & TFTC.

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

Post by MamiyaOtaru » Sat May 09, 2020 4:54 am

blue_max wrote:
Tue May 05, 2020 5:07 pm
I'll keep the new settings to toggle the new Direct2D rendering; but if you happen to find a way to consistently reproduce the problem, please let me know -- I would also like to keep the new rendering system *and* keep a good framerate!

Thank you for your help!
well, this is consistent for me. Skirmish mission: https://www.sendspace.com/file/mu9kjp Put yourself in the b-wing group. Launch mission, target nearest hostile and turn and fly towards it, watch the blasters fly. Without the new 2d stuff It'll drop towards 30 for me, but with the new 2d stuff it goes down to 20 and below, plus some bad skips that I don't see without it. I see the behavior every time. Granted, that's a lot of stuff on screen, but the new 2d stuff brings it down to unplayable (both with the lower framerate in general, and the temporary drops that go down even further) while I get a steady 30+ without it.

As I mentioned before, that's on a 2060 super. Can try it on a 970 later, or on an older AMD 5850. I'm sure that mission and configuration will bring both of those to their knees, but I'll be curious to see if the new 2d stuff does so even more.

My SSAO.cfg: https://pastebin.com/EUBERJQ9

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

Post by blue_max » Sat May 09, 2020 7:59 pm

Thanks for the detailed repro, MamiyaOtaru. I just downloaded your skirmish mission and I'll try it later. Did you try disabling anti-aliasing on the text and radars? What about the ProcessAffinityCore setting, did you try setting it to 0?

I didn't notice anything particularly weird in your SSAO.cfg; but I'll use your configuration too.

CaptainKoloth
Cadet 4th Class
Posts: 11
Joined: Tue Mar 31, 2020 3:11 pm

Post by CaptainKoloth » Tue May 12, 2020 12:09 pm

I've been flying for a while in VR now and it's a blast! One minor thing: I'm having trouble getting the text to be readable. I tried changing around the SteamVR resolution but it didn't seem to do much, and I don't want to start breaking ddraw and other stuff. Is there a way to just make the HUD elements and targeting computer bigger so they're easier to see? I have the dynamic cockpit turned off (as that was REALLY tiny).

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

Post by keiranhalcyon7 » Wed May 13, 2020 6:06 am

Have you tried increasing the HUD scale using XWAHacker?

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

Post by MamiyaOtaru » Wed May 13, 2020 11:03 am

blue_max wrote:
Sat May 09, 2020 7:59 pm
Thanks for the detailed repro, MamiyaOtaru. I just downloaded your skirmish mission and I'll try it later. Did you try disabling anti-aliasing on the text and radars? What about the ProcessAffinityCore setting, did you try setting it to 0?

I didn't notice anything particularly weird in your SSAO.cfg; but I'll use your configuration too.
Disabling AA on the text and radar did not help (or hurt!)

Just to note: at least one other person is having the same issue: http://www.xwaupgrade.com/phpBB3/viewto ... 09#p167009 though I guess you know that since you posted a couple posts after him :D

BUT! Process affinity to 0 helped a whole lot. I'd had it at 2. With it set to 0, the new 2d stiff is still slower (min FPS drops from 29 to 22) but the occasional horrible stutter/hitch is gone. With processor affinity at 2, the minimum fps was more like 13, with momentary freezes. Oddly enough, without the new 2d parts, processor affinity 0 or 2 makes zero difference for me. FPS stays the same, no hitching. I'm only getting the hitching with the new 2d stuff and processor affinity 2. So I'll leave it at 0! FPS still goes down somewhat, but it does so less, and a whole lot more gracefully.

CaptainKoloth
Cadet 4th Class
Posts: 11
Joined: Tue Mar 31, 2020 3:11 pm

Post by CaptainKoloth » Wed May 13, 2020 11:51 am

keiranhalcyon7 wrote:
Wed May 13, 2020 6:06 am
Have you tried increasing the HUD scale using XWAHacker?

Yup. Didn't change.

User avatar
Ace Antilles

Admiral (Moderator)
Posts: 4996
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Wed May 13, 2020 12:00 pm

With the recent changes to the hooks the text should be slightly clearer but you can also change the font that it uses.
I don't think you can change font size? But you might have a standard large font that could help to set it to
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

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

Post by blue_max » Wed May 13, 2020 4:26 pm

MamiyaOtaru wrote:
Wed May 13, 2020 11:03 am
BUT! Process affinity to 0 helped a whole lot. I'd had it at 2. With it set to 0, the new 2d stiff is still slower (min FPS drops from 29 to 22) but the occasional horrible stutter/hitch is gone.
That's more or less my experience; but it doesn't matter what I set my ProcessorAffinity to (a uniform drop in FPS when the new 2D stuff is enabled). I did find a simpler repro: load an empty skirmish mission, hide the cockpit and look at an empty region in space. Nothing should be targeted, so you only see the HUD and the background. Look at the FPS. Press Ctrl+End to disable the HUD and notice the change in FPS.

WIth the new Text/Radar rendered, I see a significant drop in FPS: from 200 without HUD to 113 with HUD. Using the regular Text/Radar renderer, I see a drop from 200 to 190FPS. Adding the cockpit has a lower impact (from ~55FPS to ~40FPS, depending on the cockpit); but it's still there.

I suspect that if you set your ProcessAffinity to a specific core, chances are that the OS may be running stuff on that same core too, and that may be causing the random impact in performance. In other words, maybe setting it to a different core (like 3 or 4) may also improve performance; but if 0 works for you, then that's OK too.

Post Reply