X-Wing Alliance VR mod

A Forum dedicated to the Suggestion, Creation and Editing of XWA Dynamic Link Library Files

Moderators: Darksaber, General_Trageton, Forceflow, JeremyaFr, DTM

Re: X-Wing Alliance VR mod

Justagai
Cadet 1st Class
Posts: 206
Joined: Mon Dec 08, 2014 10:59 pm

Post by Justagai » Fri Jun 21, 2019 9:24 pm

If you are basing the FPS off of the in-game FPS counter, there is an issue where it can only read up to 60FPS. Use Visual Studio's Performance profiler to get the real FPS. I've managed to get up to 85FPS on my machine.

EDIT: I think I replied in the wrong topic, but what I said above should still apply.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Jun 22, 2019 8:44 pm

Guys, please install the latest hook_time.dll from here:

http://www.xwaupgrade.com/phpBB3008/vie ... 10&t=11338

That will allow you to get a lot more frames per second in the VR mod.

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

Post by Khiu » Fri Jun 28, 2019 8:45 am

I recorded a small clip of me moving my head around, Im using a CV1. The orientation got flipped when the game started so my controls are behind me when I face forward in game, so Im not doing a whole lot. I hope it's still useful. Moving to the sides works until some limit is reached but moving up and down does nothing for me.

https://youtu.be/lOF-lztlPYE?t=16

User avatar
Trevor
Cadet 1st Class
Posts: 188
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Sat Jun 29, 2019 1:05 pm

there are a couple of settings you need to change to make the experience much better.

at present I use

Code: Select all

; VR parameters. Write one parameter per line.
; Always make a backup copy of this file before modifying it.
; If you want to restore it to its default settings, simply delete the
; file and restart the game.Then press Ctrl + Alt + S to save a
; new config file with the default parameters.
; To reload this file during game (at any point) just press Ctrl+Alt+L.
; You can also press Ctrl+Alt+R to reset the viewing params to default values.

; VR Mode. Select from None, DirectSBS and SteamVR.
VR_Mode = SteamVR

; IPD is measured in cms; but it's an approximation to in-game units. Set it to 0 to
; remove the stereoscopy effect. The maximum allowed by the engine is 12cm
IPD = 6.5

; sizes of projections
3d_window_size = 2.5
; HUD scale
3d_window_zoom_out_size = 1.300
; Set the following to 1 to start the HUD in zoomed-out mode:
zoomed_out_on_startup = 1
concourse_window_scale = 20.00


; The following is a hack to increase the stereoscopy on objects. Unfortunately it
; also causes some minor artifacts: this is basically the threshold between the
; cockpit and the 'outside' world in normalized coordinates (0 is ZNear 1 is ZFar).
; Set it to 2 to disable this hack (stereoscopy will be reduced).
cockpit_z_threshold = 2.000

; Specify the aspect ratio here to override the aspect ratio computed by the library.
; ALWAYS specify BOTH the Concourse and 3D window aspect ratio.
; You can also edit ddraw.cfg and set 'PreserveAspectRatio = 1' to get the library to
; estimate the aspect ratio for you (this is the preferred method).
3d_aspect_ratio = 0.80
;3d_aspect_ratio = 0.889
;3d_aspect_ratio = 1.550
concourse_aspect_ratio = 1.334
;concourse_3d_aspect_ratio = 1.334
; while 0.889 is 960/1080, steamvr seems to need 0.8 to be correct.
; however this will mess up the tech library

; Lens correction parameters. k2 has the biggest effect and k1 fine-tunes the effect.
k1 = -.5000000
k2 = -0.11000000
k3 = 0.000000
apply_lens_correction = 0

; OLD===================
; Depth for various GUI elements. Set these to 0 to put them at infinity (ZFar).
; Real HUDs are paralaxed to infinity to avoid re-focus from target to instruments
;HUD_parallax = 0.000001
;GUI_parallax = 0.990001
;GUI_target_parallax = 0.0001
; GUI_target_parallax is always added to GUI_parallax
; This has the effect of making the targeted object "hover" above the targeting computer
;Text_parallax = 0.9901
; As a rule of thumb always make Text_parallax > GUI_parallax so that
; the text hovers above the targeting computer
;Tech_Library_parallax = 0.010000

