Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Passthrough


Extension introduces

XR_HTC_passthrough allows developers to create an application with Passthrough (Underlay for now). Passthrough Underlay is a feature that shows passthrough image under content layer.

Supported Platforms and devices

Platform Headset Supported
PC PC Streaming Focus3/ XR Elite X
Pure PC Vive Cosmos X
Vive Pro series X
AIO Focus3/ XR Elite V


Enable Plugins

  1. Edit > Plugins > Search for OpenXR and ViveOpenXR and make sure they are enabled.
  2. Note that the " SteamVR " and " OculusVR " plugin must be disabled for OpenXR to work.
  3. Restart the engine for the changes to take effect.


How to use OpenXR Passthrough Unreal Feature

  1. Please make sure ViveOpenXR is enabled.
  2. Edit > Project Settings > Plugins > Vive OpenXR > Click Enable Passthrough under Passthrough to enable OpenXR Passthrough extension.
  3. Restart the engine to apply new settings after clicking Enable Passthrough.
  4. For the available Passthrough functions, please refer to ViveOpenXRAndroidPassthroughFunctionLibrary.cpp.
  5. Passthrough Blueprint functions.
    Type Passthrough to get the Passthrough blueprint functions your content needs.

    1. Create Passthrough Underlay

      Use this function to create a Passthrough Underlay .
      The InPassthroughLayerForm parameter specifies the type of Passthrough Underlay to be created.
      Planar: a full screen passthrough that covers the entire FOV.
      Projected: a passthrough only covers part of the FOV, in which the area is determined by a custom mesh and its transform.

    2. Destroy Passthrough Underlay

      Use this function to destroy any Passthrough Underlay created previously.

    3. Is Passthrough Enabled

      Use this function to check if the Passthrough feature is enabled or not.

    4. Set Passthrough Alpha

      Use this function to set the opacity of the Passthrough Underlay.
      The “alpha” parameter specifies the target opacity (Clamped to range [0,1]).

    5. Set Passthrough Mesh

      Use this function to specify the mesh data of the customized mesh for Projected Passthrough Underlay.
      vertices ” specifies the vertices of the mesh.
      indices ” specifies the triangle indices of the mesh.
      Note: If you derive vertices and indices from GetSectionfromStaticMesh.

      Please make sure the setting Allow CPUAccess of the static mesh which In Mesh referenced is enabled . The setting is at Details > Advanced of the static mesh asset.

    6. Set Passthrough Mesh Transform

      Use this function to set the space type and the transformation of the mesh to be used by Projected Passthrough Underlay.

      ” meshSpaceType ” specifies the XrSpace configuration to be used by Projected Passthrough Underlay, which is defined as follows:

    7. Set Passthrough Mesh Transform Location

      Use this function to set the scale of the Projected Passthrough Underlay.

    8. Set Passthrough Mesh Transform Rotation

      Use this function to set the orientation of the Projected Passthrough Underlay.

    9. Set Passthrough Mesh Transform Scale

      Use this function to set the scale of the Projected Passthrough Underlay.

    10. Set Passthrough Mesh Transform Space

      Use this function to set the space type to be used by Projected Passthrough Underlay.
      Refer to “ vi. ” for details on “meshSpaceType”.

  6. You can refer to Content > Passthrough > Blueprints > BP_PassthroughTestManager for the use of the blueprint functions above.

  7. The last thing to show passthrough underlay is to poke the hole with materials in your map. The following steps will show you how to create the needed assets by hand and use them to poke the hole. You can refer to Content > Passthrough > Blueprints > BP_PassthroughClearMeshes and Content > Passthrough > Materials > ClearAlpha and ClearColor for further details.
    1. Two materials are needed to poke the hole. Right-click on the Content Browser to create two Materials , and name ClearAlpha and ClearColor.

    2. Open up the ClearAlpha material. On the left panel Details > Material, change the Material Domain to Surface , Blend Mode to Translucent , Shading Model to Unlit.

      Select Write Only Alpha in Details > Translucency.

    3. In the Material Graph, right-click Emissive Color and Opacity to Promote them to Parameter . Then set the Emissive Color Param to (0,0,0,1) and set the Opacity Param to (1.0).


      Remerber to Apply and Save the Material.

    4. Open up the ClearColor Material. On the left side panel Details > Material, change the Material Domain to Surface , Blend Mode to Masked , Shading Model to Unit.

    5. In the Material Graph, right-click on Emissive Color to Promote to Parameter .
      Then set the Emissive Color Param to (0,0,0,1).


      Remember to Apply and Save the Material.

    6. Create an Actor blueprint class to combine ClearAlpha and ClearColor effects. Right-click on Content Browser to create a Blueprint Class and select Actor as Pick Parent Class .


      Named it BP_PassthroughClearMeshes.

    7. Open up the BP_PassthroughClearMeshes, add two static mesh components and name them ClearAlpha and ClearColor on the left-side panel Components .

    8. Select Engine/EngineSky/SM_SkySphere as Static mesh in Details for both meshes components ClearAlpha and ClearColor. And select the material ClearAlpha and ClearColor as the Material > Element 0 of the corresponding meshes components ClearAlpha and ClearColor.

    9. Place the BP_PassthroughClearMeshes you just created in the Passthrough Map


Play the sample map

  1. Make sure the OpenXR Passthrough extension is enabled, the setting is in Edit > Project Settings > Plugins > Vive OpenXR .
  2. The sample map is under Content > Passthrough > Map .

  3. Sample map controls.
    Right A Press: StartPlanarPassthrough.
    Right B Press: StartProjectedPassthrough.
    Right Thumb Stick: Move ProjectedPassthrough mesh.
    Left Thumb Stick: Rotate ProjectedPassthrough mesh.
  4. Start playing the Passthrough map, press A you will see the PlanarPassthrough , and press B you will see the ProjectedPassthrough, you can also push the left and right controller thumb stick to move and rotate the passthrough mesh.