alvr-org / ALVR

Stream VR games from your PC to your headset via Wi-Fi
MIT License
5.51k stars 488 forks source link

DCS World does not push VR "view" to Quest #31

Closed colin-gordon closed 4 years ago

colin-gordon commented 5 years ago

When starting DCS World, the game loads up on the desktop fine but SteamVR just hangs on the loading screen in the Quest.

This seems to be an issue with Alpha5, specifically, as apparently it worked fine in A4 (https://github.com/polygraphene/ALVR/issues/395)

JackD83 commented 5 years ago

I can confirm that its not working but I don't know who to blame for it:

Tue Sep 10 2019 12:27:06.412 - [System] System is running for 10 seconds. Tue Sep 10 2019 12:27:47.446 - CSharedResourceNamespaceServer sent namespace data: 19996 Tue Sep 10 2019 12:27:47.457 - New Connect message from C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe (VRApplication_Scene) (Args: ) 26564 Tue Sep 10 2019 12:27:47.457 - StartSceneApplicationTransitionFromProcess( 26564, C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe, ) Tue Sep 10 2019 12:27:47.457 - Creating builtin app for C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe (VRApplication_Scene) Tue Sep 10 2019 12:27:47.457 - Sending Quit event to process steamtours (22776) Tue Sep 10 2019 12:27:47.457 - Refusing connect from DCS (26564) because app start error VRInitError_Init_Retry Tue Sep 10 2019 12:27:47.470 - Console message (Info) from http://localhost:8998/dashboard/vrwebui_shared.js?v=ede2cce03cd72bef05b4:5: | Loaded action manifest for Tue Sep 10 2019 12:27:47.561 - Closing pipe steamtours (22776) because it was broken from the other end Tue Sep 10 2019 12:27:47.561 - Process steamtours (22776) disconnected (Thread(0x000002EDD2CE3760/0x000) Tue Sep 10 2019 12:27:47.561 - Clearing application openvr.tool.steamvr_environments PID because 22776 has exited Tue Sep 10 2019 12:27:47.561 - Closing pipe steamtours (22776) because it was broken from the other end Tue Sep 10 2019 12:27:47.561 - Process steamtours (22776) disconnected (Thread(0x0000022A0F63F4B0/0x000) Tue Sep 10 2019 12:27:47.561 - Lost pipe connection from steamtours (22776) Tue Sep 10 2019 12:27:47.561 - ###################################################################### Tue Sep 10 2019 12:27:47.561 - Cumulative stats for pid: 22776 Tue Sep 10 2019 12:27:47.561 - Total.................. 3635 presents. 6 dropped. 0 reprojected Tue Sep 10 2019 12:27:47.561 - Startup................ 486 presents. 6 dropped. 0 reprojected Tue Sep 10 2019 12:27:47.561 - Loading... 1 total.... 0 presents. 0 dropped. 0 reprojected Tue Sep 10 2019 12:27:47.561 - Timed out. 0 total.... 0 presents. 0 dropped. 0 reprojected Tue Sep 10 2019 12:27:47.561 - ###################################################################### Tue Sep 10 2019 12:27:47.561 - Total dropped frames: 6 Tue Sep 10 2019 12:27:47.610 - Found Windows 10 or newer, so enable advanced image processing of scene textures. Tue Sep 10 2019 12:27:47.958 - New Connect message from C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe (VRApplication_Scene) (Args: ) 26564 Tue Sep 10 2019 12:27:47.958 - Unable to create property container PC_7000067c4 because it already existed Tue Sep 10 2019 12:27:47.958 - Unable to create property container for DCS (26564). Maybe it's a reconnect? Tue Sep 10 2019 12:27:47.958 - StartSceneApplicationTransitionFromProcess( 26564, C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe, ) Tue Sep 10 2019 12:27:47.969 - Setting app system.generated.dcs.exe PID to 26564 Tue Sep 10 2019 12:27:47.969 - Enabling legacy input for system.generated.dcs.exe Tue Sep 10 2019 12:27:47.971 - system.generated.dcs.exe (oculus_hmd) attempting to load default config from file:///C%3A%2FProgram%20Files%20%28x86%29%2FSteam%2Fsteamapps%2Fcommon%2FSteamVR%2Fresources%2Fconfig%2Flegacy_bindings_generic_hmd.json Tue Sep 10 2019 12:27:47.971 - system.generated.dcs.exe (oculus_touch) attempting to load default config from file:///C%3A%2FProgram%20Files%20%28x86%29%2FSteam%2Fsteamapps%2Fcommon%2FSteamVR%2Fdrivers%2Foculus%2Fresources%2Finput%2Flegacy_bindings_touch.json Tue Sep 10 2019 12:27:47.971 - Using existing HMD alvr_server.WMHD000X000XXX Tue Sep 10 2019 12:27:47.971 - Processing message VRMsg_Connect from DCS (26564) took 0.0138 seconds Tue Sep 10 2019 12:27:47.989 - External connection from C:\Program Files\Eagle Dynamics\DCS World\bin\DCS.exe 26564 Tue Sep 10 2019 12:27:47.997 - Invalid input type click for controller (/user/head/proximity) Tue Sep 10 2019 12:27:48.010 - Closing pipe DCS (26564) because it was broken from the other end Tue Sep 10 2019 12:27:48.010 - Process DCS (26564) disconnected (Thread(0x000002EDC2B6DB40/0x000) Tue Sep 10 2019 12:27:48.010 - Clearing application system.generated.dcs.exe PID because 26564 has exited Tue Sep 10 2019 12:27:48.010 - Closing pipe DCS (26564) because it was broken from the other end Tue Sep 10 2019 12:27:48.010 - Process DCS (26564) disconnected (Thread(0x0000022A0F4BF240/0x000) Tue Sep 10 2019 12:27:48.010 - Lost pipe connection from DCS (26564)

colin-gordon commented 5 years ago

Thanks for the reply. Unfortunately none of that makes sense to me. The only thing I could suggest is doing the same thing with the old ALVR alpha 4 and comparing the log to (maybe) see where the issue is. I'm sorry I don't know enough about anything that's going on to help out myself.

JackD83 commented 5 years ago

The formatting is horrible. Here is the entry I'm referring to: Closing pipe DCS (26564) because it was broken from the other end Tue Sep 10 2019 12:27:48.010 - Process DCS (26564) disconnected (Thread(0x000002EDC2B6DB40/0x000)

DCS seems to close the connection to SteamVR

colin-gordon commented 5 years ago

I've just downloaded v2.4.0-alpha4 and DCS loads on that. The controllers are all messed up obviously, but the "VR view" works perfectly.

I tried turning on the debug log but there's nothing in the generated log that contains "DCS" so I'm assuming it's not the same log you're using.

JackD83 commented 5 years ago

This commit breaks DCS. If I change the tracking system name back to "Oculus Tracker" from "oculus", DCS opens a terribly distorted and miss aligned VR view.

If the name of the tracking system throws DCS off, I strongly suspect a problem on their end. Has someone tried this game with a Oculus Rift S? It should report the same as ALVR. I have installed the oculus runtime wich is always started when I launch DCS, maybe they try to launch the game using the oculus runtime and fail.

colin-gordon commented 5 years ago

It's great that you've tracked it down!

When I used alpha 4 earlier, I did not think it looked distorted or misaligned.

I actually have a family member with a Rift S who plays DCS regularly. I did a quick search on YouTube to find something more concrete than that and found several videos uploaded within the last month (such as this: https://youtu.be/0vaHsjxY1vU)

colin-gordon commented 5 years ago

Hello, sorry to bump this, but I've just looked at the https://github.com/polygraphene/ALVR/releases/tag/v2.4.0-alpha4 source code and it doesn't have the "driverConfig.trackingSystemName" at all. It only has serialNumber and modelNumber. It seems that whatever is messing up DCS (including the weird skewed view* we now get when changing the trackingSystemName) happened when these additional settings (and their associated changes) got added.

colin-gordon commented 5 years ago

@JackD83

My comment above is incorrect.

I've started at the alpha5 release and undone as many of the post-alpha4 commits as I could (I don't currently have Android Studio so I can't build the .apk and therefore can't alter anything that requires a corresponding change in the .apk).

Even with the vast majority of the code rolled back to alpha4 (including the trackingSystemName setting etc), the view in DCS is still distorted. It's fine if I look straight ahead, but any time I turn it skews the view (like turning a rectangle into a parallelogram) and zooms in/out.

The only places left for the issue to be are in the client->server communication changes or in a change in the .apk.

It's a very odd issue given that the same distortion doesn't occur in any other games using ALVR, the view in alpha4 is not distorted, and that DCS works fine on the Rift/Rift S.

JackD83 commented 5 years ago

Rise of the tomb raider has the same issue as DCS

JackD83 commented 4 years ago

The distortion is caused by the required <uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1"/>

in the client manifest to enable controller tracking on later firmware versions. I don't know how to fix this

colin-gordon commented 4 years ago

I just found this:

< uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1" /> is required for v2 signing, which is required for store review for Oculus Quest apps. For apps that target Oculus Quest and Oculus Go / GearVR with the same APK, v1 signing must instead be used for GearVR compatibility. If you are using the same binary for your Oculus Quest and Oculus Go / GearVR application, and have added headtracking in platform-specific code, you can use the above in your manifest but with android:required="false" to mark it as a hybrid application, however it must be signed with schema v1. Applications with headtracking and android:required="true" are the only ones that will support and require v2 signing for upload to dashboard.

Perhaps changing android:required to false could work?

JackD83 commented 4 years ago

No, not working either

JackD83 commented 4 years ago

After the change from oculus, the reported fov changed from: GetProjectionRaw Eye=0 (l,r,t,b)=(45.000000,45.000000,45.000000,45.000000) to GetProjectionRaw Eye=0 (l,r,t,b)=(52.000000,42.000000,53.000000,47.000004)

I tried to change it back manually, but this parameters change the rendering on the quest and forcing it to the old values did not help

JackD83 commented 4 years ago

Closed and integrated in #88