Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
11 years ago

Lighting(?) Issues in VR Mode Solely

I am currently creating a Senior Project in UE4, and I'm having a few issues with what seems to be lighting when in VR mode.




The video explains a bit of what is happening and shows what I see when testing, but to explain it in text for those who did not watch, the scene I have created is lit and working normally with the DK2 as long as it is on my desk, more than likely out of range of the camera. Once the DK2 is lifted, as if to put on my head, the lighting will cut out entirely, making everything undistinguishable within the DK2.

I'm not sure if the positional tracking coming into play is what is causing the issue or if there is another issue I need to fix, but I haven't found a way to resolve this anywhere and could use some help.

This only happens in VR Mode, every time I've tried it in the normal viewpoint, the lighting stays as expected, it just seems like the positional tracking breaks it for some reason. For comparison, my other scene works perfectly, the only difference being the direction the camera is facing (in this case, the camera is facing down, in the other, it is facing the normal direction)

9 Replies

Replies have been turned off for this discussion
  • artyom17's avatar
    artyom17
    Expert Protege
    Most likely you just move the 'camera' out of the lit volume when you grab a headset. Try 'hmdpos reset' console command and see if it is back to normal.
  • Anonymous's avatar
    Anonymous
    "artyom17" wrote:
    Most likely you just move the 'camera' out of the lit volume when you grab a headset. Try 'hmdpos reset' console command and see if it is back to normal.


    Doesn't seem to work, with a little more experimentation, I've pretty much confirmed it turns off as soon as the positional tracking is detected. Moving the headset around the camera's sight keeps the lighting intact, but once it enters, the lighting shuts off for good. I don't seem to have problems with the lighting if the blueprint I made doesn't grab the player and instead the testing is done with Unreal's generic first person controller that is created when playing the level, so I assume there is a camera setting in my blueprint that needs to be changed, but I have yet to find any setting that works.
  • Can you try deleting the file:

    C:\Users\YourName\AppData\Local\Oculus\ProfileDB.json

    Then opening the Config Util and creating a new profile (make sure to set your height and do IPD calibration).

    I've seen cases where the profile gets corrupted and the values are set to huge numbers that could cause issues.
  • Anonymous's avatar
    Anonymous
    Unfortunately resetting the profile hasn't worked either (although I probably needed to between my Windows installations)

    I'll try editing some of the camera values as the problem seems localized to my character blueprint, but other than that I'm not experienced enough in Unreal to really understand what other issues could be causing this.
  • artyom17's avatar
    artyom17
    Expert Protege
    What happens if you enter 'viewmode unlit' console command?
  • Anonymous's avatar
    Anonymous
    When I use the "viewmode unlit command" the scene no longer has issues once the headset enters the camera's view, but of course the lighting is all messed up and the objects nearly indistinguishable. I haven't found any indication of the problem in my blueprint's camera, but at least I know at this point that the lighting is the issue.
  • Sorry i haven't watched the video yet, but are you using the VR template from the UE forums?

    There is a feature in there that dims the scene on purpose when your virtual head collides with objects, it's simply a way to deal with the problem of positional tracking.

    You might need to change your collision volumes or disable the feature entirely by modifying the blueprints..
  • Anonymous's avatar
    Anonymous
    Thank you, that was the issue exactly. Would you happen to know where the dimming is done within the blueprint? I wasn't able to find any mention of dimming in my short look through the blueprint, so I simply removed the colider from my object, but I may need it in the future.
  • Yep i just had a quick look, it's on the VRPlayerController blueprint (Event Graph), the section with comments "Show camera view if out of camera range or colliding with object", where it sets the var "BlendWeight", etc.

    You can simply disconnect that whole part if you want (from the branch that checks "HasValidTrackingPosition"). Hope this helps.