Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VR Mirror window is completely black #1164

Open
grizeldi opened this issue Aug 29, 2019 · 11 comments
Open

VR Mirror window is completely black #1164

grizeldi opened this issue Aug 29, 2019 · 11 comments
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect". To be investigated

Comments

@grizeldi
Copy link
Member

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.

@jseinturier
Copy link
Contributor

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

@jseinturier
Copy link
Contributor

But i've tested it before the #1163 PR

@grizeldi
Copy link
Member Author

grizeldi commented Aug 29, 2019

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

@jseinturier
Copy link
Contributor

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

@jseinturier
Copy link
Contributor

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

@grizeldi
Copy link
Member Author

grizeldi commented Aug 29, 2019

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

@jseinturier
Copy link
Contributor

I will check with latest version by monday

@jseinturier
Copy link
Contributor

Did you try to set the mirroring parameter to false ?

@riccardobl riccardobl added bug Something that is supposed to work, but doesn't. More severe than a "defect". To be investigated labels Sep 16, 2019
@grizeldi
Copy link
Member Author

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
Copy link
Member Author

grizeldi commented Dec 29, 2019

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.

@richardTingle
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is supposed to work, but doesn't. More severe than a "defect". To be investigated
Projects
None yet
Development

No branches or pull requests

4 participants