Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

Retrieving estimated time till photons

VirtualOmnipresenceVirtualOmnipresence Posts: 10
NerveGear
edited July 2018 in Mobile Development
Hi,
I'm using Unity and I'm trying to hack some positional tracking into the Oculus Go. I'm wondering if there is any way to retrieve the estimated time till photons? That would be important for correctly predicting the HMD's pose.

How much time does the headset usually take from rendering being finished (= "OnPostRender()" being called by Unity) until the rendered image is displayed? What process take place during that time and how can this time be measured/predicted?

Any help is much appreciated. Thank you very much!
Tagged:

Comments

  • VirtualOmnipresenceVirtualOmnipresence Posts: 10
    NerveGear
    By searching the web I found a method that seems to be doing exactly what I'm looking for: ovr_GetPredictedDisplayTime();

    Looking through the OVRPlugin that ships with the Oculus Unity Utilities package, this method doesn't exist there. Has this method been deprecated? Or is there any other reason why this method is not accessible from within Unity?
  • VirtualOmnipresenceVirtualOmnipresence Posts: 10
    NerveGear
    Hi @imperativity,
    thank you very much for your reply and I'm sorry for my late response.

    As this seems not to be integrated into the SDK, is there a way I can implement such a functionality "by hand" using the Android API directly? Do you have any mathematical formula that describes how I can calculate the time when the next frame is going to be presented to the user?

    I think I could calculate the time till  the next display vsync using the Choreographer (Android API) class. But how much time passes from VSync until the frame is displayed to the user?
    Is the Oculus Go runtime also using the Choreographer class internally?

    Anything that points me into the right direction would be amazing.

    Thank you very much!

  • VirtualOmnipresenceVirtualOmnipresence Posts: 10
    NerveGear
    Hi @imperativity,
    sorry for bumping this thread.
    I'll check internally and see if there is any work around or consideration for including this in future releases.
    Kindly asking if you had any chance to check internally if and how the time till photons can be calculated? Is using the Choreographer from the Android API (as mentioned in my previous post) a possible starting point?

    Thank you very much!
  • VirtualOmnipresenceVirtualOmnipresence Posts: 10
    NerveGear
    Hi @imperativity,
    thank you very much for the update. I'm looking forward to that internal response  :)
Sign In or Register to comment.