Skip to main content
Inspiring
July 19, 2014

How to detect DK1 vs DK2?

I decided I can't rely on Screen.currentResolution to tell me if the player is using a DK1 or DK2. I don't see a function exposed in OVRDevice that tells me the HMD's info. Does anyone know of a way to determine this?
    This topic has been closed for replies.

    11 replies

    Up and Coming
    July 19, 2014
    I guess that vector3 that the getcameraorientationpositionwhatever function will be changing with the DK2, just set it to 0.0f,0.0f,0.0f and if it changes it's a DK2.
    Inspiring
    July 19, 2014
    You can do this in C++, I'll have to check if there is a way in Unity.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    drashAuthor
    Inspiring
    July 19, 2014
    Thanks cyber, I appreciate it!

    "molton" wrote:
    I guess that vector3 that the getcameraorientationpositionwhatever function will be changing with the DK2, just set it to 0.0f,0.0f,0.0f and if it changes it's a DK2.

    It's a nice idea, and something like that might work for now, but it probably won't help when it comes to distinguishing between DK2 and CV1. Thanks!
    Titans of Space PLUS for Quest is now available on DrashVR.com
    Inspiring
    July 19, 2014
    Checking position probably isn't going to be reliable because the SDK will still return plausible values (estimations based on neck-model). In any case, we should have this fixed in the upcoming release so you can query information from the headset.
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Participant
    July 19, 2014
    It seems like a very reasonable feature request. We'll get something explicit in there soon, but probably in the short term you will need to infer it.
    Up and Coming
    July 20, 2014
    Beyond knowing whether it is a DK1 or DK2, it will be pretty important to know if the DK2 has valid position data or not at any given moment.
    Inspiring
    July 20, 2014
    Yes, you can tell if the camera loses tracking (for example, the user moves outside of view).
    AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV
    Up and Coming
    July 20, 2014
    I guess this means we don't get access to the camera data? :(

    PS: and can't we simply check what monitors are connected to the system?
    check out my Mobile VR Jam 2015 title Guns N' Dragons
    Up and Coming
    September 15, 2014
    Was this feature added to the latest SDK (0.4.2)? Is there an easy way to detect whether the Oculus in running positional tracking - ie DK1/DK2, or DK2 with camera disconnected?
    Creative Director of Private Eye - A cinematic, neo-noir thriller for the Oculus Rift, where voyeurism meets mystery, played out against a 1950's New York city backdrop. Official Site: http://www.privateeyevr.com
    drashAuthor
    Inspiring
    September 15, 2014
    I think in SDK 0.4.x, you can check the tracking state to see if the DK2 is being successfully tracked by the camera, but if this returns false, I'm not sure how you'd differentiate between "the camera is not plugged in" vs "the DK2 is out of range".

    Here's how you'd check the tracking state:

    OVR.Hmd hmd = OVR.Hmd.GetHmd();
    if(hmd != null)
    {
    OVR.ovrTrackingState trackingState = hmd.GetTrackingState();
    //NOTE: There's probably a proper constant to use instead of this literal 2
    if((trackingState.StatusFlags & 2) == 0)
    {
    //lost tracking
    }
    else
    {
    //currently tracking DK2
    }


    Note that I think this currently fails in 64-bit Windows builds in 0.4.2.

    And while I'm here on this thread which I totally forgot about, here's how one can determine which HMD is being used:

    if(OVRDevice.IsHMDPresent())
    {
    OVR.ovrHmdType hmdType = OVRDevice.HMD.GetDesc().Type;
    if(hmdType == OVR.ovrHmdType.ovrHmd_DK1)
    {
    //DK1
    }
    else if(hmdType == OVR.ovrHmdType.ovrHmd_DKHD)
    {
    //HD Prototype
    }
    else if(hmdType == OVR.ovrHmdType.ovrHmd_DK2)
    {
    //DK2
    }

    //etc
    }
    Titans of Space PLUS for Quest is now available on DrashVR.com