Skip to main content
Participant
June 14, 2013

Different geometry rendered to each eye

Is it possible to have 2 pieces of geometry in Unity, and have each one only viewable from a single eye?
I do not have a rift to test, but am looking at ways to use one billboard for each eye, each with offset pre-rendered image that would represent a single 3D object when viewed through the rift.
    This topic has been closed for replies.

    31 replies

    Inspiring
    September 10, 2015
    The feature hasn't been merged to 5.2 yet. You can probably expect it to appear in 5.2 within the next 1-2 weeks.
    Up and Coming
    September 10, 2015
    Ah, ok thanks :)
    greetings from bavaria
    Up and Coming
    September 10, 2015
    "cybereality" wrote:
    I had the idea of stereoscopic billboards for a while now, but I haven't seen them used yet.

    Would be awesome if you got this working.

    OPamp and I were playing around with this concept in Unreal Engine. Here is a link to a Material BluePrint that can be used to do it. Having different geometry (or textures) in each eye can get headache inducing fast though. In my most uncomfortable scenario, I applied a stone texture to a cube in one eye, and a color-inverted version of that texture in the other. In some simple examples, the brain will add things together (so you can get some interesting mechanics); but using completely different textures != comfortable.
    Up and Coming
    September 16, 2015
    Did this get blown out of the water with V0.7?

    Currently Using Unity 5.2 and Oculus 0.7, and no options for target eye exist. I can do the double rig thing, but how does it know to do the IPD thing...
    Inspiring
    September 16, 2015
    No, the Target Eye option should still be on the way. To change the IPD, please adjust the local scale of your OVRCameraRig GameObject.
    Up and Coming
    September 19, 2015
    Wow this works like a charm. Thank you!

    Unity 5.2 and OVR utilities 0.1.0 DK2
    Participant
    October 13, 2015
    "cybereality" wrote:
    Yes, you can do it in Unity 5 with the Oculus Utilities. Here are the steps:

    - Import Oculus Utilities into your project (I'd start with a new project just for testing).
    - Comment out the foreach block (around line 179 - 189) in OVRCameraRig.cs.
    - Inside the Heirarchy, duplicate CenterEyeAnchor and name it CenterEyeAnchorLeft. Leave the original one alone.
    - Go in the CameraEyeAnchorLeft and set "Target Eye" to "left". Make the original "right"
    - Create two new layers "Camera Left" and "Camera Right".
    - Go in the culling mask for the camera component on CenterEyeAnchorLeft and deselect the "Camera Right" layer. Do the same for the original CenterEye (but with "Camera Left").
    - Make sure any stereo geometry is set to the proper layer. Meaning objects only visible in the left eye should have the layer of "Left Camera" or similar for the right.

    This will allow things like stereo textures, or displaying completely different objects in each eye.

    Hope that helps.


    Works brilliantly!
    Up and Coming
    October 19, 2015
    "cybereality" wrote:
    Yes, you can do it in Unity 5 with the Oculus Utilities. Here are the steps:

    - Import Oculus Utilities into your project (I'd start with a new project just for testing).
    - Comment out the foreach block (around line 179 - 189) in OVRCameraRig.cs.
    - Inside the Heirarchy, duplicate CenterEyeAnchor and name it CenterEyeAnchorLeft. Leave the original one alone.
    - Go in the CameraEyeAnchorLeft and set "Target Eye" to "left". Make the original "right"
    - Create two new layers "Camera Left" and "Camera Right".
    - Go in the culling mask for the camera component on CenterEyeAnchorLeft and deselect the "Camera Right" layer. Do the same for the original CenterEye (but with "Camera Left").
    - Make sure any stereo geometry is set to the proper layer. Meaning objects only visible in the left eye should have the layer of "Left Camera" or similar for the right.

    This will allow things like stereo textures, or displaying completely different objects in each eye.

    Hope that helps.


    Thank you for that. However, in order to make things more usable, I added cameras to the LeftEyeAnchor and RightEyeAnchor and refactored the OVRCameraRig.cs script so that the OVRCameraRig.leftEyeCamera and OVRCameraRig.rightEyeCamera return the actual left and right cameras.

    I let the camera on the CenterEyeAnchor with rendering disabled just for Unity UI picking purpose.
    October 21, 2015
    Using 5.2 I've just duplicated the main camera. Named one left camera and other right camera.
    Set Left and Right Target Eye in Camera inspector to match.
    Then add Left and Right layers.
    Then set Culling to match in Camera inspector of each camera.

    Seems to be working fine but wondering if I need to go through the other steps outlines above.

    >> Comment out the foreach block (around line 179 - 189) in OVRCameraRig.cs.
    >> Inside the Heirarchy, duplicate CenterEyeAnchor and name it CenterEyeAnchorLeft. Leave the original one alone.
    Inspiring
    December 29, 2015
    Is it possible to apply this approach with duplicating cameras to Unity's native VR (without using Oculus Utils) and player's controller from Unity's VR samples?