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

    joewang0112

    Joined:
    Dec 19, 2016
    Posts:
    3
    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 https://library.vuforia.com/articles/Solution/Working-with-Digital-Eyewear-in-Unity.html.

    [Environment]:
    • 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.
    Sincerely,
    Joe
     

    Attached Files:

    marcozakaria likes this.
  2. Vuforia-Strasza

    Vuforia-Strasza

    Official Vuforia Employee Vuforia

    Joined:
    Jun 13, 2017
    Posts:
    548
    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.

    Thanks
     
  3. joewang0112

    joewang0112

    Joined:
    Dec 19, 2016
    Posts:
    3
    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".
    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".
    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!

    Regards,
    Joe
     
    marcozakaria likes this.
  4. joewang0112

    joewang0112

    Joined:
    Dec 19, 2016
    Posts:
    3
    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:
    Capture1.PNG

    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:
    Capture3.png

    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:
    Capture2.PNG


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

    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
    Capture5.PNG

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

    Sincerely,
    Joe
     
    Last edited: Mar 14, 2018
    SnakeMars likes this.