The online racing simulator
OpenXR, 'Next-Gen' VR support and best clarity in a HMD
I have always been impressed with LFS for really trail-blazing racing sim VR. It's still a 'go-to' when someone (and now my kids) want to experience 'VR racing'. The combination of fun cars and tracks, proper 3D mirrors, presence, and high frame rate seem to make for the most immersive set-up.

In the past month I've been experimenting with combinations of SGSS and MSAA, OpenXR (mostly in Assetto Corsa) and Foveated Rendering to get visuals on the HP Reverb G2 that, for the 20deg sweetspot, rival the Varjo Aero in Assetto Corsa. And importantly will do so at a solid 90FPS.

So my question is whether there are plans to move the VR support forward? Any plans for OpenXR support, and perhaps open the door to eye-tracking? It would be great to see LFS maintain cutting-edge from a VR perspective; OpenXR would be a good step.

And is anyone else tinkering with maximising visual clarity in VR in LFS? Or experimented with HMDs and got tips to share as to how to configure to get the best experience?


I did try OpenComposite today, it launched a couple of times - I noted in the 3D options I now had a bar to set the render resolution, which I've never seen before, and it picked up my OpenXR 150% SS as default - but after crashing it now gives me a 'Headset Tracking not detected' error when launching unless I stick back to 'SteamVR' mode. I'll have a bit more of a play over the weekend.
Quick update on this - no progress with OpenXR on the G2, but I went for a few laps this evening in the Varjo Aero. LFS has never looked so damn good! LFS + Varjo are a really good match, you can max it and really demonstrate the clarity the headset can offer. I've been struggling before today to really get that from it. LFS may have just cost me a fortunate.
Thanks for the information.

Good to hear LFS keeps on working with new headsets, through OpenVR.

I don't have any plans for OpenXR support at this time and I would hold off from such updates as long as possible, while there are so many other things to work on. So I hope OpenVR support keeps going for a long time.

I've been working on a 1000Hz update rate for the physics that allows better time steps between graphical frames so that should help with VR if I can manage to sort out the remaining issues.
Quote from Scawen :I've been working on a 1000Hz update rate for the physics that allows better time steps between graphical frames so that should help with VR if I can manage to sort out the remaining issues.

Heart

That's definitely a higher priority than targeting any more XR standards at this point, great to hear you're working on it. The skipped frames in VR is the only thing that stops it from being a perfect implementation in my opinion.
Quote from Scawen :Thanks for the information.

Good to hear LFS keeps on working with new headsets, through OpenVR.

I don't have any plans for OpenXR support at this time and I would hold off from such updates as long as possible, while there are so many other things to work on. So I hope OpenVR support keeps going for a long time.

I've been working on a 1000Hz update rate for the physics that allows better time steps between graphical frames so that should help with VR if I can manage to sort out the remaining issues.

I understand, given the priorities it makes sense that it's a backlog task deep down the order of priority, at least until it more FPS in VR are needed!

I put in a few laps at Blackwood tonight with it rendering about 10800x4400 which looks epic. 90FPS solid. With clarity feeling like an HD monitor in VR it makes for a really immersive experience, it really 'sucks you in' - shadows and clarity in the distance (almost no shimmering!), and the clarity in proper mirrors all adds up. It still honestly feels like a benchmark in VR driving 'experience' despite its age.

The tearing / stuttering is the obvious detractor. So I'm excited to see the 1000Hz update, even if that is the only VR oriented update in a good while. It didn't feel as bad in the G2 as the Aero, pretty sure it is but with increased clarity it feels more jarring.

If LFS maintains all it does so well and resolves that issue, with the future graphics update it'll be quite a formidable VR experience - the futures bright!
What is the stuttering you all are talking about? The side scenery moving in micro steps like there are missed frames?
#7 - gu3st
Quote from RacingSOUL :What is the stuttering you all are talking about? The side scenery moving in micro steps like there are missed frames?

Yeah exccept it's not missed frames, it's just LFS physics being out of sync with the HMD refresh rate.
Quote from gu3st :Yeah exccept it's not missed frames, it's just LFS physics being out of sync with the HMD refresh rate.

