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. Dismiss Notice

Stereo image sequence as texture (for use with oculus rift)

Discussion in 'Editor & General Support' started by Sannyasi, Jan 9, 2014.

  1. Sannyasi

    Sannyasi

    Joined:
    Nov 20, 2012
    Posts:
    36
    So I'm trying to accomplish something with the oculus rift, similar to the vr-cinema demo (see Avatar vr-cinema )

    What I will have is a left and right eye image sequence that should be used as a texture on a virtual screen.
    I currently have this working as an anaglyph stereo image mapped as a texture.

    What I need...
    1. Render the screen geometry with the left image through the left camera.
    2. Render the screen geometry with the right image through the right camera.
    3. Apply lens distortion ala oculus sdk to each (render texture i assume)
    4. Composite the left and right image into a side by side image for viewing on the oculus rift.

    This needs to happen per frame, ie change textures between rendering of left and right cameras.
    Is this even possible?
    Would this be a shader, or would this be doable in a monobehaviour?

    A work around (although not as convenient in the editor) would be to duplicate the object and use the camera culling mask to render the correct screen for each camera only.

    I'd like to find a more elegant solution if possible
    Thanks


    Unity 4.3.2f1 Pro
    Windows 7 x64
     
  2. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    Did you have any luck? I would like to know this too.
     
  3. eagleeyez

    eagleeyez

    Joined:
    Mar 21, 2013
    Posts:
    406
    Did you have any luck? I would like to know this too.
     
  4. Parallax

    Parallax

    Joined:
    May 23, 2015
    Posts:
    39
    Ditto
     
  5. telferman

    telferman

    Joined:
    Jan 25, 2016
    Posts:
    35
    did you find a solution? i have a job in that requires what you're asking