The online racing simulator
Test Patch U11: Fixes / VR updates
(257 posts, started , go to first unread)
OK thanks, maybe 50 Hz would be a good option.

Let's consider how that would look on a 60 Hz monitor.

Each 1/10 of a second the video source has 5 frames (each of 2 physics steps). But our monitor will refresh 6 times.

So 50 Hz video on 60 Hz monitor (physics steps per monitor refresh) will be:
2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0... (12 refreshes, 0.2 sec total)

Compared with my original 60 Hz video with this pattern:
2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1... (12 refreshes, 0.2 sec total)

I can understand that the 50 Hz video will look smoother if you have a monitor that can use 50 Hz refresh rate. I guess the 60 Hz version will look smoother on a 60 Hz monitor.

Of course the best solution will be for LFS to be able to render intermediate frames between physics steps, or a completely different solution, use 1000 Hz physics and choose the nearest frame.
Quote from Scawen :Of course the best solution will be for LFS to be able to render intermediate frames between physics steps, or a completely different solution, use 1000 Hz physics and choose the nearest frame.

This. Please, LFS needs that. (The both solutions will be better than how it is now.) ^^

EDIT: Don't know if this is the right moment, but i've been thinking about adding a subtle motion blur effect. It would be amazing for the video makers. It can only be in replay mode (like Gran Turismo Sport).
Broken Vsync at 2:28 Watch: Video This works only with a 50 Hz or 100 Hz Monitor.

Please do not watch the bad driving skills, but the AIs are wreckers.

Yes, when you make a 60 Hz Video is this better for 60 Hz Monitors, thats true. The world should be united at 100 Hz....
Quote from Scawen :

1) LFS is rendered in D3D9 then a shared texture is used to update D3D11 render targets. Some code is used to try to time that well, and it seems to work quite well on some computers but I believe it is worse on others, judging by the descriptions.

2) LFS uses 100 Hz physics update and these steps do not correspond exactly with the refresh rate of any VR headsets.

In the best case, on many computers, only problem (2) is a real problem. In this case, the view looks quite good when looking straight ahead, but you can see a slight stutter when you look sideways. Different people might be more sensitive to that - you can see the stutter of the scenery, the 100 Hz physics updates being rendered at 90 Hz or 75 Hz or whatever.

In the worst case, on some other computers, apparently there is a worse stuttering problem. I think this is related to problem (1) which has now been eliminated in the current development version by using D3D11 for the main LFS render.

theres my missing link.
now my screen makes sense to me again.lol.
i got 600Hz subfield. but way too powerful for games with settings same or simular to my screen.
i noticed recently in other games this effect of standing still. and you got a smooth steady image. but if moving, it begins to stutter. or in some cases wriggle even. v-sync can help somewhat on this. but will reduce frame rates most likely to 60. which makes no sense because that eliminates all other settings on my screen. lol. (that took me a few years to figure out). that givien my screen even got 2 sets of settings and 3 settings to set those 2 different type of settings too. in a game the other day i had a setting of night shadows. it makes the overall game look looking amazing, however it also takes a huge punch on power, and as such i would rather be without it. then i notice the blackness dark, in my settings, was on darkest of 3 settings. setting this to middle or low , would make the game look as should. if i let it stay on darkest and took night shadows off ingame. the image was practically the same on the screen. but obviously the settings were from the screen itself but also the game. i think DX11 solutions is what is needed. i can go on 24-30-60-75-85-90-100Hz if the game allows me too. easy. i think it also depends on video player. i dont get lines in videos played on same system. lines like i see ingame in a few games actually. most has some mod or update that fixes most of it. but its always best to have it build .
im also aware you speak abhout VR mostly here and im speaking of a normal flatscreen. but it made me fill a blank i had some time. so thanks for that. i get some tiny lines or stutter at 50Hz. but it seems to flatten out at 60Hz. i do get one sometimes. but could also be online server hickups.

