Search Unity

Monoscopic VR Display

Discussion in 'Scripting' started by felt9099, Sep 22, 2019.

  1. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    Hello all -

    I'm a researcher looking to create a monoscopic display in VR (same image to each eye). I am using the SteamVR plug-in and have two cameras, one to each eye.

    The cameras are set to the exact same position and they preview the same image, but in the headset itself they still show two separate images.

    Am I missing something? Is there a way to get the same image to each eye?

    Thank you.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,726
    It might be some code in the VR middleware that is resetting your cameras. Did you try printing the camera positions at runtime and compare them to what you set at editor time? Did you try moving them back to the same point at runtime?

    You also might have better luck posting in the VR/XR/AR group in these forums.
     
  3. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    Thanks for the reply. Other sources seem to suggest it is the VR middleware at play - I can disable the middleware to stop the automatic switch back, but then can't use the VR which defeats the purpose.

    I crossposted this on the VR/XR/AR group as well. Will take suggestions where ever I can get them!
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,726
    I'm not even sure what the user would feel eyeball-wise if you duped the view left and right... I think it would be extremely jarring honestly, because of the mismatch between focus and convergence.
     
  5. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    It should be equivalent to staring at a television - the only stereoscopic cue missing would be convergence, so it (should) just look like a "flat" display. No stereoscopic cues.
     
  6. Anicrofmana

    Anicrofmana

    Joined:
    Sep 10, 2019
    Posts:
    27
    Hello,
    Have you found a solution to this ?
    I actually need to render the same image in both eyes using steamVR

    In the SteamVR.cs script, in the OnNewPose function, it was said you could set eyes[1] = eyes[0] to transform your render to a monoscopic render, but it doesn't work with me..

    Maaybe if you found the solution you could help me ?
    Thanks !
     
  7. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Can't you use two cameras, and tell each one to only produce an Image for one eye, then put the cameras in exactly the same place and orientation?
     
  8. Anicrofmana

    Anicrofmana

    Joined:
    Sep 10, 2019
    Posts:
    27
    It seems that even if you have two cameras, and you change the target eyes for each of them, they still see slightly different textures (even tho they have the exact same transform)

    EDIT : This is probably due to SteamVr doing his own buisness behind, but that's what we want to get through
     
  9. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    To answer your question above - I have not yet found a solution to this. I'd love to work together on it though as we have the same problem. Here is a source that I may use soon, it's about FOV but notes turning off the camera prefab could be a solution to assigning a separate camera to each eye as another poster suggested.
     
  10. Anicrofmana

    Anicrofmana

    Joined:
    Sep 10, 2019
    Posts:
    27
    I'm surprised it is not implemented yet in the SteamVR Plugin, since Oculus plugin has its own monoscopic boolean that works perfectly fine.
    I'm going to work further from the native SteamVR code, because I think that's where things should be tweaked. I'll keep you up to date, let me know if you get some good results !
     
  11. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    I'm surprised also - I figured it would be a checkbox toggle.

    I'll be returning to the problem this week and the next few weeks, if I find a solution I will be sure to report back. Would love it if you could do the same.
     
  12. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    Wanted to follow up here - have you found a solution?
     
  13. Anicrofmana

    Anicrofmana

    Joined:
    Sep 10, 2019
    Posts:
    27
    Unfortunately not, sorry :(
    I had to switch to another more important project since this one was stuck, but I'll have to go back to it eventually. I'll update this post once I find a solution, but it might take a while.
     
  14. Laetola

    Laetola

    Joined:
    Feb 18, 2019
    Posts:
    2
    Hi,

    I am working on the same problem and also for my research, in which I want to compare perceived speed with and without stereoscopic display in VR.

    I think I came a bit closer to a solution and was wondering if you may want to test it and tell me, if this is what we are all looking for:

    I duplicated the camera in the Steam VR camera rig and added an offset equivalent to the IPD set in the HMD in the x-position of the new camera (~-0.06). In the inspector in target eye, I set the original camera to render to the left and the new camera to the right eye. I now actually get the same picture to be rendered to both eyes. It looks right to me, but am I forgetting anything to take into account here?
     
  15. Anicrofmana

    Anicrofmana

    Joined:
    Sep 10, 2019
    Posts:
    27
    Hello,

    Rendering one camera in each eye, having these camera offseted from each other would result in a stereoscopic display, right ?
    I don't think I understand very well but I get the point : using 2 camera we could be able to decide where to put each camera.

    I'm going to try this out later :
    1) Having one camera render in each eye with an offset of 0.06 on the X axis, as you said. This should provide our typical stereo rendering.
    2) When switching to monoscopic, setting the position of the right camera the same as the right camera. This way, both cameras will render the same image, without having to tweak deep code (was that what you were saying ?)

    This might be a good solution for now but still, it would have to render twice, while monoscopic rendering usually renders once and provide the same rendering for both cameras.
    If one's application only relies on monoscopic rendering then it would waste resources I guess :/
     
  16. felt9099

    felt9099

    Joined:
    Feb 1, 2018
    Posts:
    36
    I'd be curious if it works for you, Anicrofmana, I have tried that solution (creating two cameras one to each eye) and they appear to "snap back" when wearing the HMD to the normal stereo display. In other words, it seems that the system (at least the Vive Pro) is overriding the change. Though, I was able to set the cameras very far apart on the x-axis (e.g., 10 meters apart) and it works - a clearly separate image to each eye. It's just when setting the cameras to the same position that it appears to snap back.

    Hopefully the above helps provide some clues going forward on this.
     
  17. Laetola

    Laetola

    Joined:
    Feb 18, 2019
    Posts:
    2
    What I meant to say was that you would place two cameras in the scene, but instead of placing them at the exact same position you would displace each by half of the interocular distance in the opposite (!) direction. So you would move the camera that renders only to the left eye by half the iod to the right and the camera that renders to the right eye by half the iod to the left.

    I think what it is doing otherwise is that as soon as you pick one eye only, the actual image that is rendered does not correspond to the actual camera position but to the theoretical position of the eye (which is half the iod away from the camera position). So you would correct this by moving each camera back to the centre.

    This appears to work for me to receice a monoscopic display, but I agree with Anicrofmana that a solution that does not require to render the same image twice would be preferable.
     
  18. Alexdass

    Alexdass

    Joined:
    Dec 6, 2023
    Posts:
    2
    can you tell me where I can toggle the option for monoscopic in Oculus plugin?
     
  19. Alexdass

    Alexdass

    Joined:
    Dec 6, 2023
    Posts:
    2
    I did some research, I compensate the position for left camera so both display show almost same image but that looks really weird. And when I watching a monoscopic 360 video, I realize even you are watching a monoscopic 360 video, the images are different for two eye. it's not about depth, just left eye see more left part and right eye see more right part. So I think in order to achieve monoscopic vr, same image for both eye is not the right way. But I haven't figure about how to do it correctly. Any updates?