jmonkeyengine icon indicating copy to clipboard operation
jmonkeyengine copied to clipboard

VR Mirror window is completely black

Open grizeldi opened this issue 6 years ago • 11 comments

When a VR application is launched, if configured per the wiki page, it should open a mirror window on the monitor instead of pushing frames only to the HMD. Currently the window does open, but it's completely black.

The VR init code removes everything from the root and gui node viewports and I saw some comments in the code about how this is handled by framebuffer copying, but I guess something there is borked.

grizeldi avatar Aug 29 '19 06:08 grizeldi

At this time the mirror windows is working fine for me.

jseinturier avatar Aug 29 '19 06:08 jseinturier

But i've tested it before the #1163 PR

jseinturier avatar Aug 29 '19 06:08 jseinturier

What OS and VR backend? I'll do some more testing, but looking at the code, it shouldn't be VR backend related.

EDIT: and yeah, it didnt work for me even before my pr

grizeldi avatar Aug 29 '19 06:08 grizeldi

OS: Windows Device: HTC Vive VR backend: Native OpenVR and LWJGL OpenVR

jseinturier avatar Aug 29 '19 06:08 jseinturier

I don't remember my version of SteamVR, i'll check

jseinturier avatar Aug 29 '19 06:08 jseinturier

This is what I get on Win10 with lwjgl backend. On Linux it looks the same but with a black window instead of white. Opomba 2019-08-29 065124 EDIT: Valve Index on SteamVR 1.6.10 EDIT2: Same results with native OpenVR backend

grizeldi avatar Aug 29 '19 06:08 grizeldi

I will check with latest version by monday

jseinturier avatar Aug 29 '19 07:08 jseinturier

Did you try to set the mirroring parameter to false ?

jseinturier avatar Aug 29 '19 07:08 jseinturier

Setting VRConstants.SETTING_ENABLE_MIRROR_WINDOW to false does make the scene appear again in the window, but the frustum is weird (kinda like displaying a 4:3 image on a 16:9 monitor) and vrAppState.setMirrorWindowSize() is ignored. That last one is kinda obvious, but a mirror window bigger than the monitor's resolution doesn't really help anyone.

grizeldi avatar Sep 16 '19 11:09 grizeldi

Just a clue I found while trying to debug other stuff: the resulting viewport that setupMirrorBuffers() returns is discarded. Might be the reason the mirror window doesn't work. Not my priority to investigate this further atm though.

EDIT: When VRConstants.SETTING_ENABLE_MIRROR_WINDOW is set to true, the mirror viewport is not even created at all, let alone used for anything. It is however created if that setting is set to false. Weird.

grizeldi avatar Dec 29 '19 18:12 grizeldi

The jme3-VR module is being deprecated so I think this issue should be closed as won't fix.

For the record I was aware of this issue and when I wrote the user Library Tamarin that provides equivalent functionality I made sure that Tamarin didn't experience this problem.

richardTingle avatar Jan 01 '24 12:01 richardTingle