the sound you hear when you see this on TV ,is 1000Hz!
https://i.ytimg.com/vi/OiH5YMXQwYg/maxresdefault.jpg
Quote from mbutcher :Drop your super-sampling value and try again.

Quote from Drifteris :I tried that and even 50% supersampling (on LFS) and it doesn't change much.

It's hard to believe that big supersamping value doesn't affect performance in some way, on a Valve Index that already has a high resolution. The render targets pre-distortion are so huge it's a bit of a painful thought (for a programmer) that you are increasing that surface by 225%. Schwitz

I'd be interested to see the contents of your openvr.log file. It's a plain text file in your LFS folder.

There should be a "size: A x B" line after LFSVR_AcceptSharedTexture and I think you may be surprised at the size of those A x B numbers, which describe the size of the image being rendered every frame.
Quote from Scawen :It's hard to believe that big supersamping value doesn't affect performance in some way, on a Valve Index that already has a high resolution. The render targets pre-distortion are so huge it's a bit of a painful thought (for a programmer) that you are increasing that surface by 225%. Schwitz

I'd be interested to see the contents of your openvr.log file. It's a plain text file in your LFS folder.

There should be a "size: A x B" line after LFSVR_AcceptSharedTexture and I think you may be surprised at the size of those A x B numbers, which describe the size of the image being rendered every frame.

Index have 1440×1600 resolution per eye but in steamVR the closest i can set it to is 50%. Default value was 100% that is already supersampling because the lens distorts the image a bit so it has to account for it. But other games works fine with 100% as default.

I had 100% set on LFS and 50% steamVR it looks very pixely and doesn't eliminate the lag/stutter problem. Like i can't tell difference between 50% and 100% SteamVR setting in LFS. If there's any it's really tiny. Even 225% on LFS and 100% steamVR isn't as bad compared to previous settings, except that it looks much better/sharper.


This VRlog when using 50% on steamVR:
Spoiler - click to revealLFSOpenVR Mar 20 2019
ProductName: Index
Manufacturer: Valve
LFSVR_QueryHMD
RT size: 2848 x 1584
Left eye:
GetProjectionRaw___: Left -1.541 Right 1.050 Top -1.403 Bottom 1.415
GetProjectionMatrix: Left -1.541 Right 1.050 Top -1.403 Bottom 1.415
GetEyeToHeadTransform:
1.000 0.000 0.000 -0.035
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
Right eye:
GetProjectionRaw___: Left -1.052 Right 1.541 Top -1.409 Bottom 1.412
GetProjectionMatrix: Left -1.052 Right 1.541 Top -1.409 Bottom 1.412
GetEyeToHeadTransform:
1.000 0.000 0.000 0.035
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
IPD: 0.070
LFSVR_AcceptSharedTexture
size: 2848 x 1584
LFSVR_Close



And this VRlog is when using 100% on steamVR
Spoiler - click to revealLFSOpenVR Mar 20 2019
ProductName: Index
Manufacturer: Valve
LFSVR_QueryHMD
RT size: 4032 x 2240
Left eye:
GetProjectionRaw___: Left -1.541 Right 1.050 Top -1.403 Bottom 1.415
GetProjectionMatrix: Left -1.541 Right 1.050 Top -1.403 Bottom 1.415
GetEyeToHeadTransform:
1.000 0.000 0.000 -0.035
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
Right eye:
GetProjectionRaw___: Left -1.052 Right 1.541 Top -1.409 Bottom 1.412
GetProjectionMatrix: Left -1.052 Right 1.541 Top -1.409 Bottom 1.412
GetEyeToHeadTransform:
1.000 0.000 0.000 0.035
0.000 1.000 0.000 0.000
0.000 0.000 1.000 0.000
IPD: 0.070
LFSVR_AcceptSharedTexture
size: 4032 x 2240
LFSVR_Close
Thanks for the logs. I see LFS resolution adjustment is set to 100% (the "RT size" line near the start is the same as the "size" line near the end).