; NEW=====================
; Depth for various GUI elements in meters from the head's origin.
; Positive depth is forwards, negative is backwards (towards you).
; As a reference, the background starfield is 65km meters away.
HUD_depth = 32000
GUI_depth = 32000
GUI_target_relative_depth = 0.0
; GUI_target_relative_depth is relative and it's always added to GUI_depth
; This has the effect of making the targeted object "hover" above the targeting computer
Text_depth = 32000
; As a rule of thumb always make Text_depth < GUI_depth so that
; the text hovers above the targeting computer

; This is the parallax added to the controls in the tech library. Make it negative to bring the
; controls towards you. Objects in the tech library are obviously scaled by XWA, because there's
; otherwise no way to visualize both a Star Destroyer and an A-Wing in the same volume.
Tech_Library_relative_depth = 0.0100


; Set the following parameter to lower the brightness of the text,
; Concourse and 2D menus (avoids unwanted bloom when using ReShade).
; A value of 1 is normal brightness, 0 will render everything black.
brightness = 0.900

Interleaved Reprojection is a SteamVR setting that locks the framerate at 45fps.
In some cases, it may help provide a smoother experience. Try toggling it
to see what works better for your specific case.
SteamVR_Interleaved_Reprojection = 0





; 6dof section. Set any of these multipliers to 0 to de-activate the axis.
; The settings for pitch and yaw are in cockpitlook.cfg
roll_multiplier = -1.000
positional_x_multiplier = 2.5
positional_y_multiplier = 2.5
positional_z_multiplier = 2.5
; Limits of the position in meters.
; x+ is to the right.
; y+ is down.
; z+ is forward.
min_positional_track_x = -100.250
max_positional_track_x = 100.250

min_positional_track_y = -100.150
max_positional_track_y = 100.500

min_positional_track_z = -100.050
max_positional_track_z = 100.750


Trev

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Jul 02, 2019 5:01 am

Hey Khiu, thanks for posting that video. I'm not sure I understand what your problem was as your head seems to be facing in the right direction in that clip.

Regardless, I've added a new offset setting for the yaw and pitch to fix these issues (it happened to me as well when running the FreePIE version).

In the video, I also see that the aiming reticle moves along with the cockpit, as if it were glued to the cockpit. That's OK -- that's how I designed it in that version. However, it won't help you very much when aiming. I've fixed the reticle in my latest (as yet unreleased) version; but you can set the depth of the reticle to 65000 to fix that in the meantime.

Sorry I haven't been very active on the forums lately. I'm working on a mini-project related to the cockpit that will probably be of interest to the community. I'm doing progress; but it's been a little painful too. I'll post more details soon. Let me know if you still have problems or if you'd like to test the latest experimental (private) version I've got over here.

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

Post by Khiu » Fri Jul 05, 2019 7:12 pm

Yeah, that was after I turned around on my chair. Before launch it's still normal but after launch when I enter the cockpit I was facing the opposite direction. That was the first time this happened so I wouldn't worry about it.

Awesome, thanks for everything.

Thanks for sharing your config Trevor.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Mon Jul 08, 2019 9:55 pm

Well, as I said, I'm adding a new setting to the cockpit hook to offset the yaw and pitch -- that would probably solve your problem. Also, if you press the dot key that should tell SteamVR to reset the seated position. I would think that might also help?

Anyway, I'll release something this week ;)

yaglourt
Recruit
Posts: 5
Joined: Thu Apr 26, 2012 10:21 am

Post by yaglourt » Tue Jul 16, 2019 6:13 pm

Blue_max, thank you so much, you and all the great guys from xwau who made it possible !
If I was told 20y ago I would play this same amazing sim one day in VR ! And with the same good old FFB2 I'm still using !
ual002 wrote:
Thu May 16, 2019 6:01 pm
Any recommendations? (on a VR headset)
(sorry for the approximate syntax)
Actually there are not many great VR headsets for us, space-simmers.
Most HMDs have either greyish blacks (because of the use of LCD displays instead of OLED) or "god-rays" and/or glare (because of the use of Fresnel lenses instead of "normal").
Both phenomenas are very prominent in the black space of a space sim and very immersion-breaking for a lot of people (but as always YMMV).

