Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

How to configure a stereo (side-by-side) rendering?

Discussion in 'Vuforia' started by joewang0112, Feb 13, 2018.

  1. joewang0112


    Dec 19, 2016
    Hello everyone,

    I'm trying to configure the Vuforia ARCamera for a stereo (side-by-side) rendering on Windows UWP, but I failed with only mono rendering or black screen.
    I've already followed the instructions from the website

    • Software:
      • Unity 2017.3.1f1 Personal (64- bit)
      • Vuforia SDK 7.0.47 => Free Development License Key
      • Windows 10.0.16299
    • Hardware:
      • PC/Laptop + Ordinary UVC (USB Video Class) Webcam
    I suppose both "Digital Eyewear" and "Phone + Viewer" device types shall have a stereo rendering of my webcam video, but they are all failed. In addition, I don't see any error messages in the Unity Console.

    Here are the details,
    1. I configure the Digital Eyewear -> Device Type as "Digital Eyewear", and configure the Digital Eyewear -> Device Config as "Vuforia". However, I didn't see a stereo (side-by-side) rendering on "Unity Editor" after pressing the "Play" button. There is only mono screen rendering of my webcam video. It is just like the attached image file (Capture_UnityEditor.png). Besides, the built UWP application is mono screen rending (NOT side-by-side), too.
    2. I configure the Digital Eyewear -> Device Type as "Phone + Viewer", and configure the Digital Eyewear -> Viewer Config as "Vuforia", and tried every Digital Eyewear -> "Viewer Type" (Generic Cardboard, VR ONE, VR Googles, C1-Glass, Cardboard v1). However, I still didn't see a stereo (side-by-side) rendering on "Unity Editor" after pressing "Play" button. It is a "black screen". The built UWP application is a black screen, too.

    Any hints are very welcome!
    Thanks a lot.

    Attached Files:

    marcozakaria likes this.
  2. Vuforia-Strasza


    Official Vuforia Employee Vuforia

    Jun 13, 2017
    Hi Joe,

    Have checked out our Stereo Rendering sample on the Unity Asset Store? This provides a good starting point for this type of project.

    What device are you deploying your UWP application to? If you are trying to run it with an external webcam you will encounter a black screen as this is not supported.

  3. joewang0112


    Dec 19, 2016
    Hi Strasza,

    Thanks for your reply.

    We're temporarily using PC + Webcam for testing, so I deploy the UWP to Local PC machine.

    But our actual target is to use a Optical See-through Head Mount Display with PC (Not in Vuforia supported device list yet). I know there is probably a calibration issue, but this is just a proof of concept to verify "Stereo Optical See-through + Vuforia AR" works.

    After I re-configured the order of Virtual Reality SDKs in XR Setting (Vuforia prior to Windows Mixed Reality), the Unity Editor can preview the stereo side-by-side rendering now (by "Digital Eyewear device type). Since we're targeting to Optical See-through AR, so I disabled the webcam video background in the ARCamera configuration. So It looks like the attached picture - "Unity_Editor_Stereo_SeeThrough.png".

    However, when I actually build the UWP App, the App becomes "mono rendering" again. It looks like the attached picture - "UWP_Mono_SeeThrough.png".

    Could you advise any options to make it stereo as in Unity Editor ?

    I also tried "Phone + Viewer" Device Type. The built out UWP App can show the side-by-side video, but the visible area shrinks to very small and only in the bottom of the window. This It is not as we expected, either. Please see the attached pictures - "CardBoard_Video.png & CardBoard_SeeThrough.png".
    CardBoard_Video.PNG CardBoard_SeeThrough.PNG

    Could you advise any options to make the visible area correct (scale / fit the window)?

    Many thanks!

    marcozakaria likes this.
  4. joewang0112


    Dec 19, 2016
    Hello everyone,

    I'd like to describe more details about my steps for the stereo rendering, and hope someone can give me some hints to fix it.

    1. Download and import the Vuforia Digital Eyewear Sample / Assets, and configure the "Device Type" as "Digital Eyewear" & "Device Config" as "Vuforia. It's like the following picture:

    2. Configure the "PlayerSettings -> XR Settings":
    • Enable both "Virtual Reality Supported" and "Vuforia Augmented Reality Supported"
    • Choose "Vuforia" in the Virtual Reality SDKs list. Besides, I also removed other SDKs, e.g., Windows Mixed Reality.
    • Build out the Visual Studio project of UWP App
    It's like the following picture:

    3. Press the "Play" button in "Unity Editor" mode, there's a stereo rendering video preview of the webcam in the "Game" window. It is as the following picture:

    4. Configure the Visual Studio project as "Release/x64/Local Machine", and then build / deploy the UWP App.

    5. Run the deployed UWP App, and it will only show a "mono rendering" ....It's not as side-by-side as in the Unity Editor

    Could anyone advise any options to let UWP App have a stereo rendering as in Unity Editor ?
    Thank you very much.

    Last edited: Mar 14, 2018
    SnakeMars likes this.