In the case with SteamVR set to 100% your pre-distortion render target size is 4032x2240. The reason these are bigger than the physical screen resolution is because of the distortion: all parts of the render target further out from the eye centre points are deliberately squashed when they are mapped to the screens inside the headset, to compensate for the lens distortion.

If LFS was set to 225% at this time, that would multiply both X and Y by 1.5 so the render target in-game would be 6048x3360 which is really a massive image to render. It's interesting that you say that doesn't seem to harm performance much. I suppose the graphics card is very powerful and has a lot of memory.

So it looks like the issues really come from somewhere else. Probably the way I've implemented the D3D9->D3D11 texture sharing.

I've tried a small change in 0.6U10 and would like to know if it affects your frame dropping problems at all. It now avoids the use of a thread to submit the frame. The thread was meant to allow LFS to continue processing without waiting for the render to finish. But maybe it causes other problems. It's worth a quick test.


[EDIT: removed link to U10 patch - not recommended]

Changes from 0.6U9 to 0.6U10:

VR test:
- Different method of submitting frame to VR
- Avoiding the use of a thread to submit image
- It's possible this may avoid dropped frames

View setup:
- LFS now assumes 3 screens when aspect ratio is 4:1
- previously assumed 3 screens when aspect ratio was 3:1
- this improves support for ultrawide monitors

Some more updated translations - thank you translators!


DOWNLOAD:

IF YOU ALREADY HAVE 0.6U:
PATCH 0.6U TO 0.6U10 (SELF EXTRACTING ARCHIVE)

[EDIT: removed link to U10 patch - not recommended]
It seems to be worse. It mostly stays 40fps then goes up when there are less cars. I did a quick test around southcity with 20 cars using fpsVR to check fps, and other info. Here are the logs. Both done using 100% on both steamVR and LFS.

U9 patch
Spoiler - click to revealfpsVR Report:
App: LFS HMD: Index (80.000 Hz, IPD 70.0)
GPU: NVIDIA GeForce GTX 1080 Ti (26.21.14.4575) CPU: AMD Ryzen 7 2700X Eight-Core Processor
Delivered fps: 73.89 Duration: 2.7min.
GPU Frametimes:
Median: 0.5 ms
99th percentile: 1 ms
99.9th percentile: 1.1 ms
frametime <12.5ms(vsync): 100%
CPU frametime:
Median: 10.1 ms
99th percentile: 16.2 ms
99.9th percentile: 20.1 ms
frametime <12.5ms(vsync): 91.4%
Max. SteamVR SS: 100%
Render resolution per eye: 2016x2240(by SteamVR settings, Max.) (HMD driver recommended: 2016x2240)


U10 patch
Spoiler - click to revealfpsVR Report:
App: LFS HMD: Index (80.000 Hz, IPD 70.0)
GPU: NVIDIA GeForce GTX 1080 Ti (26.21.14.4575) CPU: AMD Ryzen 7 2700X Eight-Core Processor
Delivered fps: 50.99 Duration: 2.8min.
GPU Frametimes:
Median: 0.5 ms
99th percentile: 0.5 ms
99.9th percentile: 1 ms
frametime <12.5ms(vsync): 100%
CPU frametime:
Median: 13.3 ms
99th percentile: 19.2 ms
99.9th percentile: 21.3 ms
frametime <12.5ms(vsync): 41.3%
Max. SteamVR SS: 100%
Render resolution per eye: 2016x2240(by SteamVR settings, Max.) (HMD driver recommended: 2016x2240)
I don't understand this. Your PC specs are more than capable of running LFS in VR flawlessly... It could just be that the Index just asks too much. Have you tried it with other games on your PC? Edit: I noticed you said you tried it with AC and it worked fine in 80Hz mode... Hmm...