Thank you for this info. Yeah, that stutter bothers me a bit too Smile
Quote from Ross Burton :I understand, given the priorities it makes sense that it's a backlog task deep down the order of priority, at least until it more FPS in VR are needed!

I put in a few laps at Blackwood tonight with it rendering about 10800x4400 which looks epic. 90FPS solid. With clarity feeling like an HD monitor in VR it makes for a really immersive experience, it really 'sucks you in' - shadows and clarity in the distance (almost no shimmering!), and the clarity in proper mirrors all adds up. It still honestly feels like a benchmark in VR driving 'experience' despite its age.

The tearing / stuttering is the obvious detractor. So I'm excited to see the 1000Hz update, even if that is the only VR oriented update in a good while. It didn't feel as bad in the G2 as the Aero, pretty sure it is but with increased clarity it feels more jarring.

If LFS maintains all it does so well and resolves that issue, with the future graphics update it'll be quite a formidable VR experience - the futures bright!

what about your Graphic card ? what is your config please
Can someone tell me please why does ASW on Oculus kick in when my GPU load is never above 50%? (cpu is 20%)
With ASW active I get 45fps instead of 90fps even though my PC is clearly (or not) capable of more.
Quote from RacingSOUL :Can someone tell me please why does ASW on Oculus kicks in when my GPU load is never above 50%? (cpu is 20%)
With ASW active I get 45fps instead of 90fps even though my PC is clearly capable of more.

ASW only kicks in if your PC can't hit 90FPS so clearly your PC can't hit 90FPS.

LFS is also only single threaded so yes your CPU might only be 20% but that might still be 100% of a single core.
Quote from gu3st :LFS is also only single threaded so yes your CPU might only be 20% but that might still be 100% of a single core.

Yes, without further information this may be the key.

RacingSOUL, it would be interesting to know how many cores your CPU has so we can better understand that 20% figure.

A modern GPU is unlikely to be overloaded by the current public version of LFS but there is a lot of CPU usage to decide which objects to draw and send those instructions to the graphics card.

It may be informative to know if the slowdown only occurs at the bigger, more recently updated tracks such as Blackwood and Westhill.
Quote from gu3st :ASW only kicks in if your PC can't hit 90FPS so clearly your PC can't hit 90FPS.

LFS is also only single threaded so yes your CPU might only be 20% but that might still be 100% of a single core.

Thank you for replying, gu3st!

I agree - that could be the case. I will monitor per core load next time and report in a few hours.

Quote from Scawen :RacingSOUL, it would be interesting to know how many cores your CPU has so we can better understand that 20% figure.

A modern GPU is unlikely to be overloaded by the current public version of LFS but there is a lot of CPU usage to decide which objects to draw and send those instructions to the graphics card.

It may be informative to know if the slowdown only occurs at the bigger, more recently updated tracks such as Blackwood and Westhill.

Thank you for replying, Scawen!

My system is alienware x51 r2 with i7-4770 CPU @ 3.40GHz; 16gb ddr3-1600 RAM, Nvidia geforce gtx 1060 6gb FE, Crucial MX500 1TB 3D NAND SATA 2.5 Inch Internal SSD, 330W PSU.

The temps are below 60C for CPU and GPU, MSI afterburner shows no throttling, psu's load does not exceed its limit.

The slowdowns happen on Blackwood with 12 cars FBM grid, for example. Usually, ASW kicks in during start or when 3 or more cars are present on the screen (or in the mirrors). If I do hotlaps, the framerate stays at 90fps.

If I disable ASW via Oculus Tray Tool, the FPS is about 60-70 when maximum traffic is present on the screen.

