Skip to main content
Up and Coming
June 10, 2013

IPD settings and key mapping

Hi

I can't find which file contains the 0.064 IPD except the CameraController.cs file but even if I change the IPD value in this file and buid the project, when I press the space bar in the demo the default value is STILL 0.064 !!

Searching the whole project I can't find any other file with the 0.064 value.

Moreover I can't decrease the IPD value, just increase it with the =/+ key (it's a french keyboard).

So where is the file containing the piece of code telling which key is assigned to the IPD increase/decrease please ?

thanks

Cyril
    This topic has been closed for replies.

    21 replies

    Inspiring
    June 19, 2013
    It may just be an issue of the editor taking precedence over the default value in code.

    Have you tried changing the IPD within the editor?
    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
    June 19, 2013
    I'm not seeing an IPD setting int he inspector. You can set the Eye Center Position, but not the IPD.
    Inspiring
    June 19, 2013
    Ah, yes. The IPD is private, I was looking at the test IPD variables I added.
    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
    cyril3dAuthor
    Up and Coming
    June 21, 2013
    Ok, I modified the unity script to map new keys to increase and decrease the IPD. Now in my rebuilt tuscany demo I can increase and decrease the IPD.

    ... or so I thought since the HUD displays modified IPD but the 3D simulation doesn't change!

    I can't see any difference with a IPD of 20 mm or 80 mm !!!

    My initial guess was that thsi IPD value is not used in the simulation but other people on the forums claimed modyfing the IPD helped them accepting the demo and reducing the nausea.

    any idea please?

    thanks

    cyril
    Up and Coming
    June 21, 2013
    I don't want to make too broad an assumption, but I'm willing to bet its psychosomatic in some cases (people feeling an improvement, but no real change having taken place). Three of us have tried to fix the problem through code and we've all encountered the same issue, so I think it's safe to call it a potential bug in the current OVR Unity implementation.

    I'm not sure if posting in this forum is the best way to report it, or if there's a more formal way. I'll investigate :-)
    Inspiring
    June 22, 2013
    Ok, I found out whats going on.

    You have to use a function called "SetIPD()" in OVRCameraController. Just setting the value manually will not work.
    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
    June 22, 2013
    No luck with SetIPD() either. SetIPD() is changing the same unchangeable variable in OVRCameraController. I tried using it on a delay, in case some other Start code was overwriting it. Here's the little test script I used, if you want to experiment (add to an empty, select your OVRCameraController in the inspector):

    using UnityEngine;
    using System.Collections;

    public class IPDSetter : MonoBehaviour {

    public OVRCameraController ovrCam;
    public float myIPD = 100.0f;
    public float setWait = 5.0f;

    // Use this for initialization
    void Start () {

    StartCoroutine(NewIPD(myIPD));
    }

    IEnumerator NewIPD(float ipd)
    {
    WaitForSeconds wait = new WaitForSeconds(setWait);
    yield return wait;
    print ("Setting IPD to " + ipd.ToString());
    ovrCam.SetIPD(ipd);
    }
    }


    Sorry to harp on this, just seems pretty critical to the Rift/Unity implementation.
    Participant
    June 22, 2013
    I've just done some tests on my laptop and everything works on my side.
    I can change IPD using '=' and "-" (see video).




    @cyril3d : I had the same problem with azerty keyboard. Another solution (if you don't want to modify OVR scripts) is to temporarily switch the keyboard in QWERTY mode when you want to do the setup and then register the settings which you can retrieve later with "Fx" keys (that you can use in AZERTY mode).

    @CosbyTron I've tested your script and it works on my side. Cameras are spaced after a delay.
    Which version of the unity package do you use ? On my side, I've done the tests with 0.2.2. There is some modifications in the use of IPD between 0.1.5 and 0.2.2. May be it could explain that we have different results.
    Up and Coming
    June 24, 2013
    Thanks Laurent! Turns out I had failed to back out some changes I made when I was testing the original problem that were preventing SetIPD from working.

    Thanks all! Sorry for hitting the panic button. The initial problem is still weird, but so long as SetIPD works, I'm a happy camper :-)
    Participant
    June 24, 2013
    "CosbyTron" wrote:
    Thanks Laurent! Turns out I had failed to back out some changes I made when I was testing the original problem that were preventing SetIPD from working.

    Thanks all! Sorry for hitting the panic button. The initial problem is still weird, but so long as SetIPD works, I'm a happy camper :-)

    No problem. Glad to know that it works on your side.