Passthrough AR
Passthrough AR is a common technique where you show passthrough in the background of your VR scene.
By default, a passthrough layer uses automatic environment reconstruction, which covers the entire screen. There are multiple means to combine passthrough and VR in interesting ways to create mixed reality experiences. You can:
- Use the layers’ opacity values to create a full-screen blend between passthrough and VR.
- Use the application’s alpha channel to let passthrough only show in selected regions.
- Use surface-projected passthrough to specify the geometry onto which you project the passthrough images instead of an automatic environment depth reconstruction.
These techniques are not mutually exclusive. They can be combined to create more sophisticated visualizations. This section describes a number of typical usage scenarios, and how they are set up.
To show Passthrough AR, do the following:
- Get your initial Unity project set up as detailed in Get Started with Passthrough.
- On the Hierarchy tab, select OVRCameraRig.
- On the Inspector tab, find the OVRPassthroughLayer script.
- Set Placement to Underlay in your OVRPassthroughLayer component.
Set the main camera’s background to transparent:
- On the Hierarchy tab, select OVRCameraRig > TrackingSpace > CenterEyeAnchor.
- On the Inspector tab, in the Clear Flags list, select Solid Color.
- Change the Background color to black and the alpha value to 0.
Optional: Add multiple instances of
OVRPassthroughLayer
to your scene, each with its own configuration. A maximum of three instances can be active at any given time.