Blend Control Mask API

General

The Blend Control Mask API allows a client to submit a masking layer that is used to control the blending between video see-through and application layer images.

Blend Control Mask can be used to extend or restrict the chroma-key mask or to control the depth testing against the estimated video depth. The mask layer can be provided either with the main application layer or as a separate rendering application for masking alone.

Masking modes:

Restricted

Extended

  • Show VR in the mask. (inverse of restricted mode)
  • Can be used with chroma key.
  • Example basic case: Show the real world outside of a virtual cockpit.
  • Example chroma case: Mask out the ceiling of a green room in a chroma key room.

Reduced

  • Show VST in the mask and chroma elsewhere.
  • Requires chroma key.
  • Example case: Mask out monitor in a chroma room.

Depth Test or VST

  • Perform video depth test in the mask and show VST elsewhere.
  • Requires video depth test.
  • Example case: Embed virtual objects to a spesific area in the real world.

Depth Test or VR

  • Perform video depth test in the mask and show VR elsewhere.
  • Requires a video depth test.
  • Example case: Show real-life co-pilot in a two-seated vehicle.

Example

See MaskingTool in the examples folder of the experimental SDK for information on how to implement masking in your own client application. The example application shows how to render the mask to the texture buffer and submit it to Varjo Compositor, either to mask the video pass-through image or to restrict or extend the chroma key mask. The example application uses simple plane shapes, but you can easily extend it to render more complex shapes. For optimal performance, it is preferred to submit the blend control mask from the rendering VR application rather than from a separate process.

Chroma Key Masking API

The Blend Control Mask API deprecates the previously available experimental Chroma Key Masking API.