[4.8] VR preview sometimes doesn't work, bad GPU-utilisation

Seriously, would you please push out this hotfix?

Hello spyro,

I did some digging and I have not found a pull request from Art_Oculus. I will ask around to see if he has mentioned this to anyone else. However, until he submits a pull request we cannot begin the process of consideration/implementation of the suggestion that he has provided above.

Yes, please? Please?

I talked to Nick Whiting and the fix is already integrated via perforce into UE4 main (CL #2607744). However, I am not sure if it will be a part of 4.8.2 (I just don’t know).
I am not a big fan of github. I tried to create a pull request, but I can’t make it to select only one particular commit, it always wants to grab more commits into the pull request.

Hello Art_Oculus,

I received an email from Nick Whiting, I am happy to hear that the fix was integrated. Thanks for following up with a response.

Make it a great day

Hi Rudy,

UE-17053 isn’t mentioned in the [4.8.2 release notes][1]…

And it’s still broken.

http://i.imgur.com/sLJqDGI.gif

This is week 5 now with a broken VR preview.

Hello Spyro,

I apologize for the miscommunication. I was referring to the integration of the solution into main (4.9). This issue did not make into the 4.8.2 hotfix as you said. However, I have included a link to the commit below if you would like to cherry pick this change list and integrate it into your project. You will need a source version of the engine if you don’t already have one. (I have included a link on how to build the engine from source). I have also provided a link to get you started on cherry picking change lists to integrate them into your project. I hope that this information helps.

Commit:

https://github.com/Crtriplett/UnrealEngine/commit/c6899b95de6c75f992249cefc97650c104621d57

Building from source

Video:

or

Documentation:

How to Cherry pick (This should get you started):

https://ariejan.net/2010/06/10/cherry-picking-specific-commits-from-another-branch/

Make it a great day

I just installed 4.8.3 and now just having one window does NOT fix the problem anymore.VR flashes for about 1 full second, with tracking and the warning message, then blinks again and becomes fully black. A mirrored window shows it working, but with no head tracking.

Hello MaxSMoke777,

This issue has been resolved internally. I don’t currently have another workaround for this issue, however if you are working from a source version of the engine you could try integrating the change list (provided in a post below) from github into your project.

Running 4.9 rel 3 and still have the same issue, i can’t do any VR testing right now. This needs to be addressed.

Hmmm… I’ve check the source code of the 4.9-rel3 and the issue is definitely fixed there. I also use it a lot and I didn’t have any problems since the fix was applied…

Yes, preview is working in 4.9 again, but now the detection process is broken: https://answers.unrealengine.com/questions/272771/49-p1-isheadmounteddisplayenabled-always-reporting.html

I see. Yup, I see that that method was changed in 4.9 for some reasons. It should use IsHeadTrackingAllowed() (or, IsHMDConnected()) method instead of IsHMDEnabled().

For me VR preview is still broken on 4.9, latest preview builds built from source. I was waiting for the 0.7 runtime to see if it made a difference and sadly the error is still there. Preview window goes black and nothing shows up on the HMD. Standalone builds are working perfectly however. I’ve rebuilt the complete engine source multiple times to no avail.

Can you provide with the .log file? (attach to the topic)?

Attached. The preview failing is when I launch the external preview window specifically and alt+enter. The in editor preview actually works every time. The logs attached show where it hangs or stops outputting logs before I kill it, the works log shows what happens when it randomly works, and the after launching log shows that if I launch and have it hang, then launch the oculus config tool and show the demo scene and hit escape the app will un-hang and actually show the scene perfectly. Of course UE4 is using the 0.6.0.1 SDK so maybe there is another fix in 0.7, but as it stands, even with the new runtime and 0.6 SDK I have that black screen hang.

Thanks again!

Hm. Don’t see anything suspicious. Does it happen 100% of the time? Can you also attach the most recent (after attempting to enter VR Preview mode) ServerLog_*.txt log from \AppData\Local\Oculus? (the name will be something like ServerLog_2015-08-23_21.04.57.txt).

Also, can you try to install the 0.7 Runtime - https://developer.oculus.com/ (it has support for 0.6 apps)? The way you describe the issue leads me to thoughts that the issue is unrelated to UE and could be solved by installing new Runtime.

Sorry my post wasn’t clear, I have this problem with the 0.7 runtime as well. The only difference from the previous runtime is that it is 100% going to work if I get a black screen, launch the oculus demo thenexit it. On 0.6 that sometimes fixed the app but not often. I will post the server logs when I get home. It is possible that it is just my project so let me also try a fresh simple project. Lastly to be clear that this is always on external launch with 0.7 or 0.6 runtime but preview 100% reliable for me with 0.7 runtime if doing in editor vr preview.

Hello hesham,

The issue dealing specifically with a black screen in stand alone has not been implemented. This thread is for the issue UE-17053. The issue that you are currently describing is UE-17125. They are similar but they require different solutions. The issue UE-17125, is currently being looked into by the developers. I hope that this information helps.

Make it a great day

Can confirm this works too, close all other windows and it seems to work again. (4.8.3) Might not be a 100% fix but worth a shot