Forum Discussion

CubicleNinjas's avatar
11 years ago

Prediction Settings Feedback

After 6 months of playing with the prediction slider like a small child I'm confused that setting prediction to zero always seems to provide me with a smoother experience. This just doesn't make sense, but it has applied to DK1 and now to DK2.

For anyone unaware, Oculus has a wonderful article here explaining their approach to prediction. After reading it I was really stoked, as it is convincing and feels like another stone in the path towards working VR.

On the forums I often hear people say the default of 30ms is perfect for them, yet I also wondered if they're compelled to tweak the slider until it proves its purpose like I am. But when I started developing in VR I didn't find prediction to be as beneficial in current practice though. A default setting has a swimming quality, making me and others feel ill. When set to zero the effect disappears. It is noticeably faster with head movement without a hit on performance.

After watching the 2014 Oculus Unity talk I saw that prediction was being handled in a new way with SDK 4.0. This 'dynamic prediction' requires VSync and is tied into Time Warp.

Recently I built a scene with hundreds of objects orbiting another object. This scene is getting 250fps in DK2. When using prediction of 30ms it is judder-y with a delay in head movement. Same scene, same run, turning prediction to zero, the scene blends into presence (shocking me enough that I dodged one of the objects).

Given that it looks like VSync is causing issues in Unity, is this a VSync thing that I'm blaming on prediction? Is it Time Warp's judder? Or some unholy amalgam of all three? Why did this occur on DK1 when I wasn't using VSync?

Love to hear people's experiences to gather more data. Thanks!

10 Replies

  • I'll do some similar tests and let you know the results.
    At the moment, DK2 in extended mode (the only one that works with Unity) gives terrible judder for head movement.
    I tried with timewarp and vsync turned off but this does not help. I'll see what prediction off gives.
  • "bdeschryver" wrote:
    I'll do some similar tests and let you know the results.


    Thanks so much! :)

    I hope I'm wrong, but it is something that keeps creeping up for me.
  • CubicleNinjas,

    I tried with timewarp off and prediction off but I did not see a difference.
    As I am having issues with a "drak" shadow in my image, maybe it masked the effect.
    I am thinking more and more that my rift display has a hardware problem...

    Sorry I could not help !
  • Proton's avatar
    Proton
    Honored Guest
    I'm not sure if prediction does anything at all anymore. Looking at the code, the only place it seems to be used is in OVRCamera.ResetCameraPositionOrientation, and I don't think it really does anything noticeable in there. I don't see any way that variable could get to their driver, and I don't see anywhere else it could be used outside the driver.

    You can crank prediction to some crazy level, I tried that a few weeks ago and nothing happened (don't have my rift plugged in right now). I don't think it's used.
  • "bdeschryver" wrote:

    As I am having issues with a "drak" shadow in my image, maybe it masked the effect.
    I am thinking more and more that my rift display has a hardware problem...

    Sorry I could not help !


    Thanks for looking into it bdeschryver!

    The dark shadow image sounds like the infamous smear. I'd recommend looking into Drash's Smear Correction which resolves this really well.

    "bdeschryver" wrote:
    I'm not sure if prediction does anything at all anymore. Looking at the code, the only place it seems to be used is in OVRCamera.ResetCameraPositionOrientation, and I don't think it really does anything noticeable in there. I don't see any way that variable could get to their driver, and I don't see anywhere else it could be used outside the driver.

    You can crank prediction to some crazy level, I tried that a few weeks ago and nothing happened (don't have my rift plugged in right now). I don't think it's used.


    Thank you! I'm seeing different results in my tests, so really appreciate the info. So odd that it wouldn't be referenced elsewhere.
  • I tried Drash's correction but no change.
    I am seeing the effect quite a lot when being close to the stairs in the SDK Wolrd Demo: when I move my head, the stair's steps are blinking and having haevy shadows. Maybe you can have a try and compare on your side ?
    I tried to record that on video but it is very difficult sadly...
  • "bdeschryver" wrote:
    I tried Drash's correction but no change.
    I am seeing the effect quite a lot when being close to the stairs in the SDK Wolrd Demo: when I move my head, the stair's steps are blinking and having haevy shadows. Maybe you can have a try and compare on your side ?
    I tried to record that on video but it is very difficult sadly...


    The heavy shadows sound like the smear to me, but the blinking shouldn't happen. The smear correction is removing everything but the most faint blur in my scenes. I might try the DK2 on another computer to see of it could be the same result. It could be anything from drivers to an incompatible app interfering.
  • As of 0.4.2, OVRDevice.PredictionTime is only used when TimeWarp is disabled. TimeWarp uses dynamic prediction. It's usually a good idea to predict the pose for the time of scanout (probably around 2 frames or 27ms). TimeWarp does this, but also re-samples the pose and corrects the image just before scanout. We use a very simple prediction model (constant velocity) because it produced the most tolerable artifacts in our testing.

    There are a number of timing related issues that Unity and Oculus are working out. On the Unity side, up to and including 4.5.2, there was an issue with DX11 frame queueing in extended mode that caused >100ms added latency. There were also cases where Unity would vsync to the wrong display in builds after 4.5.2. Those issues have been worked out for an upcoming release. On our side, there were some problems with the way we synchronized predictions between threads. Those have also been fixed for an upcoming release. Today, the best illustration of TimeWarp and dynamic prediction is in the OculusWorldDemo that comes with our native SDK. The experience in Unity should be on par with that soon.

    If you are still experiencing judder on a 250fps app, please make sure you're using Unity 4.5.2f1, extended mode, and DX9. That "happy path" should get wider soon.
  • You cannot imagine how much we dream of this next update... Hoping to dream in days rather than weeks or months !
  • Hey !


    I am still having my problem and as I was doing a simulation video of my problem (too hard to record on the rift itself), I though I would post it on the forums in case someone has the same issue.

    http://youtu.be/jV1T7JqDRn4


    The effect is really happening when moving my head quickly in a direction: I then have this shadow in the direction of move which disappears when I stop moving...

    Any ideas ? My best guess is a hardware problem on the Rift screen as this effects occurs on different PCs/mac, no matter the software settings !