I'm waiting for the next gen nvidia/ati cards so I can upgrade to reverb g2 or upcoming FB/Meta's headset (complete new PC build). My CV1 is excellent with tracking, vibrant colors with deep blacks (OLED screen), very lightweight, comfortable, and good built-in headphones. The only downside is its low resolution - too blurry by today's standards.
A i7-4770 is somewhat old but not completely useless. Would be quad core and hyperthreaded. I had one with a 1660Ti and it was ok in VR but not ideal. A 1060 will definitely be on the lower capabilities of VR. I'm pretty sure I was usually at like 45FPS on my CV1 at certain points (it was a long time ago that I seriously ran LFS in VR outside of random hotlaps).
Quote from gu3st :A i7-4770 is somewhat old but not completely useless. Would be quad core and hyperthreaded. I had one with a 1660Ti and it was ok in VR but not ideal. A 1060 will definitely be on the lower capabilities of VR. *snip*

I had absolutely no issues running LFS with my 1060 3gb in VR, using Rift CV1. I basically have the same pc as RacingSOUL, except with a bit stronger cpu (i7-6700k, which has 8971 pts vs. the i7-4770 with 7029 pts on PassMark) and the same amount of DDR4, 3000mhz RAM. The slowdowns might be caused by that cpu difference, or maybe the PSU? It doesn't seem like you would hit the 330w mark with that setup, but no psu likes to run close to its capacity, let alone lower-end psu's that can't hold 12/5/3.3V voltages stable due to their lower quality components, especially over long time running on the limit.

Not sure, but thought I might add my findings using a similar setup Frown
330w is definitely not powerful enough to run a 1060 6GB FE alongside a Haswell I7. Time to upgrade that PSU asap.
Thank you for your help, guys! So, the per-core CPU load doesn't go above 50% with ASW disabled. My performance profile is set to maximum performance, idk why ASW keeps kicking in Frown

For example, in iracing, GPU maintains 100% load @82C even though it is single core dependent sim too (20+ car grids with constant 90 fps). In LFS, even on lowest settings ASW kicks in, i.e. it doesn't matter if I select lowest graphics or 225% resolution scale, 8x AA, 4x mirror AA, etc.

