Open Sudospective opened 4 years ago
I just opened up the vrtek.c
file from the OpenHMD source, and they have a commented line that states that the user is expected to have rotated their HMD display by using the command xrandr --output HDMI-A-1 --rotate left
. It seems pretty unfair to only include that in commented code in an obscure C-file that a non-developer would never dare touch, but that's what they propose. Might be good to put that in the docs if it isn't in there already.
So openhmd does not provide display rotation information at the moment. The projection matrices it provides do transparently rotate the images appropriately (I believe for the WVR2 this is the case but not 100% sure right now).
SteamVR-OpenHMD has some dodgy code to extract the rotation from the projection matrix, and rotates the images in the distortion code https://github.com/ChristophHaag/SteamVR-OpenHMD/blob/f3840280d99208bc58edd6c55cd134d2e199b3d4/driver_openhmd.cpp#L676-L690.
Now the issue is that we have to tell SteamVR about the rotated orientation of the display so it searches for the right resolution. I am pretty sure this is possible, for example the DK2 had a rotated display too. If nowhere else, the solution may be found in OSVR-Oculus-Rift + SteamVR-OSVR.
Once we figure out how to tell SteamVR about the display rotation we may have to remove the rotation hack from the distortion function because it's possible that SteamVR can handle it internally.
But we should make sure it also works with more exotic rotations like the LG 360 which I believe has the left display rotated 90° counter clockwise and the right display 90° clockwise.
I used to have the Windows drivers for this VR-Tek headset. I wonder if it does it through the VR settings JSON...
https://developer.valvesoftware.com/wiki/SteamVR/steamvr.vrsettings Valve has entries for driver sections in here that allow to specify width and height, but I'm not sure about rotation. However, I have noticed that when the output is manually rotated clockwise, it seems to have the two halves of the screen rotated counter-clockwise in each respective eye. It's working with a really cursed matrix for sure.
As expected, rotating the HMD display allows it to display to the HMD. However, SteamVR still reports that Direct Mode is disabled. It's possible I missed a step during setup, but I can't quite make out why this is occurring. I'm gonna take a more thorough look through the logs and attach anything that might shed some light.
https://github.com/ValveSoftware/SteamVR-for-Linux#known-issues
The VR status window isn't currently aware of direct mode being enabled or not, so the "enable direct mode" and "disable direct mode" buttons should not be used; direct mode is automatically enabled where supported
VR-Tek being the funky wacky HMD it is has an internal resolution of 1440x2560, that being width by height. When SteamVR is started, vrcompositor attempts to search for the same resolution, but inverted (i.e., 2560x1440) and results in being "unable to find a Direct Mode compatible resolution". Currently using the
master
branch of SteamVR-OpenHMD and themaster
branch of OpenHMD. Here's a snippet of the log:The thing I'm not sure about is if it's an issue with SteamVR, OpenHMD, or this here bridge for the two. Sorry in advance if this is in the wrong repository.