Skip to main content
Participant
March 19, 2014

Developing without a rift

Hello,

I´m working at a University sharing a rift with 2 other people.
Actually we´re working as hardware designers and thus not so comfortable in C++ prograimming.

How do we have to initialize the OVR to be able to use the shaders but without connection g a rift to the machine?
We´d like to output the rendered image directly on screen with appopirate resolution.


kind regards

    10 replies

    Up and Coming
    March 19, 2014
    The same way you do it with the Rift. It's just without one you won't be getting HMD tracking data, but you can emulate it.

    It is strongly advisable against developing anything Rift-enabled without testing it with the Rift extensively, though. Unless you're going to deploy some kind of 1:1 real life simulation, in which case it will be fine by definition.
    Inspiring
    March 19, 2014
    The examples we're writing for our book are mostly intended to be runnable with or without a Rift attached. In particular, if a Rift can't be found, we load default values for the DK1 hardware in order to initialize the shaders and window position / dimensions.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Participant
    March 24, 2014
    Hey Jherico,

    thanks for your reply. I had a look on your example code and I managed to initialize the rift´s default values. But what still remainded unclear is how to handle the monitor if I do not have a rift connected.

    We are developping with at least two monitors (without the rift) and we´d like to show our content on one monitor even if we do not have a rift connected. With a rift it ther should still be an extended monitor.
    When I´m goning through your examples I´m always struggling at the point establishing a display with the glfwGedVideoMode-function. Could you give me a hint where I could more information to this?

    Kind regards ;)
    Up and Coming
    March 24, 2014
    Has anyone tried, or is it even feasable to send orientation information from something like a smart phone to emulate the behavior of a head tracker?
    read about my various makings and doings: http://www.brandonfoltz.com
    kojack
    Honored Contributor
    March 24, 2014
    "jaywalker" wrote:
    Has anyone tried, or is it even feasable to send orientation information from something like a smart phone to emulate the behavior of a head tracker?

    Should work.

    I wrote the Ogre Oculus wrapper and a demo without owning a rift. I used a vuzix wrap 1200vr to do the head tracking and one of my pc's monitors as the display. I then sent copies of the demo to a forum member to test for me.
    Author: Oculus Monitor , Auto Oculus Touch , Forum Dark Mode , Phantom Touch Remover , X-Plane Fixer Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2, Quest 3
    Up and Coming
    March 24, 2014
    "jaywalker" wrote:
    Has anyone tried, or is it even feasable to send orientation information from something like a smart phone to emulate the behavior of a head tracker?


    Try FreePie
    Inspiring
    March 24, 2014
    "violarieger" wrote:
    Hey Jherico,

    thanks for your reply. I had a look on your example code and I managed to initialize the rift´s default values. But what still remainded unclear is how to handle the monitor if I do not have a rift connected.

    When I´m goning through your examples I´m always struggling at the point establishing a display with the glfwGedVideoMode-function. Could you give me a hint where I could more information to this?


    The Oculus SDK provides most of the information you need to initialize the output window on the Rift in a structure called OVR::HMDInfo. Specifically, this structure will include the 'desktop position' of the Rift display. For instance, on windows, if you've got a Rift connected and set directly above the primary monitor, then OVR::HMDInfo would probably tell you the desktop position is (0, -800), meaning the upper left corner of the Rift display is aligned with the upper left corner of the primary, and but that it's 800 pixels higher.

    In the absence of an actual Rift, my code just fills in the default values for the DK1, and also puts (0, 0) in the desktop position, so by default the Rift output would appear on the main monitor. However, in your case, what I suggest you should do (if you're using GLFW) is use glfwGetPrimaryMonitor to discover the primary monitor and then use glfwGetMonitors() to find an 'appropriate' monitor on which to display the output. In the case of a multi-monitor system, simply picking any monitor that isn't the primary and is at least 1280x800 in resolution would probably be sufficient. Make sure you use
    glfwWindowHint(GLFW_DECORATED, 0);
    to indicate that the window shouldn't have decorations such as a title bar, otherwise your drawable region will be slightly less than the window size.

    The use of glfwGetVideoMode is only ever done to determine the current resolution of a given monitor.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    March 26, 2014
    I agree it would be interesting to have a 'device emulation' from within the SDK, instead of having to write my own (which isn't a big deal really).
    DK1 FREAK ...
    Up and Coming
    March 26, 2014
    "Morpheox" wrote:
    "jaywalker" wrote:
    Has anyone tried, or is it even feasable to send orientation information from something like a smart phone to emulate the behavior of a head tracker?

    Try FreePie


    How does this work in Linux? I only briefly looked over it and saw that it's mainly targeting Windows.

    I'm considering writing an app for Android to send orientation sensor data over network to be collected by my program for a sort of head-tracker. Similar to "Wireless IMU" app, but that one doesn't track orientation directly (not sure if Android can, for that matter...).
    read about my various makings and doings: http://www.brandonfoltz.com
    New Participant
    March 31, 2014
    Which PC characteristics do you have?