If you just want to try XWA in VR (and maybe another space-sims) without spending too much and you don't own a high-end gamer PC, you can get a used Oculus Rift CV1 for $150-200
It has a nice OLED display with pitch-dark blacks
BUT A LOT of god-rays (its main flaw actually)
It's 3 years old so resolution is a bit low but all is readable with a bit of super-sampling
You don't need a beast to power it, especially thanks to Oculus' Asynchronous Spacewarp tech (you only need to run your game @45 fps min. instead of 90) which works well with space-sims. On the software side, Oculus is still ahead of the competition.

A much better solution if you have a good PC : Samsung "Odyssey +
better resolution than the previous one, OLED display, still relatively cheap ($300 on sale - it's often on sale).
But this HMD is notoriously uncomfortable to wear (it depends of the shape and size of your head) so you may need to mod it to make it comfortable
Another flaw is that it's not officially sold in Europe :( (so no warranty for us Europeans)
Its limited hand-tracking is yet another flaw but you don't care if you only play space-sims.

Now I heard the new Valve Index seems to have decent levels of black for a LCD headset (but "decent" is subjective), not too much god-rays but some glare is present (again it's subjective). I didn't have the chance to try one yet.
So if you want to buy one (and you have a pretty good PC to power it), you may want to try it before (good luck to find one) to see if the level of blacks and the amount of glare are OK for you
Except blacks and glare, this headset is better in every way than the previous one. Better FOV, better clarity, MUCH more comfortable, top-notch audio, higher framerate and so lower latency, etc.). With the excellent new - and very expensive - Valve Index controllers, it's the best all-around VR system at the moment.
Note that you don't need the whole $1000 package (including 2 controllers and 2 base stations) to plays space-sims, just the headset (still $500) and one base station are enough.

And if you really want "to go full ham", you have the Pimax 8K : huge FOV (Pimax : 170°, Index : 130°, others : ~100°), apparently less god-rays and glare than on the Index... Huge price too :D And of course you will need at least a very expensive GTX 1080ti or better, a 2080ti to power it....
Last edited by yaglourt on Thu Jul 18, 2019 2:48 pm, edited 7 times in total.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jul 17, 2019 6:01 am

Khiu wrote:
Fri Jun 28, 2019 8:45 am
The orientation got flipped when the game started so my controls are behind me when I face forward in game
I just released a new version of the cockpit look hook where you can specify yaw/pitch offsets:

https://www.dropbox.com/s/3q0rbzebjjzwh ... 5.zip?dl=0

If this happens again, just set "yaw_offset" to 180.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jul 17, 2019 6:16 am

Hey yaglourt, thanks for your comments and for your opinions on VR headsets.

I haven't tried anything other than the PSVR and the Google Cardboard; but I can add a few more comments from my perspective:

* Visual artifacts: Yes, the "black" inside a VR is more like a dark gray. There's some blurred vision near the edges and some minor glare. However, you get used to it. Right now, I don't even notice these things unless I'm looking for them.
* Image quality: I can see individual pixels in the PSVR -- but this is also the headset with the lowest resolution and you literally have a couple of screens right next to your eyes. Again, you get used to it and it's not that bad after a while.
* SteamVR performance: I know I posted that it "kinda sucked" (or something to that effect) about two months ago (?); but I have to take that back now. I've learned a lot about how to code for SteamVR and back then the big performance hit was because I'm just plain stupid. The performance in SteamVR is not as good as the DirectSBS mode (the one I use for PSVR and Google Cardboard); but it's reasonable. Sure, you'll get some stuttering when there's lots of objects in the screen; but it usually stays in the 45-90fps range (SteamVR has a hard cap of 90fps right now, AFAIK). So, it's not that bad (BTW, with the new time hook from Jeremy, I can consistently get 100+fps in DirectSBS now).

So, why bother?

* Immersion: The first time I put the PSVR on, it was for Star Wars: Battlefront. The first thing you see is an AT-AT walking right above you, and let me tell you: that thing is BIG. It's one thing to see an AT-AT on a screen... however big that is; but it's a whole new experience to see it in VR. You *have* to turn your head around and you "sense" or "feel" the size. Then, there's the Star Destroyer. Those things are HUGE. Again, it's one thing to see it on a flat screen; but when you see it in VR and "feel" it around you, you *know* it's really REALLY big. It covers your whole FOV when you're close to it. Flying an X-Wing in VR is also an amazing experience. Every time I've put the PSVR on one of my friends, the first thing they all do is reach with their hands and try to touch the cockpit. You really feel the cockpit around you.

That's one of the reasons I decided to work on the VR mod: because once you experience that, you really don't want to go back to a regular screen... and I wanted more.

I'm sure others will agree that the immersion in VR is just plain fantastic.

Anyway, a new release for this mod is coming soon.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Jul 17, 2019 6:27 am

In the next release, the HUD can optionally be fixed in space, like this:

https://www.youtube.com/watch?v=wT--6kr ... e=youtu.be

In this way, the whole HUD can be seen my looking around. You can also zoom-in to make text more readable.

FBK
Cadet 3rd Class
Posts: 32
Joined: Sat May 18, 2013 7:05 am

Post by FBK » Wed Jul 17, 2019 8:35 am

I love it :P

yaglourt
Recruit
Posts: 5
Joined: Thu Apr 26, 2012 10:21 am

Post by yaglourt » Thu Jul 18, 2019 12:30 pm

blue_max wrote:
Wed Jul 17, 2019 6:27 am
In the next release, the HUD can optionally be fixed in space, like this :
Amazballs ! I was going to ask you for this feature...
While awaiting for the updated dynamic cockpits from you and the community, that will totally do the trick !

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Jul 19, 2019 6:31 am

Alright, here's version 1.0.0:

https://www.dropbox.com/s/2ueeg2i3u6jfk ... 0.zip?dl=0

The fixed HUD can now be used in this version, and I've re-enabled the DirectSBS mode plus a number of other things.

WarHawkster
Lieutenant JG
Posts: 516
Joined: Mon Jan 31, 2005 12:01 am

Post by WarHawkster » Wed Sep 04, 2019 10:56 pm

Hey, I don't know if anyone can help me but I tried installing with Occulus CV1 + Steam VR, followed all instructions, edited cfg files etc, and motion tracking in XWA just won't work for me. Steam VR running, head tracking within that is also working, just not in XWA.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Sep 04, 2019 11:24 pm

WarHawkster wrote:
Wed Sep 04, 2019 10:56 pm
Hey, I don't know if anyone can help me but I tried installing with Occulus CV1 + Steam VR, followed all instructions, edited cfg files etc, and motion tracking in XWA just won't work for me. Steam VR running, head tracking within that is also working, just not in XWA.
Yes, I can help you. Is the cockpit look hook installed and configured? A file called "Hook_XWACockpitLook.dll" should be in your XWA install dir. In cockpitlook.cfg check that you have "tracker_type = SteamVR" and that you have "yaw_multiplier = 1" and "pitch_multiplier = 1". Also, in vrparams.cfg check that you've got "VR_Mode = SteamVR". If you've got questions that are more specific to your setup, send me a PM with your config files and we can discuss how to get it working on your side.

Also, the latest version is here and it has a few more features:

https://www.dropbox.com/s/bceeg2z4a18il ... 4.zip?dl=0

husarz44
Recruit
Posts: 1
Joined: Sat Sep 21, 2019 8:24 pm

Post by husarz44 » Sat Sep 21, 2019 8:35 pm

Hello, i have similar problem as the person above me. Head positioning as well as roll axis seems to be working just fine but the cockpit stays locked to my display. I tried reinstalling the game, followed the instructions, and tried using different versions of your mod, but I still get the same result every time. I'm using Vive + SteamVR.

Edit: I found the solution, cockpitlook hook seems to have a problem with steamvr, but you can use opentrack to get data vrom steamvr and use it in cockpitlook instead of plain steamvr.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Sep 29, 2019 5:19 am

Hello husarz44

Thanks for trying out the VR mod! I'm sorry I didn't see your post before and thanks for reporting the issue. I haven't noticed anything weird in SteamVR; but I'll double-check. Also, the hook generates a file called "CockpitLook.log" that has some debug information, could you send it to me? It may have some clues as to what went wrong. The workaround you figured out sounds interesting; but SteamVR should work too (the roll effect comes from SteamVR, so that means that ddraw.dll can connect to it and the hook *should* work too).

Arc_11
Recruit
Posts: 2
Joined: Sat Oct 12, 2019 9:59 am

Post by Arc_11 » Sat Oct 12, 2019 10:12 am

Hi this mod looks amazing! Just a couple of really basic questions, will it work on the Rift S, and also is it possible to play through the entire single player game in VR with this mod? Is every cockpit dynamic like for example the first ship in mission one or do they at least have full head tracking? Thankyou!

User avatar
Trevor
Cadet 1st Class
Posts: 188
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Sat Oct 12, 2019 5:32 pm

Arc_11 wrote:
Sat Oct 12, 2019 10:12 am
Hi this mod looks amazing! Just a couple of really basic questions, will it work on the Rift S, and also is it possible to play through the entire single player game in VR with this mod? Is every cockpit dynamic like for example the first ship in mission one or do they at least have full head tracking? Thankyou!
yes.
yes.
no, not every cocpit is dynamic, only the examples given are. This will require some talented designer to make work for all craft.
yes, head tracking is global.

short reply since I have a cold.

Trev

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Oct 13, 2019 5:30 am

Thanks for your comments, Arc_11 -- I'm glad you're enjoying the mod.

Thanks for replying Trevor, and I hope you get well soon!

Yes, Trevor is right. Some of us will probably work our way (slowly) through the cockpits and update them to be DC-compatible; but you can also extend them for personal use in the meantime. All you need is some image editing software. Take a look at the samples provided. Cockpits that are not DC-enabled are still playable in VR, though. You can either chose to have the HUD fixed or have it floating freely.

Turgidson
Cadet 3rd Class
Posts: 39
Joined: Sun Aug 25, 2019 10:02 pm

Post by Turgidson » Sun Oct 13, 2019 6:48 pm

Of course each person can do whatever he wants on his own setup, but I'd guess that releasing additional DC cockpit files would only be allowed if the cockpit's initial designer agrees. On the other side, DC-enabling seems rather low on the priority list from what I've read before... so could there be a list of ships where the designers would pre-agree a DC extension made by external guys?

Arc_11
Recruit
Posts: 2
Joined: Sat Oct 12, 2019 9:59 am

Post by Arc_11 » Wed Oct 16, 2019 9:20 am

Thank you everyone :) The main thing for me was the head tracking! Looks like a really good mod well done everyone involved here.

