Skip to main content
Up and Coming
November 9, 2015

Change/Override Camera IPD/onterocular

Hi,

does anyone know how I can manually change or override the IPD/interocular of a camera in Unreal?
If I don't want to use what is being set in the user prefs.
Ie I want to alter the distance between the two cameras in the stereo pair.

Cheers
Fred
    This topic has been closed for replies.

    12 replies

    Inspiring
    November 9, 2015
    The best solution here is almost always to change the scale of the actor that your VR camera is attached to. That will ensure the IPD, head tracking, and FOV correspond and don't make the user uncomfortable.
    FredrumAuthor
    Up and Coming
    November 9, 2015
    Heh but I don't want to do that! :) I want to be able to control the interocular myself to make the user feel a different size.
    I always found it surprising that ipd changes was said to cause discomfort as why would feeling of size do that? I could scale my whole scene and leave the camera to the same effect and player should just feel smaller or larger. I myself is very sensitive to at least motion/vr sickeness and visual imperfections and have not felt weird before when I have cheated the ipd for that effect.

    Anyhows :) is it possible to do in blueprints?

    Cheers
    Fred
    Inspiring
    November 9, 2015
    Scaling the camera will make the user feel like the size you scale to. If you only scale the IPD and not the whole camera, it will make the position tracking data (or head model if you don't have position data) seem off. The effect is subtle, but after several minutes of play, some people (not VR developers!) will feel nauseous. The scale is on the Transform component next to the Camera Settings.
    FredrumAuthor
    Up and Coming
    November 9, 2015
    Cool that could work better, to scale the camera and not the whole owning character.
    So the follow up question would then be is there a way to currently get hold of the Config IPD settings? So that I can normalize my change to this?

    I know there is a make/break HmdUserProfile but I haven't seen a 'Get' HmdUserProfile to see what data comes from the User config?

    Cheers
    Fred
    Inspiring
    November 9, 2015
    The default value is 0.064. You probably want to set your scale based on that rather than scaling to a slightly different value for each user. However the stereo level and other head model settings are exposed as describe here: https://wiki.unrealengine.com/Oculus_Rift.
    FredrumAuthor
    Up and Coming
    November 9, 2015
    Ah yes that page thanks for reminding me!
    Time to read through properly now then. :)

    Thanks for your help.
    Cheers
    Fred
    FredrumAuthor
    Up and Coming
    November 9, 2015
    Hmm...I just tried scaling my camera component but with no change happening to the stereo separation/interocular.
    Was that what you meant I should be able to do? Alter the cameras scale in its Transform tab?
    Up and Coming
    November 12, 2015
    Unfortunately, camera scale is not taken into account currently. There was an attempt to fix it in the past (github branch 4.7-np in Oculus-VR) but Epic guys declined that change. They are working on Camera Component that should fix the issue (hopefully, in 4.11).
    You also can't change IPD, this is wrong to change JUST IPD. Whole head model / eye position should be scaled accordingly.
    Up and Coming
    November 13, 2015
    You can change the scale in UE4 by setting the world settings units to meters scale. This is supposed to affect all physically measured values such as IPD and head position, giving you the feeling that you are bigger or smaller. I'm not sure if it can be adjusted at runtime though.
    FredrumAuthor
    Up and Coming
    November 17, 2015
    Hmm shame it doesn't work.
    I would not like to change the whole scale/unit representation of the game as that sounds hacky and will probably mess with things like physics dynamics, particles and forces etc. That was always the problem when changing scene scale in Maya.
    I am doing a sort of 'possession' mechanic with different sized entities so it would have to be done on runtime.
    Having said that what I have been using for a while now with Not changing the scale actually works out well and might actually be what I want. It would be great to have to option to experiment with inbetweens though.

    Cheers
    Fred