According to the tests done by other x51 r2 users, 330W is enough for my setup (some even have 3060ti installed but that's pushing it IMO). The PSU is an external power brick with barrel type connector that plugs into PC (the PC itself is the same size as xbox/ps5 console; so, swapping it is not an easy feat). Maybe the PSU degraded over time (since 2013).
In my opinion LFS is to blame, rather than any hardware issues. Or a sort of combination of the Oculus software being a bit odd and LFS not fully adapted to it. Though that can probably be overcome by a very fast computer, you could still argue it's LFS's fault in some way.

For example the call where LFS submits the finished render target to the Oculus software, blocks for quite a while each frame. That means by default LFS would not be able to do anything at all while it simply waits for Oculus to return. That is the method that Oculus uses to force the program to stay at the correct frame rate. For the record, this is different from the SteamVR method, where the blocking is done on a separate function where the game asks for the head position for the next frame.

To try to avoid this wait, LFS uses a thread to submit the image. It allows LFS to continue with other tasks until Oculus says it's OK to proceed. LFS then waits at another point. I am not really sure about the interaction between this thread and the other part of the program. Also there is complication due to the fact that LFS renders in Direct3D 9 and submits a shared texture to Direct3D 11 as used by Oculus or SteamVR.

In my opinion it would be much better to use a separate thread for the render and the physics. I believe the VR driver software for Oculus and SteamVR are designed to be used in this way. So the graphical thread would continually create images and submit them to the VR system, while the physics thread does its own thing.

Going quite off topic...

Converting LFS to be multithreaded in that way is a big task and I am working on it, or at least looking into it, right now. It would never be done for the existing public version, but in the development version I have made one big step in that direction. As recently discussed on two threads that had to be closed, our new version is currently running the physics system at 1000Hz. This brings some benefits already although this is still done in bursts. One graphical frame, a burst of physics frames (on one thread). The best thing would be if the physics could continue at a steady rate rather than running in bursts. The next big change is to try and separate all the game screens / modes / processes or whatever you want call them, into a separate 'render' and 'process' function. All the LFS screens currently have their processing (if any) and render (often just buttons) in a single function. I believe these should all be separated into two functions so that processing and the render can be cleanly separated. On most screens this should be straightforward, but for example the game setup screen also processes the multiplayer system so that is a bit more involved. The in-game world is as you would expect, the biggest one of all as it does a lot of complicated graphics and multiplayer / physics processing. If that separation goes well then the graphics (including UI) system will be closer to being separated out into a separate thread.

Back on topic...

I don't really expect to make any improvements to the existing public version to make it work better in VR. Fundamental issues such as the single threaded nature and the use of Direct3D 9 are significant complicating factors. However for various reasons I am working on what I believe is the proper solution, in the development version with the new graphics and physics systems.
#19 - R-to
Quote from Scawen :However for various reasons I am working on what I believe is the proper solution, in the development version with the new graphics and physics systems.

How long it going to take that we can have the new tyre physics? Can you promise this year?
Quote from Scawen :...I am working on it, ...

Thank you Scawen for continuing to bring us information!
Quote from R-to :How long it going to take that we can have the new tyre physics? Can you promise this year?

I don't know how long it will take and I can't make any promises.

I like describing the development process so that community members can see how it goes. Part of the process is the escalation of tasks. I have a direction and a place I want to get to, and I can take steps in the right direction, considering a few steps after that step but I cannot plan every step of the whole journey. There are obstacles ahead but I can't see all of them yet.

Quote from KingOfIce :Thank you Scawen for continuing to bring us information!

No problem.
Somewhat related to the title is that Oculus is due to deprecate their Oculus API in favour of OpenXR starting at the end of August.

OpenXR was recently added to iRacing and has brought some interesting improvements. One of which is WMR headsets (HP Reverb G2) no longer need to use SteamVR which improves performance.

Additionally Valve does provide an OpenXR runtime for SteamVR devices and other devices like PiMax have community built (but dev supported via hardware) OpenXR runtimes under development.

It's definitely "the future" for VR headsets and will let developers target a single VR API rather than needing to support multiple APIs.
Quote from gu3st :A i7-4770 is somewhat old but not completely useless. Would be quad core and hyperthreaded. I had one with a 1660Ti and it was ok in VR but not ideal. A 1060 will definitely be on the lower capabilities of VR...

I'm using an 17-3770 with a GTX1060 6Gb, with 24GB memory, and getting a respectable score on SteamVR Test Results. See attached.

I an also using a 700W OCZ psu, which probably makes the difference, as without multiple decent powered UXB3 ports, I think I'd be struggling.

If its too expensive to get new psu, maybe a mains powered USB3 multiport might help?
Attached images
SteamVR Test Results GTX1060.png
@Scawen, thank you very much for providing the detailed insight into the development process and behind-the-scene outlook.

I will do a system refresh when I get time just in case some driver/component is glitching.

As you mentioned, getting another more powerful system to bruteforce the FPS is another way of solving the problem and I'm considering it. Waiting for the next gen intel CPUs and 4000-series NVidia cards as the gains rumored are so big compared to the current gen (as well as falling GPU prices, FINALLY! lol)

1000Hz physics update and multithreading? That would be great! I understand it takes a lot of time which means I have more time to prepare myself (i.e. get a new PC, DD wheel, LC-pedals, 6-dof motion rig, higher resolution VR headset, etc.) for that next step.

@sinanju, yeah, we have very similar systems. All USB ports are in use on mine (mouse, kb, oculus power, two oculus sensors, wheel and pedals, shifter, gamepad wireless dongle).
Quote from sinanju :I'm using an 17-3770 with a GTX1060 6Gb, with 24GB memory, and getting a respectable score on SteamVR Test Results. See attached.

I an also using a 700W OCZ psu, which probably makes the difference, as without multiple decent powered UXB3 ports, I think I'd be struggling.

If its too expensive to get new psu, maybe a mains powered USB3 multiport might help?

Must agree with the POWAH argument.. running a B550 mobo and Ryzen 5800X, pushing a 3090 RTX, but STILL have all my peripherals running through powered USB hubs. Makes a world of difference!
All this is powered by a Corsair 850 gold PSU.

(PS-> It plays Crysis beautifully! Tongue )
1

FGED GREDG RDFGDR GSFDG