@Scawen: Just FYI, with worse specs than Drifteris (GTX 1070, Ryzen 5 1600X), I have used the Valve Index with LFS and it ran just fine with a decent number of cars. That wasn't on the current round of test patches though. Edit again: It might have been on the current round of test patches actually... Face -> palm
Thanks for the test. It's odd that a higher end computer can perform worse with LFS in VR. I can't come up with a sensible suggestion yet, but we can try another stab in the dark.

Attached to this post is a new LFSOpenVR.dll which works a bit differently.

How to use it:
- Rename the existing one in your LFS\dll folder
- Save this one there then start LFS

This DLL copies the render target submitted by LFS into an intermediate texture each frame before submitting it to the VR system. It's more like the way it works with the Rift. I don't really expect it to help but think it's worth a go.

You can use this DLL with the U9 or U10 patch. I guess U9 is a better choice as the thread-based submit probably does some good.
Attached files
LFSOpenVR_20200406.zip - 64.3 KB - 21 views
There is something odd on drifteris performance and data. In U9 if 100% frame are under 12.5Hz we are at 80Hz dead on. But for some reason the cpu is limiting in U9 and ruining it in U10. It looks like for some reason lfs is using a cpucore that is already saturated by something else. It could be a bug a bad 1000Hz mouse driver hard to know. But there is a cpu load issue here.

Edit: and it looks like the 1080Ti is capable of rendering at almost 1000Hz even at those high res.
The new DLL doesn't seem to change anything. I have no idea why LFS doesn't like my CPU. Looking at that fpsVR, CPU has huge loads on it while GPU is chill doing nothing. Shrug
Thanks for the test. LFS with D3D9 is quite heavy on the CPU as all the graphics and physics are loaded onto a single core, so there's no benefit from your 8 cores. I think the real solution is the new D3D11 version but unfortunately I can't give any estimate for when that will be released.

I'm taking this opportunity to update the OpenVR implementation for the D3D11 version. I might update to the latest OpenVR. I'll post here if I find anything or think of anything worth trying in the public version.
Hello Scawen.

First of all, i'm glad to join this LFS community. I just discover this simulator (1 week ago) and i'm very impressed by the physics. To me, by far superior than any mainstream simulators. Thanks a lot for that.

I previously build my rig on those maintream simulators, and never feel that realistic "grip" provided by LFS. LFS + VR, Direct drive wheel and motion is a blast!! Best simracing experience.

I also have VR, and i can confirm that i have more stutters with this update than the previous one. I returned back to 6U9.

A suggestion to valve index owners : use ancient reprojection system in steam VR may help : constant 90 fps except very few stutters in a beggining of a race (Steam VR 100%, LFS reprojection 225%, I 9 9900Ks, RTX 2080 Ti)

Keep going Scawen!
Quote from Pistolero 667 :
A suggestion to valve index owners : use ancient reprojection system in steam VR may help : constant 90 fps except very few stutters in a beggining of a race (Steam VR 100%, LFS reprojection 225%, I 9 9900Ks, RTX 2080 Ti)

What steamVR version are you using? Because in the latest steamVR 1.10.32 (non-beta) i don't see reprojection settings only motion smoothing that i turned off. There is some async_mode_toggle command in debug but that just makes it worse.
I also use the last version of Steam VR (1.10.32).

