Skip to main content
Up and Coming
December 13, 2013

GameObject stereoscopically distorted if too close to Camera

Hello Rifters,

I have a GameObject (the lipstick) set very close to the camera. I am able to rotate the lipstick via head movement. However, when due to rotation the lipstick comes very close to the camera stereoscopic distortion happens. This starts barely noticeable but becomes more intense the closer the GameObject gets to the camera. In the Rift this feels as if the lipstick has two instances that overlap. "Near Clipping Plane" is 0.01.

I attached a screenshot of the issue in action.

How can I go about the distortion?

Thanks very much.
    This topic has been closed for replies.

    15 replies

    Inspiring
    December 13, 2013
    I believe this is totally normal.

    For example, place your index finger in front of your eyes and then focus on something far in the background (in real life).

    You will see this same "doubling" effect.
    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
    smxAuthor
    Up and Coming
    December 13, 2013
    You are right. I made that experiment.

    But I don't want that effect. Do you have an idea how to make that happen?

    The only thing I can imagine is scaling the object up instead of moving it close to the camera but then the scale would interfere with other objects.
    Up and Coming
    December 13, 2013
    You should mess around with IPD and FOV settings. FOV defines parallax fallof, IPD defines convergence at a unit distance.

    Doing it right, you should set IPD to be exactly user's IPD in game units (i.e. if your virtual unit is 3 meters then you divide users' IPD by 3) and use FOV from the device.
    Inspiring
    December 13, 2013
    Please don't try to "cheat". You will end up ruining the stereoscopic effect.
    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
    December 13, 2013
    If you don't want objects to sit inside the range where your eyes have trouble converging them, then you can adjust the near clipping plane. As long as you don't mind objects getting sliced.
    Up and Coming
    December 13, 2013
    Or, if it doesn't make you (or your players) sick you can narrowen the IPD.
    Up and Coming
    December 14, 2013
    This kind of stuff will probably require eye tracking to do right. Luckily, I read that Oculus is looking into eye tracking :D
    smxAuthor
    Up and Coming
    December 14, 2013
    "raidho36" wrote:
    You should mess around with IPD and FOV settings. FOV defines parallax fallof, IPD defines convergence at a unit distance.

    Doing it right, you should set IPD to be exactly user's IPD in game units (i.e. if your virtual unit is 3 meters then you divide users' IPD by 3) and use FOV from the device.


    I understand that this could then alter the stereoscopic effect for the whole scene? I would like to only break the stereoscopic effect for those particular GameObjects that come very close to the camera. My project has a fixed camera and only three objects, the lipstick being one of them, will ever possibly get that close.

    "brantlew" wrote:
    If you don't want objects to sit inside the range where your eyes have trouble converging them, then you can adjust the near clipping plane. As long as you don't mind objects getting sliced.


    But then the lipstick would be sliced and not fully rendered. This is exactly what I don't want. :P

    "cybereality" wrote:
    Please don't try to "cheat". You will end up ruining the stereoscopic effect.


    Isn't it possible to only break the stereoscopic rendering for dedicated objects? As in having two instances of the lipstick and render only one instance in CameraLeft and the other one respectively. And Transform "negatively" according to the stereoscopic algorithm? Do I have direct access to that math?


    "boone188" wrote:
    This kind of stuff will probably require eye tracking to do right. Luckily, I read that Oculus is looking into eye tracking :D


    I hope they are. I have a list of a few incredibly cool eye-tracking based features for multiplayer VR film experiences.
    Inspiring
    December 14, 2013
    "smx" wrote:
    Isn't it possible to only break the stereoscopic rendering for dedicated objects? As in having two instances of the lipstick and render only one instance in CameraLeft and the other one respectively. And Transform "negatively" according to the stereoscopic algorithm? Do I have direct access to that math?.


    To "break stereoscopic rendering", I think what you're asking to do is render the foreground object at infinite distance on top of the background, but with a size you'd expect of an object that's actually close to you. It doesn't sound comfortable for your average player to reconcile this strange depth reversal, but if that's what you really want to do, maybe you could try having another OVRCameraController with an artificially low IPD (at or near zero) that renders only the lipstick, and it renders after the rest of the cameras do their work?
    Titans of Space PLUS for Quest is now available on DrashVR.com
    December 15, 2013
    Hmm, if did set up something to swap out its render layer when it gets too close you'd have to figure out a transition. It'd probably snap pretty bad going between the renders on the different types of cameras.

    As a simple test it shouldn't be too hard to set up a little script with a distance check against the lipstick object and then a quick layer switch as it moves close/far.