cancel
Showing results for 
Search instead for 
Did you mean: 

What am I doing wrong? DK2 with UE4

BlackFang
Honored Guest
My DK2 arrived when I was using 4.3. I read in a thread not to download the oculus tray app and instead use the separate camera driver because 4.3 didn't work with the app. I did so. I changed orientation of the rift in my display properties. It worked just like my DK1 had been, but with higher resolution. Then I upgraded to 4.4, and everything seems about the same. Time to integrate positional tracking I think, so I go back and add it. However, the values I am logging out seem a bit odd, so I figure while I am trouble shooting I will go ahead and uninstall that driver, and download the oculus runtime thing. So I try using the direct HMD mode, unreal doesn't seem to notice the rift at all in that mode. I switch it back to monitor mode. Now it shows up on the rift, but freezes instantly.

So I google around for a bit and end up trying this -> https://github.com/Oculus-VR/UnrealEngine/tree/4.4

Now it doesn't crash, and It works with extend desktop mode, but still doesn't work with direct hmd mode as the rift screen stays black. Also, the blue light on the camera blinks on for a moment when I start UE4, but doesn't seem to work. The light doesn't come on again and I don't get positional tracking. So basically it is a higher res DK1 with an extremely annoying message glued to your eyeballs.

Any help getting positional tracking to work or disabling that ridiculous H&S warning would be great. Thank you for reading.

So, I uninstalled and reinstalled everything, recompiled the OVR version of unreal 4.4, updated the firmware in the DK2, etc. Direct Access HMD mode does not work. Period. It doesn't even work in the config tool's Demo Scene. Its black screen with orange light. However, you do get tracking. Using extend mode and trying the demo scene is an instant crash to desktop. Extend works with UE4, but with only rotational tracking. The blue light on the camera still refuses to stay on. It lights up when I start the editor, but when I launch stand alone game it turns off. It doesn't come back on when I return to the editor. Probably not related, but the chromatic aberration is much more evident than in DK1, and even values fairly far from rgb 0,0,0 suffer from screen smear.

Still no responses here, but any help will be much appreciated.
3 REPLIES 3

jzer0
Honored Guest
You may need to run some console commands to configure the rift to properly display. command "hmd sp 100" will set the screen percentage to 100 from 135, for direct mode to work sp must be 100. Also found that you need to run the stereo on command almost immediately after starting up the game and/or editor standalone preview. Editor preview will always reset sp to 135, so you need to run both commands very quickly. Also, you will likely have a lot of judder when running stereo while the UE4 editor is running. Best to cook and build the level to an exe, close the editor and then run. Can confirm that this is working, will be testing the 4.4 preview branch soon.

BlackFang
Honored Guest
Actually it was this line that fixed that issue.
GEngine->HMDDevice->EnablePositionalTracking(true);

artyom17
Expert Protege
You can check the status of HMD by using 'hmd stats'. Check the states 'PosTr' and 'Vision'. If the 'PosTr' is off then enable it via 'hmdpos on' console cmd. There is a potential issue that in some cases may cause pos tracking to be off by default. It is fixed already, hopefully will be integrated in 4.4.2.
If 'PosTr' says ON, but 'Vision' says LOST no matter what then you most likely have a camera issue (either driver or USB connection). Try to re-plug the camera in different USB ports (preferably, it should be connected to the least loaded USB hub, so you might want to disconnect USB drives, other cameras, etc).

Wrapping up: no need in C++ changes if this happens. Just use 'hmdpos on' console command.