In video menu, You have to go to video parameters per application (or video settings per application or whatever it calls, i'm using the french version). In there select LFS (only works when LFS is running) and then, say yes to "use ancient reprojection system"

Hope it helps
Thanks for the test. I've now removed the link to U10.

In my D3D11 version, I got good results in VR recently with the Rift but for some reason the OpenVR version does not work well. I'm looking into that. If I can fix it, I don't know if the results might help the Public version but I will check that.
Quote from Pistolero 667 :I also use the last version of Steam VR (1.10.32).

In video menu, You have to go to video parameters per application (or video settings per application or whatever it calls, i'm using the french version). In there select LFS (only works when LFS is running) and then, say yes to "use ancient reprojection system"

Hope it helps

Ok i found that setting, thanks. However it's better and worse at the same time. The FPS seem to be higher yet still drops to about 60 (when using 80Hz) when there are more cars on screen. Your CPU is better than mine so maybe you are getting better results.

Another big problem that setting causes is that when there is alot of cars on screen (driving alone is fine no problem), if i look up or down, left or right even just slightly, the whole view stutters even when driving on a straight. Kinda disorientating. Feels like i need to sit still with my neck fixated in one location or something. Also it's dropping frames like crazy by looking at fpsVR.
Quote from Scawen :Of course the best solution will be for LFS to be able to render intermediate frames between physics steps, or a completely different solution, use 1000 Hz physics and choose the nearest frame.

The best solution will be 120 Hz Physics-Rate because the whole Twitch Streaming Platform is at 60 Hz and the most Monitors have 60 Hz. But 1000 Hz Tickrate will be senseless, better to use then 600 Hz Tickrate (Physics-Rate). 600 Hz are good for 100 Hz Monitors, good for 120 Hz, good for 60 Hz Videos and good for 50 Hz Videos, 600 Hz Physics Rate is the ultimative solution. 600 Hz is the Bridge between 50 Hz and 60 Hz, the ultimative solution.
Quote from matze54564 :But 1000 Hz Tickrate will be senseless

Not really senseless. Motorsports use timing at 1ms and that physics rate allows that accuracy in a simple way without interpolation.

1000 Hz physics at 60 Hz refresh rate would show visible frames with this step cycle:
16,17,17 <-- 50ms cycle, shown 20 times per second

I don't really know how bad it is to have graphical frames with that small variation in step time (some 16 ms, some 17 ms) but I'd guess it would not be very noticeable.

1000 Hz physics at 120 Hz:
8,8,9 <-- 25ms cycle, shown 40 times per second

1000 Hz physics at 90 Hz:
11,11,11,11,11,11,11,11,12 <-- 100 ms cycle, 10 times per second

I'm not sure if these 1ms variations every few frames would be noticeable.
144Hz screen is multiple of 1008. So that should also work pretty well with 1000Hz physics rate.
OpenVR:

Attached to this post is a new LFSOpenVR.dll built with the latest version of OpenVR. There are no other changes and it does not use an extra intermediate texture like the previous DLL test.

It seemed smoother to me, when the frame rate wasn't full there wasn't stuttering. Or maybe that was just the updated SteamVR... I don't know.

How to use it:
- Rename the existing TWO DLLs in your LFS\dll folder LFSOpenVR.dll and openvr_api.dll
- Save these new ones there (both are required for compatibility)
- Start LFS (I recommend the U9 patch)
Attached files
LFSOpenVR_20200407.zip - 368.5 KB - 21 views
Well,I downclocked my 144Hz screen to 100Hz and it works flawlessly. Shrug
Quote from Drifteris :Ok i found that setting, thanks. However it's better and worse at the same time. The FPS seem to be higher yet still drops to about 60 (when using 80Hz) when there are more cars on screen. Your CPU is better than mine so maybe you are getting better results.

Another big problem that setting causes is that when there is alot of cars on screen (driving alone is fine no problem), if i look up or down, left or right even just slightly, the whole view stutters even when driving on a straight. Kinda disorientating. Feels like i need to sit still with my neck fixated in one location or something. Also it's dropping frames like crazy by looking at fpsVR.

This setting is better for me. With the new reprojection system, it automatically lock 45 fps in order to prevent very low FPS. So i prefer 90 fps with a very few drops on stress than constant 45 fps. Yes, depends on overall system i suppose. Ancient reprojection works very well for me.

Hope it would'nt be worse with the DX11 update witch seems to don't like very much openVR.

Test Patch U11: Fixes / VR updates
(257 posts, started )
FGED GREDG RDFGDR GSFDG