The Meta 2 SDK provides a video feed containing both the virtual content in the running scene and the real world as seen by the Meta 2’s RGB camera. It also provides a feed with only the RGB camera.

The Meta Webcam system allows external applications to see the live feed. For example, you can select the Meta2 Webcam + Holographic Overlay for use with Open Broadcaster Software. This functionality is implemented as a DirectShow video source filter.

Enabling or Disabling the Meta Webcam

Warning: Enabling this functionality may adversely affect performance.

On the Meta Compositor component of the MetaCameraRig, check the Enable Webcam checkbox to enable the webcam, or clear the checkbox to disable it.

Meta Webcam Component

Video Streams

The Meta 2 exposes two webcam streams. These appear to Windows and to some video applications as webcam devices just like a physical webcam does.

  • Meta2 Webcam + Holographic Overlay - This video stream composes both the Meta 2’s RGB camera feed as well as virtual objects which are seen in the headset. This is useful for recording video “through” the Meta 2, particularly while a user is actually wearing it.
  • Meta2 Webcam - This video stream contains only the Meta 2’s RGB camera feed without any virtual objects.

Note: Some software, such as Skype, does not support Windows’ DirectShow video filters and thus cannot use the Webcam functionality.

Warning: Viewing more than one of each of these camera streams concurrently is not supported.

Changing the Visibility of GameObjects

You can make a GameObject invisible in the webcam (but still visible in the headset) by setting it on a layer which the ContentCamera does not render.

  1. In the scene Hierarchy, select the GameObject you want to make invisible in the webcam.
  2. In the inspector, under the Layer drop-down menu, select Add Layer….
  3. Add a new user layer and name it Invisible (you can choose any name as long as it is not already in use).
  4. Select the GameObject to be made invisible again.
  5. In the inspector, under the Layer drop-down menu, select Invisible.
  6. Locate the ContentCamera GameObject on the MetaCameraRig.
  7. Under the Camera component, locate the Culling Mask field and click it.
  8. Click the Invisible item to uncheck it and close the menu. Culling Mask should now read Mixed....

To make the object visible again, simply change its layer to one which is checked in the ContentCamera’s culling mask, or change the ContentCamera’s culling mask to include all relevant layers.

See Unity Layers for more information about layer setup.

Fixing Rendering Issues for Transparent Objects

There have been changes made to the how the Virtual Webcam image is composited. The webcam texture now arrives after the texture containing the rendering of the scene. It is important that the alpha channel of the frame buffer is maintained to be coherent because it will be used to blend the webcam image into it. There are certain shaders (typically additive shaders) that will write alpha to the frame buffer when it is not necessary. To avoid this in Unity shaders, switch to using the four-value variant of the Blend operation, and do not carry over the alpha value for the object being rendered. For instance, Blend <a> <b>, Zero One , leaving <a> and <b> as they were. Read more about blending here.

The image below illustrates how the alpha channel and the webcam composite may look if the correction has not been applied.


In the next image, the correction has been applied.