Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Different content in each eye

Discussion in 'AR/VR (XR) Discussion' started by BigRedSwitch, Jun 11, 2015.

  1. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    35
    Hi, a related question to this, is there a way to render/overlay different content to each eye in Unity 5.6 with single-pass stereo mode?

    I can make this work with multi pass no problems, but just wondering: suppose I would want to draw a simple red box onto the image to the top corner of the left eye and a blue circle in the top corner of the right eye, any way to do this? (I haven't been successful with this with my own attempts - I get this weird duplicate/split screen effect with my attempts.)
     
  2. Selzier

    Selzier

    Joined:
    Sep 23, 2014
    Posts:
    652
    Doesn't this solution require Oculus Utilities?
    Edit: No, the 'Target Eye' option becomes available when Virtual Reality Supported in enabled in the build settings.
     
    Last edited: Apr 14, 2017
  3. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    I tried the dual camera setup in Unity 2017 with SteamVR and all I get is spammed with the error:

    Assertion failed: Assertion failed on expression: 'IsMatrixValid(matrix)'

    I have read that people just deal with it, but that sounds kinda lame IMO.
     
  4. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
    Thanks for calling this out, it motivated me to go fix the issue. Submitted a fix today. It should land in the next releases of 2017.2, 2017.1 and 5.6 over the coming weeks.
     
    CloudyVR and Selzier like this.
  5. dmelesse

    dmelesse

    Joined:
    Oct 11, 2017
    Posts:
    1
    Is there a way to have different content in each eye using Samsung GearVR?

    Thanks!
     
  6. CloudyVR

    CloudyVR

    Joined:
    Mar 26, 2017
    Posts:
    709
    Check out my Stationary Stereo Camera example on GitHub. It may not be what you need but it does demonstrate how to use rendertextures from two separate camera sources that are then rendered as the L and R eye on the main stereo vr camera.

    The render textures could come from any source, so the example might be useful for displaying other kinds of content as long as you can create the rendertextures.
     
  7. technorocker

    technorocker

    Joined:
    Jun 7, 2018
    Posts:
    10
    I know this is an old thread but this is the closest description of what I'm trying to accomplish that I've seen in the past 3 months I've been trying to figure out my problem. I too am looking to to render different images in different cameras. My problem though is that I have a "scenery camera" for a monitor and also camera for the fps Player Camera view.

    In my project I'm trying some new idea where the Scenery camera has a clipping range from 3-1000 where the Player view has a clipping range of 0.2-3 I'm trying to find a way to seamlessly transfer the level objects from the far camera into the close camera view. Basically not have gameobjects show up in both cameras when the frustrum paths cross.

    Ive new to Unity( Just over a year) so I'm not sure if this is possible for not. Like I mentioned, I've spent the past few months trying to learn shaders or trying different culling and layer techniques people have shared on the internet but have yet to find a solution to check one cameras view and remove it from another cameras view.

    Thanks for any help or assistance, even if its telling me its not possible yet.
     
  8. thep3000

    thep3000

    Unity Technologies

    Joined:
    Aug 9, 2013
    Posts:
    399
    An idea: Attach a script with an OnWillRenderObject algorithm which checks which camera the object is being rendered with and then moves the object to a layer that the other camera won't render.
     
    CloudyVR likes this.
  9. JeltzProstetnic

    JeltzProstetnic

    Joined:
    Dec 3, 2018
    Posts:
    4
    Is the VideoPlayer component at some point in time going to support 3D SBS Videos? (this is what landed me on this thread - I was surprised to find out that the videoplayer plays holographic VR Videos but no old style SBS 3D videos / movies.)

    If not, is any of the methods described in this thread going to help me with this? I am currently using the legacy OpenVR system in the most recent Unit build.