Prosik
Recruit
Posts: 2
Joined: Sun Oct 06, 2019 7:05 pm

Post by Prosik » Wed Oct 30, 2019 9:31 pm

Hi,
A Rift CV1 running the gog version. Followed the instructions.
I tried steam with opentrack setting neither steam or oculus no joy. Tracking works but does not display in the HMD.

Anyone else try getting it to work with a non-PSVR headsets?
I am guessing there is a command that needs to be run to designate which port/display to go to or maybe mirror to.

Prosik

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Oct 31, 2019 4:46 am

Hello Prosik

You shouldn't need Opentrack for the Rift; but you have to set "VR_Mode = SteamVR" in vrparams.cfg and "tracker_type = SteamVR" in cockpitlook.cfg. You also need to run SteamVR before launching the game (the game will try to launch SteamVR if it isn't running; but it's easier to first run SteamVR).

The reason you can't see the display in your HMD is because you need SteamVR for that. I believe it's also possible to send the contents of your monitor to your HMD by using Virtual Desktop (or something to that effect); but that's kind of a hack. You can try that though.

If the settings above don't work, I'd suggest that you disable head-tracking and try just the HMD display. In other words, set "tracker_type = None" in cockpitlook.cfg; but keep "VR_Mode = SteamVR" in vrparams.cfg. Launch SteamVR and then the game. That should at least display something on your HMD. Then we can see what to do to enable tracking after that. Feel free to PM me if you need more help here.

Post Reply