Forum Discussion

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

Image in DK2 shifts around

I am making my project compatible with DK2.
I have all the rendering working correctly, I can see my scene in stereovision in the HMD.

I do not have any gyro code yet.

But I noticed that when I move my head the image does move. It shifts in an apparent attempt to smooth the motion maybe.

Is this time warp?
What (where, what code?) is causing the image to shift?
Is this happening on the device itself? My textures don't change, so how is the image moving around?

Thanks for any insight!

5 Replies

  • It's probably an optical illusion. If you don't have head-tracking enabled, the image will be stuck to your face. But as you move around, your brain tries to adjust for the motion, and it will appear has things are shifting even when nothing is happening. You will have to implement orientation and position tracking to solve this.
  • Matlock's avatar
    Matlock
    Honored Guest
    So using screenshots, I confirmed that the textures I provide to the dk2 library do get shifted from center.

    I do call ovrHmd_ConfigureTracking(), So the gyro is active.
    And I do call ovrHmd_GetEyePoses() But I don't do anything with those matrices yet.
    The view, and projection matrices for the scene are the same for both images below...


    the top pic is normal.
    the bottom pic is when I am rotating to the left.

    It seems to be attempting to soften a sudden rotation, but it is simply shifting the 2d image!

    So, im curious, Is this "timewarp"? A bug in my code? Or what is this called?
  • It may be timewarp. If you are using Unity, there should be a checkbox to disable it (in the inspector).

    I'd try "hooking up" the head-tracking and seeing if that solves your problem.
  • Matlock's avatar
    Matlock
    Honored Guest
    I am not using unity. It is a custom engine.

    This doesn't look like a bug. It has to be part of timewarp.

    It is interesting to see this part of it working alone.

    Ill hook up the tracking correctly, and see what happens!
  • Matlock's avatar
    Matlock
    Honored Guest
    For anyone curious....

    I was watching a GDC presentation from John Carmack, and he perfectly describes the above screenshot, and confirms that it is in fact Asynchronous Time Warp.

    https://www.youtube.com/watch?v=CqdexZJ ... age#t=2917

    He starts talking about ATW at 48:08
    And he specifically describes my screenshot at 51:07...

    "... and You whip your head over really hard, you can see black coming in at the edge ...
    You can kinda see the edge of what was the screen, as it was pulled over, and reprojected." -john carmack


    Don't the oculus engineers browse this forum? This could have been answered in 30 seconds by an oculus engineer.