Slashdot Mirror


Reverse Engineering the Oculus Rift DK2's Positional Tracking Tech

An anonymous reader writes The Oculus Rift DK2 VR headset hides under its IR-transparent shell an array of IR LEDs which are picked up by the positional tracker. The data is used to understand where the user's head is in 3D space so that the game engine can update the view accordingly, a critical function for reducing sim sickness and increasing immersion. Unsurprisingly, some endeavoring folks wanted to uncover the magic behind Oculus' tech and began reverse engineering the system. Along the way, they discovered some curious info including a firmware bug which, when fixed, revealed the true view of the positional tracker.

26 comments

  1. 40 years later, Twinkle Box makes a comeback. by Animats · · Score: 5, Informative

    The Oculus Rift tracking method, with various lights blinking at different rates, was first used in Twinkle Box, in 1974. It was really clunky then. They had to use rotating-disk cameras because vidicons had too much lag, and the wearer had to wear a big electronics box. Same idea, though.

    1. Re:40 years later, Twinkle Box makes a comeback. by ledow · · Score: 1

      Yes, it's not new and I imagine it still suffers from the same problems it always has (multiple frames required in order to identify which LED it actually is, sync issues requiring extra cabling, etc.).

  2. Article barely mentions me... by Jherico · · Score: 4, Interesting

    I think that the article kind of unfairly glosses over my contribution. I posted the original reddit thread, and I'm the one who discovered the codes required to actually enable the LEDs on the device. I appreciate that Oliver is an actual VR researcher, but I did this in part to get some visibility for the book I'm writing on Oculus Rift development.

    --

    Jherico

    What can the average user can do to ensure his security? "Nothing, you're screwed"

    1. Re:Article barely mentions me... by Anonymous Coward · · Score: 0, Funny

      Do you want us to call the whaaaambulance?

    2. Re:Article barely mentions me... by blueshift_1 · · Score: 3, Insightful

      Welcome to the internet where the facts are made up and citations don't matter...

    3. Re:Article barely mentions me... by Jherico · · Score: 4, Interesting

      Anyone with the SDK can get these codes. Oh, and you made a thread on Reddit.

      Really? Oliver explicitly said he'd had no luck in getting the codes. The SDK doesn't contain them, btw. Only the Oculus runtime, which is closed source, now communicates with the hardware. So, anyone who had the SDK and could also figure out how to write a DLL to intercept the HID calls made by the runtime (not the SDK, which doesn't contain the codes anywhere) could get the codes.

      --

      Jherico

      What can the average user can do to ensure his security? "Nothing, you're screwed"

    4. Re:Article barely mentions me... by ArcadeMan · · Score: 4, Funny

      Welcome to the internet where the facts are made up and citations don't matter. - ArcadeMan

    5. Re:Article barely mentions me... by Anonymous Coward · · Score: 0

      I think that the article kind of unfairly glosses over my contribution. I posted the original reddit thread, and I'm the one who discovered the codes required to actually enable the LEDs on the device. I appreciate that Oliver is an actual VR researcher, but I did this in part to get some visibility for the book I'm writing on Oculus Rift development.

      Looks like the article was updated since your comment, right? In any case, thanks for the hard work; I'm looking forward to some super cool stuff built on top of it.

    6. Re:Article barely mentions me... by Jherico · · Score: 2, Insightful

      It's not hard to monitor HID, lol. None of this is hidden, buried, or secret. It's just not published. Anyone who has the SDK can easily do what you did.

      Thank Captain Hindsight. Sure, technically anybody could have done it. But no one else actually did it, despite the numerous Linux developers complaining about the total lack of positional support for them. It's pretty easy to look at someone else's work and say "Oh, yeah, that's obvious" once they've actually done it. I don't really see why you've bothered commenting since you seem to be of the opinion that the entire exercise was pointless. If you don't buy into the entire premise of the article how can you be bothered to have an opinion of whether one of the participants in the work received proper credit?

      --

      Jherico

      What can the average user can do to ensure his security? "Nothing, you're screwed"

    7. Re:Article barely mentions me... by Anonymous Coward · · Score: 1

      A few things:

      There is no SDK on Linux, so they couldn't just use the binary that comes with the SDK to control the LEDs. The first thing they had to do was figure out how to turn on the LEDs without the SDK. Everything else hinges on that. Even if you think that's not difficult, Jherico was the first to do it and share his findings, thereby saving everybody else some time and putting the initial lines onto the blank sheet of paper: Finding a starting point is a major stumbling block for many people, so that deserves some extra credit.

      Quite a lot of open source contributors have ulterior motives. Some people get paid, some people want to have something they can show prospective employers, some people do it for fame and glory, some people want to plug a product. It gets the job done, and you get the result for free. You don't have to buy his book or remember his name.

      Don't berate open source contributors. Patching things and doing the "easy" jobs is still a lot of work and people who do these things deserve recognition even if you think you could have done it. You could have, they did. Glossing over their contributions is very demotivating. Personally I have chosen not to contribute to open source projects anymore after some bad experiences, except when I benefit directly from getting my changes into the project. That's stuff you're not getting because some people like you thought that giving my work for free wasn't good enough.

      Show your work.

    8. Re:Article barely mentions me... by Anonymous Coward · · Score: 0

      Welcome to the internet where the citations are made up and the facts don't matter. - blueshift_1

    9. Re:Article barely mentions me... by Anonymous Coward · · Score: 0

      It's not hard to monitor HID, lol. None of this is hidden, buried, or secret. It's just not published. Anyone who has the SDK can easily do what you did.

      Thank Captain Hindsight.

      Don't feed the trolls Jherico, it makes them feel like what they say actually matters. Thanks for the work you did, some people actually appreciate it - which is why you are moderated up.

    10. Re:Article barely mentions me... by Anonymous Coward · · Score: 0

      Welcome to the internet where the citations are made up and the facts don't matter. - Anonymous Coward

    11. Re:Article barely mentions me... by Anonymous Coward · · Score: 0

      Welcome to the internet, everything you read here is true - blueshift_1

  3. Article mentions me! by Jherico · · Score: 4, Informative

    Never mind. They've corrected the article.

    --

    Jherico

    What can the average user can do to ensure his security? "Nothing, you're screwed"

    1. Re:Article mentions me! by schweini · · Score: 1

      Sorry to highjack this thread for an OT question, but: Do you know if there is a way to emulate OR DK2's tracking data? I would like to homebrew a very poor man's Oculus Rift. The screen should be no problem, and there are many IMUs available - but how would i get an Oculus-enabled game to read the IMUs data?

    2. Re:Article mentions me! by Jherico · · Score: 1

      The Oculus SDK license specifically forbids using it to connect to non-Oculus hardware. On the other hand, they've recently released the full specs of the DK1 as open source, so it's now possible to legally build a piece of hardware that the SDK itself can't distinguish from the real thing. Hypothetically speaking, since the most recent version of the SDK relies on a runtime to communicate with the hardware, if you could spoof the runtime communication (which happens over a socket) then you could use any IMU you want to at all, as long as you replicated the mechanism that the runtime uses to send tracking data to a Rift enabled application. This is probably a violation of SDK / Runtime the license, but if you do a clean-room reverse engineering of the runtime you might be ok? IANAL.

      --

      Jherico

      What can the average user can do to ensure his security? "Nothing, you're screwed"

  4. Linux by Anonymous Coward · · Score: 1

    Unsurprisingly, some endeavoring folks wanted to uncover the magic behind Oculus' tech and began reverse engineering the system.

    No, what they actually wanted was to use the SDK under Linux. Oculus says they support Linux on their dk2 website: http://www.oculus.com/dk2/

    The Oculus Rift and the Oculus SDK currently support Windows, Mac OS X, and Linux.

    They neglect to mention that now 2.5 month after the dk2 (windows) release, they still do in fact *not* support linux and they still don't know whether Linux will be supported in their next release: https://developer.oculusvr.com/forums/viewtopic.php?f=20&t=15318&status=1#p201687

    Oculus has shown that there is probably nothing of lower priority than actually supporting the operating systems they say on their website they support. Gear VR with its complete (!) own SDK, their oculus connect gathering, etc. You name it, it is more important to them than to provide support for the operating system they say they support.

    Choice one: Send the hardware back/sell it and don't bother anymore.
    Choice two: Because they already have it, why not reverse engineer it and make it useful on anything that's not the two big proprietary abominations.

    1. Re:Linux by Anonymous Coward · · Score: 0

      Look, I am into Linux as much or more than the next guy, but I am not going to blame Oculus for focusing on Windows, even if they said they were going to be multi-platform. So far, this is mostly a gaming tool, and so far, that's mostly a windows thing. I am sure that they will listen carefully to any objections written neatly and concisely on the backs of $100 bills (one bill per character, please).

    2. Re:Linux by Jherico · · Score: 3, Interesting

      I understand this point of view, but on the other hand, I think that the VR killer app hasn't been found yet. The 'mainstream' equation works both ways. Sure there's a bigger potential customer base for VR apps running on Windows and OSX, but I think there's a bigger 'idea base' for new VR apps with hackers running Linux.

      --

      Jherico

      What can the average user can do to ensure his security? "Nothing, you're screwed"

    3. Re:Linux by Anonymous Coward · · Score: 0

      It's fine if they don't want to support linux. But then, don't put on your website that you support linux!

      Almost all of the development for the oculus rift happens using unity3d and unreal engine4, both of which have a working linux version. The only thing that prevents them from working on linux right now is the oculus sdk not being available for linux.