Search Unity

Video capture (3D not 360) for stereoscopic goggles

Discussion in 'AR/VR (XR) Discussion' started by Kaylhan, Jul 9, 2018.

  1. Kaylhan

    Kaylhan

    Joined:
    Jan 31, 2018
    Posts:
    4
    Hi,

    I'm designing an fMRI experiment and I created a virtual environment with Unity3d 2017.3 that I would like to screen to the participants in the scanner using stereoscopic goggles. I'm quite new to C# and Unity, so I figured out that the simplest way for me was to capture videos of this environment, so I can play them later to the participants, (without delays, in a timed manner, using Matlab).
    Given that I use "old-school" stereoscopic goggles (basically two low resolution screens, one for each eye), I need to capture stereo videos, not in 360, but just in "flat" mode, like at a movie theater (for example left-right 2048*768 or top-bottom 1024*1536), that would keep the 3D depth. For now I just have one main camera for the scene.

    I've seen a lot of assets (also the new Unity 2018.1 feature) capturing 360 stereo videos but so far I didn't find any dealing with also non-360 stereo videos. I tried VR Capture from RockVR (free version), with the following parameters:
    - Format: Normal
    - Stereo format: Left-right
    - Stereo format type: Full
    - inter-pupillary distance: 0.0635
    - no dedicated camera

    But what it seems to me to do is capturing one video from the main camera and then duplicate it a second time for the second eye, so it's not "real" stereo and doesn't give me 3D videos at the end. But maybe I'm using it wrong?
    Is there somebody that have experience with this or know an asset that does this particular job?
    Do I have to set two different cameras (one for each eye) instead of just one main camera, and then try to capture from the two of them?

    Sorry if my post is not precise enough, it's my first post, and of course I would be happy to complete any missing piece of info.

    Thanks in advance for the help!
    Antonin
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    8,471
    Yes, if you want actual stereo video, I see no alternative to using a stereo camera.

    I've heard good things about the Lenovo Mirago camera.
     
  3. Kaylhan

    Kaylhan

    Joined:
    Jan 31, 2018
    Posts:
    4
    Thanks for the answer! Sorry I was not talking about an actual physical camera, but the one in the Unity3D editor. I need to record some scene of the virtual environment I modeled with Unity3D, when in editor mode.
     
  4. i4mtheone

    i4mtheone

    Joined:
    May 16, 2018
    Posts:
    9
    Hi there!

    You can do this using Unity Recorder from AssetStore

    https://assetstore.unity.com/packages/essentials/beta-projects/recorder-94079

    Create two cameras in your scene, and set position of the second one to 0.0665 (ideally create a virtual camera rig with parent at 0 and two child cameras set half the IP to both sides, you can then make fly animations on parent and it'll keep stereo)

    Then use their viewport rects to get your stereo format i.e for top bottom

    CamL
    X = 0 / Y = 0
    W = 1 / H = 0.5
    CamR
    X = 0 / Y = 0.5
    W = 1 / H = 0.5

    Remember to also set the display ratio for your desired resolution, then simply open the Recorder asset window and hit record.

    [edit]
    img does not display, here's the url
    https://pasteboard.co/HtN8Tgm.png
     
    Last edited: Jul 10, 2018
  5. Kaylhan

    Kaylhan

    Joined:
    Jan 31, 2018
    Posts:
    4
    Thanks for the help! I will try that and get back to you.
     
  6. Kaylhan

    Kaylhan

    Joined:
    Jan 31, 2018
    Posts:
    4
    Does exactly what I wanted! Thanks again!
     
  7. artofmining

    artofmining

    Joined:
    May 1, 2016
    Posts:
    31
    Hi
    This is something I could really do with using as I have a Unity system that I am desiging to streamline animation film making. There's an occasional need to record stereoscopic video (anaglyph) for use with traditional 3d glasses (red/cyan).
    Could you explain a little clearer how to implement the camera(s). I currently use a single cam with Unity Recorder with Capture set to game view. I'm mildly confused on how to set it up.
    Nvidia drivers no longer support 3D output so I can't go that way.

    Many thanks
    Archie
     
unityunity